#import "realtybaron.h" #ifndef DEF_REALTYBARONNS0Forecast_M #define DEF_REALTYBARONNS0Forecast_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 REALTYBARONNS0Forecast /** * (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 */ - (REALTYBARONNS0Link *) link { return _link; } /** * attribution link */ - (void) setLink: (REALTYBARONNS0Link *) 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 */ - (REALTYBARONNS0Slugs *) slugs { return _slugs; } /** * slugs */ - (void) setSlugs: (REALTYBARONNS0Slugs *) 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 { REALTYBARONNS0Forecast *_rEALTYBARONNS0Forecast; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _rEALTYBARONNS0Forecast = (REALTYBARONNS0Forecast *) [REALTYBARONNS0Forecast readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _rEALTYBARONNS0Forecast; } //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 REALTYBARONNS0Forecast */ /** * Internal, private interface for JAXB reading and writing. */ @interface REALTYBARONNS0Forecast (JAXB) @end /*interface REALTYBARONNS0Forecast (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation REALTYBARONNS0Forecast (JAXB) /** * Read an instance of REALTYBARONNS0Forecast from an XML reader. * * @param reader The reader. * @return An instance of REALTYBARONNS0Forecast defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { REALTYBARONNS0Forecast *_rEALTYBARONNS0Forecast = [[REALTYBARONNS0Forecast alloc] init]; NS_DURING { [_rEALTYBARONNS0Forecast initWithReader: reader]; } NS_HANDLER { _rEALTYBARONNS0Forecast = nil; [localException raise]; } NS_ENDHANDLER [_rEALTYBARONNS0Forecast autorelease]; return _rEALTYBARONNS0Forecast; } /** * Initialize this instance of REALTYBARONNS0Forecast 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 REALTYBARONNS0Forecast 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 REALTYBARONNS0Forecast from an XML reader. The element to be read is * "forecast". * * @param reader The XML reader. * @return The REALTYBARONNS0Forecast. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; REALTYBARONNS0Forecast *_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 = (REALTYBARONNS0Forecast *)[REALTYBARONNS0Forecast 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 REALTYBARONNS0Forecast. Expected element forecast. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0Forecast. Expected element forecast. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _forecast; } /** * Writes this REALTYBARONNS0Forecast 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 REALTYBARONNS0Forecast 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 = [REALTYBARONNS0Link 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 = [REALTYBARONNS0Slugs 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 REALTYBARONNS0Forecast (JAXB) */ #endif /* DEF_REALTYBARONNS0Forecast_M */ #ifndef DEF_REALTYBARONNS0Profile_M #define DEF_REALTYBARONNS0Profile_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 REALTYBARONNS0Profile /** * (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 */ - (REALTYBARONNS0Link *) link { return _link; } /** * link */ - (void) setLink: (REALTYBARONNS0Link *) newLink { [newLink retain]; [_link release]; _link = newLink; } /** * (no documentation provided) */ - (REALTYBARONNS0Image *) photo { return _photo; } /** * (no documentation provided) */ - (void) setPhoto: (REALTYBARONNS0Image *) newPhoto { [newPhoto retain]; [_photo release]; _photo = newPhoto; } /** * (no documentation provided) */ - (REALTYBARONNS0Slugs *) slugs { return _slugs; } /** * (no documentation provided) */ - (void) setSlugs: (REALTYBARONNS0Slugs *) 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 { REALTYBARONNS0Profile *_rEALTYBARONNS0Profile; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _rEALTYBARONNS0Profile = (REALTYBARONNS0Profile *) [REALTYBARONNS0Profile readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _rEALTYBARONNS0Profile; } //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 REALTYBARONNS0Profile */ /** * Internal, private interface for JAXB reading and writing. */ @interface REALTYBARONNS0Profile (JAXB) @end /*interface REALTYBARONNS0Profile (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation REALTYBARONNS0Profile (JAXB) /** * Read an instance of REALTYBARONNS0Profile from an XML reader. * * @param reader The reader. * @return An instance of REALTYBARONNS0Profile defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { REALTYBARONNS0Profile *_rEALTYBARONNS0Profile = [[REALTYBARONNS0Profile alloc] init]; NS_DURING { [_rEALTYBARONNS0Profile initWithReader: reader]; } NS_HANDLER { _rEALTYBARONNS0Profile = nil; [localException raise]; } NS_ENDHANDLER [_rEALTYBARONNS0Profile autorelease]; return _rEALTYBARONNS0Profile; } /** * Initialize this instance of REALTYBARONNS0Profile 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 REALTYBARONNS0Profile 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 REALTYBARONNS0Profile from an XML reader. The element to be read is * "profile". * * @param reader The XML reader. * @return The REALTYBARONNS0Profile. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; REALTYBARONNS0Profile *_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 = (REALTYBARONNS0Profile *)[REALTYBARONNS0Profile 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 REALTYBARONNS0Profile. Expected element profile. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0Profile. Expected element profile. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _profile; } /** * Writes this REALTYBARONNS0Profile 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 REALTYBARONNS0Profile 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 = [REALTYBARONNS0Link 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 = [REALTYBARONNS0Image 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 = [REALTYBARONNS0Slugs 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 REALTYBARONNS0Profile (JAXB) */ #endif /* DEF_REALTYBARONNS0Profile_M */ #ifndef DEF_REALTYBARONNS0Sale_M #define DEF_REALTYBARONNS0Sale_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 REALTYBARONNS0Sale /** * (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 */ - (REALTYBARONNS0Link *) link { return _link; } /** * link */ - (void) setLink: (REALTYBARONNS0Link *) 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) */ - (REALTYBARONNS0Slugs *) slugs { return _slugs; } /** * (no documentation provided) */ - (void) setSlugs: (REALTYBARONNS0Slugs *) 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 { REALTYBARONNS0Sale *_rEALTYBARONNS0Sale; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _rEALTYBARONNS0Sale = (REALTYBARONNS0Sale *) [REALTYBARONNS0Sale readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _rEALTYBARONNS0Sale; } //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 REALTYBARONNS0Sale */ /** * Internal, private interface for JAXB reading and writing. */ @interface REALTYBARONNS0Sale (JAXB) @end /*interface REALTYBARONNS0Sale (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation REALTYBARONNS0Sale (JAXB) /** * Read an instance of REALTYBARONNS0Sale from an XML reader. * * @param reader The reader. * @return An instance of REALTYBARONNS0Sale defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { REALTYBARONNS0Sale *_rEALTYBARONNS0Sale = [[REALTYBARONNS0Sale alloc] init]; NS_DURING { [_rEALTYBARONNS0Sale initWithReader: reader]; } NS_HANDLER { _rEALTYBARONNS0Sale = nil; [localException raise]; } NS_ENDHANDLER [_rEALTYBARONNS0Sale autorelease]; return _rEALTYBARONNS0Sale; } /** * Initialize this instance of REALTYBARONNS0Sale 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 REALTYBARONNS0Sale 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 REALTYBARONNS0Sale from an XML reader. The element to be read is * "sale". * * @param reader The XML reader. * @return The REALTYBARONNS0Sale. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; REALTYBARONNS0Sale *_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 = (REALTYBARONNS0Sale *)[REALTYBARONNS0Sale 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 REALTYBARONNS0Sale. Expected element sale. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0Sale. Expected element sale. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _sale; } /** * Writes this REALTYBARONNS0Sale 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 REALTYBARONNS0Sale 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 = [REALTYBARONNS0Link 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 = [REALTYBARONNS0Slugs 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 REALTYBARONNS0Sale (JAXB) */ #endif /* DEF_REALTYBARONNS0Sale_M */ #ifndef DEF_REALTYBARONNS0Answer_M #define DEF_REALTYBARONNS0Answer_M /** * User: marc Date: May 12, 2009 Time: 1:49:47 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 REALTYBARONNS0Answer /** * (no documentation provided) */ - (int *) identifier { return _identifier; } /** * (no documentation provided) */ - (void) setIdentifier: (int *) newIdentifier { if (_identifier != NULL) { free(_identifier); } _identifier = newIdentifier; } /** * (no documentation provided) */ - (NSDate *) timestamp { return _timestamp; } /** * (no documentation provided) */ - (void) setTimestamp: (NSDate *) newTimestamp { [newTimestamp retain]; [_timestamp release]; _timestamp = newTimestamp; } /** * (no documentation provided) */ - (int *) question { return _question; } /** * (no documentation provided) */ - (void) setQuestion: (int *) newQuestion { if (_question != NULL) { free(_question); } _question = newQuestion; } /** * (no documentation provided) */ - (int *) rating { return _rating; } /** * (no documentation provided) */ - (void) setRating: (int *) newRating { if (_rating != NULL) { free(_rating); } _rating = newRating; } /** * (no documentation provided) */ - (REALTYBARONNS0Badge *) badge { return _badge; } /** * (no documentation provided) */ - (void) setBadge: (REALTYBARONNS0Badge *) newBadge { [newBadge retain]; [_badge release]; _badge = newBadge; } /** * (no documentation provided) */ - (NSString *) text { return _text; } /** * (no documentation provided) */ - (void) setText: (NSString *) newText { [newText retain]; [_text release]; _text = newText; } /** * (no documentation provided) */ - (NSString *) author { return _author; } /** * (no documentation provided) */ - (void) setAuthor: (NSString *) newAuthor { [newAuthor retain]; [_author release]; _author = newAuthor; } /** * (no documentation provided) */ - (NSArray *) tool { return _tool; } /** * (no documentation provided) */ - (void) setTool: (NSArray *) newTool { [newTool retain]; [_tool release]; _tool = newTool; } /** * (no documentation provided) */ - (NSArray *) content { return _content; } /** * (no documentation provided) */ - (void) setContent: (NSArray *) newContent { [newContent retain]; [_content release]; _content = newContent; } - (void) dealloc { [self setIdentifier: NULL]; [self setTimestamp: nil]; [self setQuestion: NULL]; [self setRating: NULL]; [self setBadge: nil]; [self setText: nil]; [self setAuthor: nil]; [self setTool: nil]; [self setContent: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { REALTYBARONNS0Answer *_rEALTYBARONNS0Answer; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _rEALTYBARONNS0Answer = (REALTYBARONNS0Answer *) [REALTYBARONNS0Answer readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _rEALTYBARONNS0Answer; } //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 REALTYBARONNS0Answer */ /** * Internal, private interface for JAXB reading and writing. */ @interface REALTYBARONNS0Answer (JAXB) @end /*interface REALTYBARONNS0Answer (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation REALTYBARONNS0Answer (JAXB) /** * Read an instance of REALTYBARONNS0Answer from an XML reader. * * @param reader The reader. * @return An instance of REALTYBARONNS0Answer defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { REALTYBARONNS0Answer *_rEALTYBARONNS0Answer = [[REALTYBARONNS0Answer alloc] init]; NS_DURING { [_rEALTYBARONNS0Answer initWithReader: reader]; } NS_HANDLER { _rEALTYBARONNS0Answer = nil; [localException raise]; } NS_ENDHANDLER [_rEALTYBARONNS0Answer autorelease]; return _rEALTYBARONNS0Answer; } /** * Initialize this instance of REALTYBARONNS0Answer 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 REALTYBARONNS0Answer 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 REALTYBARONNS0Answer from an XML reader. The element to be read is * "answer". * * @param reader The XML reader. * @return The REALTYBARONNS0Answer. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; REALTYBARONNS0Answer *_answer = 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 answer."]; } } if (xmlStrcmp(BAD_CAST "answer", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}answer."); #endif _answer = (REALTYBARONNS0Answer *)[REALTYBARONNS0Answer readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}answer."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0Answer. Expected element answer. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0Answer. Expected element answer. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _answer; } /** * Writes this REALTYBARONNS0Answer to XML under element name "answer". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _answer The Answer to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this REALTYBARONNS0Answer 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 "answer", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}answer. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}answer for root element {}answer..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}answer for root element {}answer..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}answer. 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 "timestamp", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}timestamp..."); #endif [self setTimestamp: (NSDate*) [NSDate readXMLType: reader]]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}timestamp..."); #endif return YES; } if ((xmlStrcmp(BAD_CAST "question", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}question..."); #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 {}question."]; } [self setQuestion: ((int*) _child_accessor)]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}question..."); #endif return YES; } if ((xmlStrcmp(BAD_CAST "rating", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}rating..."); #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 {}rating."]; } [self setRating: ((int*) _child_accessor)]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}rating..."); #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 "badge", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}badge of type {}badge."); #endif __child = [REALTYBARONNS0Badge readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}badge of type {}badge."); #endif [self setBadge: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "text", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}text of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}text of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setText: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "author", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}author of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}author of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setAuthor: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "tool", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}tool of type {}tool."); #endif __child = [REALTYBARONNS0Tool readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}tool of type {}tool."); #endif if ([self tool]) { [self setTool: [[self tool] arrayByAddingObject: __child]]; } else { [self setTool: [NSArray arrayWithObject: __child]]; } return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "content", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}content of type {}content."); #endif __child = [REALTYBARONNS0Content readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}content of type {}content."); #endif if ([self content]) { [self setContent: [[self content] arrayByAddingObject: __child]]; } else { [self setContent: [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]; 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 timestamp]) { status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "timestamp", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}timestamp."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}timestamp..."); #endif [[self timestamp] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}timestamp..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}timestamp."]; } } if ([self question] != NULL) { status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "question", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}question."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}question..."); #endif status = xmlTextWriterWriteIntType(writer, [self question]); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing attribute {}question."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}question..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}question."]; } } if ([self rating] != NULL) { status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "rating", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}rating."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}rating..."); #endif status = xmlTextWriterWriteIntType(writer, [self rating]); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing attribute {}rating."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}rating..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}rating."]; } } } //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 badge]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "badge", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}badge."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}badge..."); #endif [[self badge] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}badge..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}badge."]; } } if ([self text]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "text", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}text."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}text..."); #endif [[self text] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}text..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}text."]; } } if ([self author]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "author", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}author."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}author..."); #endif [[self author] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}author..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}author."]; } } if ([self tool]) { __enumerator = [[self tool] objectEnumerator]; while ( (__item = [__enumerator nextObject]) ) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "tool", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}tool."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}tool..."); #endif [__item writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}tool..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}tool."]; } } //end item iterator. } if ([self content]) { __enumerator = [[self content] objectEnumerator]; while ( (__item = [__enumerator nextObject]) ) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "content", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}content."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}content..."); #endif [__item writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}content..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}content."]; } } //end item iterator. } } @end /* implementation REALTYBARONNS0Answer (JAXB) */ #endif /* DEF_REALTYBARONNS0Answer_M */ #ifndef DEF_REALTYBARONNS0AnswerCounts_M #define DEF_REALTYBARONNS0AnswerCounts_M /** * Created by IntelliJ IDEA. User: marc Date: Sep 1, 2010 Time: 2:27:19 PM */ @implementation REALTYBARONNS0AnswerCounts /** * (no documentation provided) */ - (int *) total { return _total; } /** * (no documentation provided) */ - (void) setTotal: (int *) newTotal { if (_total != NULL) { free(_total); } _total = newTotal; } /** * (no documentation provided) */ - (NSArray *) count { return _count; } /** * (no documentation provided) */ - (void) setCount: (NSArray *) newCount { [newCount retain]; [_count release]; _count = newCount; } - (void) dealloc { [self setTotal: NULL]; [self setCount: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { REALTYBARONNS0AnswerCounts *_rEALTYBARONNS0AnswerCounts; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _rEALTYBARONNS0AnswerCounts = (REALTYBARONNS0AnswerCounts *) [REALTYBARONNS0AnswerCounts readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _rEALTYBARONNS0AnswerCounts; } //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 REALTYBARONNS0AnswerCounts */ /** * Internal, private interface for JAXB reading and writing. */ @interface REALTYBARONNS0AnswerCounts (JAXB) @end /*interface REALTYBARONNS0AnswerCounts (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation REALTYBARONNS0AnswerCounts (JAXB) /** * Read an instance of REALTYBARONNS0AnswerCounts from an XML reader. * * @param reader The reader. * @return An instance of REALTYBARONNS0AnswerCounts defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { REALTYBARONNS0AnswerCounts *_rEALTYBARONNS0AnswerCounts = [[REALTYBARONNS0AnswerCounts alloc] init]; NS_DURING { [_rEALTYBARONNS0AnswerCounts initWithReader: reader]; } NS_HANDLER { _rEALTYBARONNS0AnswerCounts = nil; [localException raise]; } NS_ENDHANDLER [_rEALTYBARONNS0AnswerCounts autorelease]; return _rEALTYBARONNS0AnswerCounts; } /** * Initialize this instance of REALTYBARONNS0AnswerCounts 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 REALTYBARONNS0AnswerCounts 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 REALTYBARONNS0AnswerCounts from an XML reader. The element to be read is * "answerCounts". * * @param reader The XML reader. * @return The REALTYBARONNS0AnswerCounts. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; REALTYBARONNS0AnswerCounts *_answerCounts = 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 answerCounts."]; } } if (xmlStrcmp(BAD_CAST "answerCounts", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}answerCounts."); #endif _answerCounts = (REALTYBARONNS0AnswerCounts *)[REALTYBARONNS0AnswerCounts readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}answerCounts."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0AnswerCounts. Expected element answerCounts. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0AnswerCounts. Expected element answerCounts. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _answerCounts; } /** * Writes this REALTYBARONNS0AnswerCounts to XML under element name "answerCounts". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _answerCounts The AnswerCounts to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this REALTYBARONNS0AnswerCounts 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 "answerCounts", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}answerCounts. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}answerCounts for root element {}answerCounts..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}answerCounts for root element {}answerCounts..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}answerCounts. 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 "total", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}total..."); #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."]; } [self setTotal: ((int*) _child_accessor)]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}total..."); #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 "count", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}count of type {}answerCount."); #endif __child = [REALTYBARONNS0AnswerCount readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}count of type {}answerCount."); #endif if ([self count]) { [self setCount: [[self count] arrayByAddingObject: __child]]; } else { [self setCount: [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]; if ([self total] != NULL) { status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "total", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}total."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}total..."); #endif status = xmlTextWriterWriteIntType(writer, [self total]); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing attribute {}total."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}total..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}total."]; } } } //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 count]) { __enumerator = [[self count] objectEnumerator]; while ( (__item = [__enumerator nextObject]) ) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "count", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}count."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}count..."); #endif [__item writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}count..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}count."]; } } //end item iterator. } } @end /* implementation REALTYBARONNS0AnswerCounts (JAXB) */ #endif /* DEF_REALTYBARONNS0AnswerCounts_M */ #ifndef DEF_REALTYBARONNS0Answers_M #define DEF_REALTYBARONNS0Answers_M /** * User: marc Date: May 12, 2009 Time: 1:51:52 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 REALTYBARONNS0Answers /** * order */ - (enum REALTYBARONNS0AnswerOrder *) order { return _order; } /** * order */ - (void) setOrder: (enum REALTYBARONNS0AnswerOrder *) newOrder { if (_order != NULL) { free(_order); } _order = newOrder; } /** * count */ - (int *) count { return _count; } /** * count */ - (void) setCount: (int *) newCount { if (_count != NULL) { free(_count); } _count = newCount; } /** * list */ - (NSArray *) answer { return _answer; } /** * list */ - (void) setAnswer: (NSArray *) newAnswer { [newAnswer retain]; [_answer release]; _answer = newAnswer; } - (void) dealloc { [self setOrder: NULL]; [self setCount: NULL]; [self setAnswer: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { REALTYBARONNS0Answers *_rEALTYBARONNS0Answers; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _rEALTYBARONNS0Answers = (REALTYBARONNS0Answers *) [REALTYBARONNS0Answers readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _rEALTYBARONNS0Answers; } //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 REALTYBARONNS0Answers */ /** * Internal, private interface for JAXB reading and writing. */ @interface REALTYBARONNS0Answers (JAXB) @end /*interface REALTYBARONNS0Answers (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation REALTYBARONNS0Answers (JAXB) /** * Read an instance of REALTYBARONNS0Answers from an XML reader. * * @param reader The reader. * @return An instance of REALTYBARONNS0Answers defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { REALTYBARONNS0Answers *_rEALTYBARONNS0Answers = [[REALTYBARONNS0Answers alloc] init]; NS_DURING { [_rEALTYBARONNS0Answers initWithReader: reader]; } NS_HANDLER { _rEALTYBARONNS0Answers = nil; [localException raise]; } NS_ENDHANDLER [_rEALTYBARONNS0Answers autorelease]; return _rEALTYBARONNS0Answers; } /** * Initialize this instance of REALTYBARONNS0Answers 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 REALTYBARONNS0Answers 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 REALTYBARONNS0Answers from an XML reader. The element to be read is * "answers". * * @param reader The XML reader. * @return The REALTYBARONNS0Answers. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; REALTYBARONNS0Answers *_answers = 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 answers."]; } } if (xmlStrcmp(BAD_CAST "answers", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}answers."); #endif _answers = (REALTYBARONNS0Answers *)[REALTYBARONNS0Answers readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}answers."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0Answers. Expected element answers. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0Answers. Expected element answers. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _answers; } /** * Writes this REALTYBARONNS0Answers to XML under element name "answers". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _answers The Answers to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this REALTYBARONNS0Answers 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 "answers", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}answers. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}answers for root element {}answers..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}answers for root element {}answers..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}answers. 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 "order", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}order..."); #endif _child_accessor = xmlTextReaderReadREALTYBARONNS0AnswerOrderType(reader); if (_child_accessor == NULL) { //panic: unable to read the attribute value for some reason. [NSException raise: @"XMLReadError" format: @"Error reading attribute {}order."]; } [self setOrder: ((enum REALTYBARONNS0AnswerOrder*) _child_accessor)]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}order..."); #endif return YES; } if ((xmlStrcmp(BAD_CAST "count", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}count..."); #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 {}count."]; } [self setCount: ((int*) _child_accessor)]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}count..."); #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 "answer", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}answer of type {}answer."); #endif __child = [REALTYBARONNS0Answer readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}answer of type {}answer."); #endif if ([self answer]) { [self setAnswer: [[self answer] arrayByAddingObject: __child]]; } else { [self setAnswer: [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]; if ([self order] != NULL) { status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "order", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}order."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}order..."); #endif status = xmlTextWriterWriteREALTYBARONNS0AnswerOrderType(writer, [self order]); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing attribute {}order."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}order..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}order."]; } } if ([self count] != NULL) { status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "count", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}count."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}count..."); #endif status = xmlTextWriterWriteIntType(writer, [self count]); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing attribute {}count."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}count..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}count."]; } } } //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 answer]) { __enumerator = [[self answer] objectEnumerator]; while ( (__item = [__enumerator nextObject]) ) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "answer", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}answer."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}answer..."); #endif [__item writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}answer..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}answer."]; } } //end item iterator. } } @end /* implementation REALTYBARONNS0Answers (JAXB) */ #endif /* DEF_REALTYBARONNS0Answers_M */ #ifndef DEF_REALTYBARONNS0CountAnswers_M #define DEF_REALTYBARONNS0CountAnswers_M /** * User: marc Date: May 21, 2009 Time: 5:18:27 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 REALTYBARONNS0CountAnswers /** * links */ - (REALTYBARONNS0Links *) links { return _links; } /** * links */ - (void) setLinks: (REALTYBARONNS0Links *) newLinks { [newLinks retain]; [_links release]; _links = newLinks; } /** * status */ - (REALTYBARONNS0Status *) status { return _status; } /** * status */ - (void) setStatus: (REALTYBARONNS0Status *) newStatus { [newStatus retain]; [_status release]; _status = newStatus; } /** * counts */ - (REALTYBARONNS0AnswerCounts *) counts { return _counts; } /** * counts */ - (void) setCounts: (REALTYBARONNS0AnswerCounts *) newCounts { [newCounts retain]; [_counts release]; _counts = newCounts; } - (void) dealloc { [self setLinks: nil]; [self setStatus: nil]; [self setCounts: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { REALTYBARONNS0CountAnswers *_rEALTYBARONNS0CountAnswers; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _rEALTYBARONNS0CountAnswers = (REALTYBARONNS0CountAnswers *) [REALTYBARONNS0CountAnswers readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _rEALTYBARONNS0CountAnswers; } //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 REALTYBARONNS0CountAnswers */ /** * Internal, private interface for JAXB reading and writing. */ @interface REALTYBARONNS0CountAnswers (JAXB) @end /*interface REALTYBARONNS0CountAnswers (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation REALTYBARONNS0CountAnswers (JAXB) /** * Read an instance of REALTYBARONNS0CountAnswers from an XML reader. * * @param reader The reader. * @return An instance of REALTYBARONNS0CountAnswers defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { REALTYBARONNS0CountAnswers *_rEALTYBARONNS0CountAnswers = [[REALTYBARONNS0CountAnswers alloc] init]; NS_DURING { [_rEALTYBARONNS0CountAnswers initWithReader: reader]; } NS_HANDLER { _rEALTYBARONNS0CountAnswers = nil; [localException raise]; } NS_ENDHANDLER [_rEALTYBARONNS0CountAnswers autorelease]; return _rEALTYBARONNS0CountAnswers; } /** * Initialize this instance of REALTYBARONNS0CountAnswers 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 REALTYBARONNS0CountAnswers 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 REALTYBARONNS0CountAnswers from an XML reader. The element to be read is * "response". * * @param reader The XML reader. * @return The REALTYBARONNS0CountAnswers. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; REALTYBARONNS0CountAnswers *_countAnswers = 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 _countAnswers = (REALTYBARONNS0CountAnswers *)[REALTYBARONNS0CountAnswers 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 REALTYBARONNS0CountAnswers. Expected element response. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0CountAnswers. Expected element response. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _countAnswers; } /** * Writes this REALTYBARONNS0CountAnswers to XML under element name "response". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _countAnswers The CountAnswers to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this REALTYBARONNS0CountAnswers 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 {}countAnswers for root element {}response..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}countAnswers 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 "links", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}links of type {}links."); #endif __child = [REALTYBARONNS0Links 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 = [REALTYBARONNS0Status 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 "counts", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}counts of type {}answerCounts."); #endif __child = [REALTYBARONNS0AnswerCounts readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}counts of type {}answerCounts."); #endif [self setCounts: __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 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."]; } } if ([self counts]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "counts", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}counts."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}counts..."); #endif [[self counts] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}counts..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}counts."]; } } } @end /* implementation REALTYBARONNS0CountAnswers (JAXB) */ #endif /* DEF_REALTYBARONNS0CountAnswers_M */ #ifndef DEF_REALTYBARONNS0FindQuestions_M #define DEF_REALTYBARONNS0FindQuestions_M /** * User: marc Date: May 21, 2009 Time: 5:18:27 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 REALTYBARONNS0FindQuestions /** * links */ - (REALTYBARONNS0Links *) links { return _links; } /** * links */ - (void) setLinks: (REALTYBARONNS0Links *) newLinks { [newLinks retain]; [_links release]; _links = newLinks; } /** * (no documentation provided) */ - (REALTYBARONNS0Status *) status { return _status; } /** * (no documentation provided) */ - (void) setStatus: (REALTYBARONNS0Status *) newStatus { [newStatus retain]; [_status release]; _status = newStatus; } /** * (no documentation provided) */ - (REALTYBARONNS0Questions *) questions { return _questions; } /** * (no documentation provided) */ - (void) setQuestions: (REALTYBARONNS0Questions *) newQuestions { [newQuestions retain]; [_questions release]; _questions = newQuestions; } - (void) dealloc { [self setLinks: nil]; [self setStatus: nil]; [self setQuestions: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { REALTYBARONNS0FindQuestions *_rEALTYBARONNS0FindQuestions; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _rEALTYBARONNS0FindQuestions = (REALTYBARONNS0FindQuestions *) [REALTYBARONNS0FindQuestions readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _rEALTYBARONNS0FindQuestions; } //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 REALTYBARONNS0FindQuestions */ /** * Internal, private interface for JAXB reading and writing. */ @interface REALTYBARONNS0FindQuestions (JAXB) @end /*interface REALTYBARONNS0FindQuestions (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation REALTYBARONNS0FindQuestions (JAXB) /** * Read an instance of REALTYBARONNS0FindQuestions from an XML reader. * * @param reader The reader. * @return An instance of REALTYBARONNS0FindQuestions defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { REALTYBARONNS0FindQuestions *_rEALTYBARONNS0FindQuestions = [[REALTYBARONNS0FindQuestions alloc] init]; NS_DURING { [_rEALTYBARONNS0FindQuestions initWithReader: reader]; } NS_HANDLER { _rEALTYBARONNS0FindQuestions = nil; [localException raise]; } NS_ENDHANDLER [_rEALTYBARONNS0FindQuestions autorelease]; return _rEALTYBARONNS0FindQuestions; } /** * Initialize this instance of REALTYBARONNS0FindQuestions 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 REALTYBARONNS0FindQuestions 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 REALTYBARONNS0FindQuestions from an XML reader. The element to be read is * "response". * * @param reader The XML reader. * @return The REALTYBARONNS0FindQuestions. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; REALTYBARONNS0FindQuestions *_findQuestions = 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 _findQuestions = (REALTYBARONNS0FindQuestions *)[REALTYBARONNS0FindQuestions 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 REALTYBARONNS0FindQuestions. Expected element response. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0FindQuestions. Expected element response. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _findQuestions; } /** * Writes this REALTYBARONNS0FindQuestions to XML under element name "response". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _findQuestions The FindQuestions to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this REALTYBARONNS0FindQuestions 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 {}findQuestions for root element {}response..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}findQuestions 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 "links", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}links of type {}links."); #endif __child = [REALTYBARONNS0Links 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 = [REALTYBARONNS0Status 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 "questions", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}questions of type {}questions."); #endif __child = [REALTYBARONNS0Questions readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}questions of type {}questions."); #endif [self setQuestions: __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 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."]; } } if ([self questions]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "questions", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}questions."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}questions..."); #endif [[self questions] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}questions..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}questions."]; } } } @end /* implementation REALTYBARONNS0FindQuestions (JAXB) */ #endif /* DEF_REALTYBARONNS0FindQuestions_M */ #ifndef DEF_REALTYBARONNS0GetQuestion_M #define DEF_REALTYBARONNS0GetQuestion_M /** * User: marc Date: May 21, 2009 Time: 5:18:27 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 REALTYBARONNS0GetQuestion /** * status */ - (REALTYBARONNS0Status *) status { return _status; } /** * status */ - (void) setStatus: (REALTYBARONNS0Status *) newStatus { [newStatus retain]; [_status release]; _status = newStatus; } /** * (no documentation provided) */ - (REALTYBARONNS0Question *) question { return _question; } /** * (no documentation provided) */ - (void) setQuestion: (REALTYBARONNS0Question *) newQuestion { [newQuestion retain]; [_question release]; _question = newQuestion; } - (void) dealloc { [self setStatus: nil]; [self setQuestion: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { REALTYBARONNS0GetQuestion *_rEALTYBARONNS0GetQuestion; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _rEALTYBARONNS0GetQuestion = (REALTYBARONNS0GetQuestion *) [REALTYBARONNS0GetQuestion readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _rEALTYBARONNS0GetQuestion; } //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 REALTYBARONNS0GetQuestion */ /** * Internal, private interface for JAXB reading and writing. */ @interface REALTYBARONNS0GetQuestion (JAXB) @end /*interface REALTYBARONNS0GetQuestion (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation REALTYBARONNS0GetQuestion (JAXB) /** * Read an instance of REALTYBARONNS0GetQuestion from an XML reader. * * @param reader The reader. * @return An instance of REALTYBARONNS0GetQuestion defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { REALTYBARONNS0GetQuestion *_rEALTYBARONNS0GetQuestion = [[REALTYBARONNS0GetQuestion alloc] init]; NS_DURING { [_rEALTYBARONNS0GetQuestion initWithReader: reader]; } NS_HANDLER { _rEALTYBARONNS0GetQuestion = nil; [localException raise]; } NS_ENDHANDLER [_rEALTYBARONNS0GetQuestion autorelease]; return _rEALTYBARONNS0GetQuestion; } /** * Initialize this instance of REALTYBARONNS0GetQuestion 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 REALTYBARONNS0GetQuestion 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 REALTYBARONNS0GetQuestion from an XML reader. The element to be read is * "response". * * @param reader The XML reader. * @return The REALTYBARONNS0GetQuestion. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; REALTYBARONNS0GetQuestion *_getQuestion = 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 _getQuestion = (REALTYBARONNS0GetQuestion *)[REALTYBARONNS0GetQuestion 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 REALTYBARONNS0GetQuestion. Expected element response. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0GetQuestion. Expected element response. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _getQuestion; } /** * Writes this REALTYBARONNS0GetQuestion to XML under element name "response". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _getQuestion The GetQuestion to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this REALTYBARONNS0GetQuestion 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 {}getQuestion for root element {}response..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}getQuestion 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 = [REALTYBARONNS0Status 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 "question", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}question of type {}question."); #endif __child = [REALTYBARONNS0Question readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}question of type {}question."); #endif [self setQuestion: __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 question]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "question", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}question."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}question..."); #endif [[self question] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}question..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}question."]; } } } @end /* implementation REALTYBARONNS0GetQuestion (JAXB) */ #endif /* DEF_REALTYBARONNS0GetQuestion_M */ #ifndef DEF_REALTYBARONNS0Locations_M #define DEF_REALTYBARONNS0Locations_M /** * User: marc Date: Mar 17, 2010 Time: 6:48:55 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 REALTYBARONNS0Locations /** * (no documentation provided) */ - (long) total_results { return _total_results; } /** * (no documentation provided) */ - (void) setTotal_results: (long) newTotal_results { _total_results = newTotal_results; } /** * locations */ - (NSArray *) location { return _location; } /** * locations */ - (void) setLocation: (NSArray *) newLocation { [newLocation retain]; [_location release]; _location = newLocation; } - (void) dealloc { [self setLocation: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { REALTYBARONNS0Locations *_rEALTYBARONNS0Locations; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _rEALTYBARONNS0Locations = (REALTYBARONNS0Locations *) [REALTYBARONNS0Locations readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _rEALTYBARONNS0Locations; } //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 REALTYBARONNS0Locations */ /** * Internal, private interface for JAXB reading and writing. */ @interface REALTYBARONNS0Locations (JAXB) @end /*interface REALTYBARONNS0Locations (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation REALTYBARONNS0Locations (JAXB) /** * Read an instance of REALTYBARONNS0Locations from an XML reader. * * @param reader The reader. * @return An instance of REALTYBARONNS0Locations defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { REALTYBARONNS0Locations *_rEALTYBARONNS0Locations = [[REALTYBARONNS0Locations alloc] init]; NS_DURING { [_rEALTYBARONNS0Locations initWithReader: reader]; } NS_HANDLER { _rEALTYBARONNS0Locations = nil; [localException raise]; } NS_ENDHANDLER [_rEALTYBARONNS0Locations autorelease]; return _rEALTYBARONNS0Locations; } /** * Initialize this instance of REALTYBARONNS0Locations 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 REALTYBARONNS0Locations 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 REALTYBARONNS0Locations from an XML reader. The element to be read is * "locations". * * @param reader The XML reader. * @return The REALTYBARONNS0Locations. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; REALTYBARONNS0Locations *_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 = (REALTYBARONNS0Locations *)[REALTYBARONNS0Locations 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 REALTYBARONNS0Locations. Expected element locations. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0Locations. Expected element locations. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _locations; } /** * Writes this REALTYBARONNS0Locations 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 REALTYBARONNS0Locations 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; } 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 = xmlTextReaderReadLongType(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: *((long*) _child_accessor)]; free(_child_accessor); #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}total_results..."); #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 "location", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}location of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}location of type {http://www.w3.org/2001/XMLSchema}string."); #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]; if (YES) { //always write the primitive attributes... 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 = xmlTextWriterWriteLongType(writer, &_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."]; } } } //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 REALTYBARONNS0Locations (JAXB) */ #endif /* DEF_REALTYBARONNS0Locations_M */ #ifndef DEF_REALTYBARONNS0PostQuestion_M #define DEF_REALTYBARONNS0PostQuestion_M /** * User: marc Date: May 21, 2009 Time: 5:18:27 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 REALTYBARONNS0PostQuestion /** * links */ - (REALTYBARONNS0Links *) links { return _links; } /** * links */ - (void) setLinks: (REALTYBARONNS0Links *) newLinks { [newLinks retain]; [_links release]; _links = newLinks; } /** * (no documentation provided) */ - (REALTYBARONNS0Status *) status { return _status; } /** * (no documentation provided) */ - (void) setStatus: (REALTYBARONNS0Status *) newStatus { [newStatus retain]; [_status release]; _status = newStatus; } /** * key */ - (NSString *) key { return _key; } /** * key */ - (void) setKey: (NSString *) newKey { [newKey retain]; [_key release]; _key = newKey; } /** * (no documentation provided) */ - (int *) identifier { return _identifier; } /** * (no documentation provided) */ - (void) setIdentifier: (int *) newIdentifier { if (_identifier != NULL) { free(_identifier); } _identifier = newIdentifier; } - (void) dealloc { [self setLinks: nil]; [self setStatus: nil]; [self setKey: nil]; [self setIdentifier: NULL]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { REALTYBARONNS0PostQuestion *_rEALTYBARONNS0PostQuestion; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _rEALTYBARONNS0PostQuestion = (REALTYBARONNS0PostQuestion *) [REALTYBARONNS0PostQuestion readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _rEALTYBARONNS0PostQuestion; } //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 REALTYBARONNS0PostQuestion */ /** * Internal, private interface for JAXB reading and writing. */ @interface REALTYBARONNS0PostQuestion (JAXB) @end /*interface REALTYBARONNS0PostQuestion (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation REALTYBARONNS0PostQuestion (JAXB) /** * Read an instance of REALTYBARONNS0PostQuestion from an XML reader. * * @param reader The reader. * @return An instance of REALTYBARONNS0PostQuestion defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { REALTYBARONNS0PostQuestion *_rEALTYBARONNS0PostQuestion = [[REALTYBARONNS0PostQuestion alloc] init]; NS_DURING { [_rEALTYBARONNS0PostQuestion initWithReader: reader]; } NS_HANDLER { _rEALTYBARONNS0PostQuestion = nil; [localException raise]; } NS_ENDHANDLER [_rEALTYBARONNS0PostQuestion autorelease]; return _rEALTYBARONNS0PostQuestion; } /** * Initialize this instance of REALTYBARONNS0PostQuestion 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 REALTYBARONNS0PostQuestion 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 REALTYBARONNS0PostQuestion from an XML reader. The element to be read is * "response". * * @param reader The XML reader. * @return The REALTYBARONNS0PostQuestion. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; REALTYBARONNS0PostQuestion *_postQuestion = 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 _postQuestion = (REALTYBARONNS0PostQuestion *)[REALTYBARONNS0PostQuestion 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 REALTYBARONNS0PostQuestion. Expected element response. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0PostQuestion. Expected element response. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _postQuestion; } /** * Writes this REALTYBARONNS0PostQuestion to XML under element name "response". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _postQuestion The PostQuestion to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this REALTYBARONNS0PostQuestion 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 {}postQuestion for root element {}response..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}postQuestion 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 "links", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}links of type {}links."); #endif __child = [REALTYBARONNS0Links 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 = [REALTYBARONNS0Status 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 "key", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}key of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}key of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setKey: __child]; return YES; } //end "if choice" 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)]; 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]; } //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 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."]; } } if ([self key]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "key", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}key."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}key..."); #endif [[self key] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}key..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}key."]; } } if ([self identifier] != NULL) { 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, [self 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."]; } } } @end /* implementation REALTYBARONNS0PostQuestion (JAXB) */ #endif /* DEF_REALTYBARONNS0PostQuestion_M */ #ifndef DEF_REALTYBARONNS0QuestionApproval_M #define DEF_REALTYBARONNS0QuestionApproval_M /** * Created by IntelliJ IDEA. User: marc Date: Sep 1, 2010 Time: 2:12:16 PM */ @implementation REALTYBARONNS0QuestionApproval /** * (no documentation provided) */ - (int *) question { return _question; } /** * (no documentation provided) */ - (void) setQuestion: (int *) newQuestion { if (_question != NULL) { free(_question); } _question = newQuestion; } /** * count */ - (enum REALTYBARONNS0ApprovalStatus *) value { return _value; } /** * count */ - (void) setValue: (enum REALTYBARONNS0ApprovalStatus *) newValue { if (_value != NULL) { free(_value); } _value = newValue; } - (void) dealloc { [self setQuestion: NULL]; [self setValue: NULL]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { REALTYBARONNS0QuestionApproval *_rEALTYBARONNS0QuestionApproval; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _rEALTYBARONNS0QuestionApproval = (REALTYBARONNS0QuestionApproval *) [REALTYBARONNS0QuestionApproval readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _rEALTYBARONNS0QuestionApproval; } //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 REALTYBARONNS0QuestionApproval */ /** * Internal, private interface for JAXB reading and writing. */ @interface REALTYBARONNS0QuestionApproval (JAXB) @end /*interface REALTYBARONNS0QuestionApproval (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation REALTYBARONNS0QuestionApproval (JAXB) /** * Read an instance of REALTYBARONNS0QuestionApproval from an XML reader. * * @param reader The reader. * @return An instance of REALTYBARONNS0QuestionApproval defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { REALTYBARONNS0QuestionApproval *_rEALTYBARONNS0QuestionApproval = [[REALTYBARONNS0QuestionApproval alloc] init]; NS_DURING { [_rEALTYBARONNS0QuestionApproval initWithReader: reader]; } NS_HANDLER { _rEALTYBARONNS0QuestionApproval = nil; [localException raise]; } NS_ENDHANDLER [_rEALTYBARONNS0QuestionApproval autorelease]; return _rEALTYBARONNS0QuestionApproval; } /** * Initialize this instance of REALTYBARONNS0QuestionApproval 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 REALTYBARONNS0QuestionApproval 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 REALTYBARONNS0QuestionApproval from an XML reader. The element to be read is * "questionApproval". * * @param reader The XML reader. * @return The REALTYBARONNS0QuestionApproval. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; REALTYBARONNS0QuestionApproval *_questionApproval = 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 questionApproval."]; } } if (xmlStrcmp(BAD_CAST "questionApproval", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}questionApproval."); #endif _questionApproval = (REALTYBARONNS0QuestionApproval *)[REALTYBARONNS0QuestionApproval readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}questionApproval."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0QuestionApproval. Expected element questionApproval. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0QuestionApproval. Expected element questionApproval. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _questionApproval; } /** * Writes this REALTYBARONNS0QuestionApproval to XML under element name "questionApproval". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _questionApproval The QuestionApproval to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this REALTYBARONNS0QuestionApproval 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 "questionApproval", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}questionApproval. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}questionApproval for root element {}questionApproval..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}questionApproval for root element {}questionApproval..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}questionApproval. 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 "question", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}question..."); #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 {}question."]; } [self setQuestion: ((int*) _child_accessor)]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}question..."); #endif return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { void *_child_accessor; #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read element value..."); #endif if (xmlTextReaderIsEmptyElement(reader) == 0) { _child_accessor = xmlTextReaderReadREALTYBARONNS0ApprovalStatusType(reader); if (_child_accessor == NULL) { //panic: unable to return the value for some reason. [NSException raise: @"XMLReadError" format: @"Error reading element value."]; } [self setValue: ((enum REALTYBARONNS0ApprovalStatus*) _child_accessor)]; } #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 question] != NULL) { status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "question", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}question."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}question..."); #endif status = xmlTextWriterWriteIntType(writer, [self question]); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing attribute {}question."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}question..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}question."]; } } } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element value..."); #endif if (xmlTextWriterWriteREALTYBARONNS0ApprovalStatusType(writer, [self value]) < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing element value."]; } #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 REALTYBARONNS0QuestionApproval (JAXB) */ #endif /* DEF_REALTYBARONNS0QuestionApproval_M */ #ifndef DEF_REALTYBARONNS0QuestionApprovals_M #define DEF_REALTYBARONNS0QuestionApprovals_M /** * Created by IntelliJ IDEA. User: marc Date: Sep 1, 2010 Time: 2:27:19 PM */ @implementation REALTYBARONNS0QuestionApprovals /** * status */ - (NSArray *) approval { return _approval; } /** * status */ - (void) setApproval: (NSArray *) newApproval { [newApproval retain]; [_approval release]; _approval = newApproval; } - (void) dealloc { [self setApproval: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { REALTYBARONNS0QuestionApprovals *_rEALTYBARONNS0QuestionApprovals; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _rEALTYBARONNS0QuestionApprovals = (REALTYBARONNS0QuestionApprovals *) [REALTYBARONNS0QuestionApprovals readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _rEALTYBARONNS0QuestionApprovals; } //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 REALTYBARONNS0QuestionApprovals */ /** * Internal, private interface for JAXB reading and writing. */ @interface REALTYBARONNS0QuestionApprovals (JAXB) @end /*interface REALTYBARONNS0QuestionApprovals (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation REALTYBARONNS0QuestionApprovals (JAXB) /** * Read an instance of REALTYBARONNS0QuestionApprovals from an XML reader. * * @param reader The reader. * @return An instance of REALTYBARONNS0QuestionApprovals defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { REALTYBARONNS0QuestionApprovals *_rEALTYBARONNS0QuestionApprovals = [[REALTYBARONNS0QuestionApprovals alloc] init]; NS_DURING { [_rEALTYBARONNS0QuestionApprovals initWithReader: reader]; } NS_HANDLER { _rEALTYBARONNS0QuestionApprovals = nil; [localException raise]; } NS_ENDHANDLER [_rEALTYBARONNS0QuestionApprovals autorelease]; return _rEALTYBARONNS0QuestionApprovals; } /** * Initialize this instance of REALTYBARONNS0QuestionApprovals 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 REALTYBARONNS0QuestionApprovals 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 REALTYBARONNS0QuestionApprovals from an XML reader. The element to be read is * "questionApprovals". * * @param reader The XML reader. * @return The REALTYBARONNS0QuestionApprovals. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; REALTYBARONNS0QuestionApprovals *_questionApprovals = 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 questionApprovals."]; } } if (xmlStrcmp(BAD_CAST "questionApprovals", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}questionApprovals."); #endif _questionApprovals = (REALTYBARONNS0QuestionApprovals *)[REALTYBARONNS0QuestionApprovals readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}questionApprovals."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0QuestionApprovals. Expected element questionApprovals. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0QuestionApprovals. Expected element questionApprovals. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _questionApprovals; } /** * Writes this REALTYBARONNS0QuestionApprovals to XML under element name "questionApprovals". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _questionApprovals The QuestionApprovals to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this REALTYBARONNS0QuestionApprovals 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 "questionApprovals", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}questionApprovals. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}questionApprovals for root element {}questionApprovals..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}questionApprovals for root element {}questionApprovals..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}questionApprovals. 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 "approval", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}approval of type {}questionApproval."); #endif __child = [REALTYBARONNS0QuestionApproval readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}approval of type {}questionApproval."); #endif if ([self approval]) { [self setApproval: [[self approval] arrayByAddingObject: __child]]; } else { [self setApproval: [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 approval]) { __enumerator = [[self approval] objectEnumerator]; while ( (__item = [__enumerator nextObject]) ) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "approval", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}approval."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}approval..."); #endif [__item writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}approval..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}approval."]; } } //end item iterator. } } @end /* implementation REALTYBARONNS0QuestionApprovals (JAXB) */ #endif /* DEF_REALTYBARONNS0QuestionApprovals_M */ #ifndef DEF_REALTYBARONNS0Tags_M #define DEF_REALTYBARONNS0Tags_M /** * User: marc Date: Dec 11, 2009 Time: 6:23:37 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 REALTYBARONNS0Tags /** * list */ - (NSArray *) tag { return _tag; } /** * list */ - (void) setTag: (NSArray *) newTag { [newTag retain]; [_tag release]; _tag = newTag; } - (void) dealloc { [self setTag: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { REALTYBARONNS0Tags *_rEALTYBARONNS0Tags; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _rEALTYBARONNS0Tags = (REALTYBARONNS0Tags *) [REALTYBARONNS0Tags readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _rEALTYBARONNS0Tags; } //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 REALTYBARONNS0Tags */ /** * Internal, private interface for JAXB reading and writing. */ @interface REALTYBARONNS0Tags (JAXB) @end /*interface REALTYBARONNS0Tags (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation REALTYBARONNS0Tags (JAXB) /** * Read an instance of REALTYBARONNS0Tags from an XML reader. * * @param reader The reader. * @return An instance of REALTYBARONNS0Tags defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { REALTYBARONNS0Tags *_rEALTYBARONNS0Tags = [[REALTYBARONNS0Tags alloc] init]; NS_DURING { [_rEALTYBARONNS0Tags initWithReader: reader]; } NS_HANDLER { _rEALTYBARONNS0Tags = nil; [localException raise]; } NS_ENDHANDLER [_rEALTYBARONNS0Tags autorelease]; return _rEALTYBARONNS0Tags; } /** * Initialize this instance of REALTYBARONNS0Tags 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 REALTYBARONNS0Tags 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 REALTYBARONNS0Tags from an XML reader. The element to be read is * "tags". * * @param reader The XML reader. * @return The REALTYBARONNS0Tags. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; REALTYBARONNS0Tags *_tags = 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 tags."]; } } if (xmlStrcmp(BAD_CAST "tags", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}tags."); #endif _tags = (REALTYBARONNS0Tags *)[REALTYBARONNS0Tags readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}tags."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0Tags. Expected element tags. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0Tags. Expected element tags. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _tags; } /** * Writes this REALTYBARONNS0Tags to XML under element name "tags". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _tags The Tags to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this REALTYBARONNS0Tags 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 "tags", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}tags. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}tags for root element {}tags..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}tags for root element {}tags..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}tags. 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 "tag", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}tag of type {}tag."); #endif __child = [REALTYBARONNS0Tag readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}tag of type {}tag."); #endif if ([self tag]) { [self setTag: [[self tag] arrayByAddingObject: __child]]; } else { [self setTag: [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 tag]) { __enumerator = [[self tag] objectEnumerator]; while ( (__item = [__enumerator nextObject]) ) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "tag", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}tag."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}tag..."); #endif [__item writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}tag..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}tag."]; } } //end item iterator. } } @end /* implementation REALTYBARONNS0Tags (JAXB) */ #endif /* DEF_REALTYBARONNS0Tags_M */ #ifndef DEF_REALTYBARONNS0Image_M #define DEF_REALTYBARONNS0Image_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 REALTYBARONNS0Image /** * (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 { REALTYBARONNS0Image *_rEALTYBARONNS0Image; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _rEALTYBARONNS0Image = (REALTYBARONNS0Image *) [REALTYBARONNS0Image readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _rEALTYBARONNS0Image; } //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 REALTYBARONNS0Image */ /** * Internal, private interface for JAXB reading and writing. */ @interface REALTYBARONNS0Image (JAXB) @end /*interface REALTYBARONNS0Image (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation REALTYBARONNS0Image (JAXB) /** * Read an instance of REALTYBARONNS0Image from an XML reader. * * @param reader The reader. * @return An instance of REALTYBARONNS0Image defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { REALTYBARONNS0Image *_rEALTYBARONNS0Image = [[REALTYBARONNS0Image alloc] init]; NS_DURING { [_rEALTYBARONNS0Image initWithReader: reader]; } NS_HANDLER { _rEALTYBARONNS0Image = nil; [localException raise]; } NS_ENDHANDLER [_rEALTYBARONNS0Image autorelease]; return _rEALTYBARONNS0Image; } /** * Initialize this instance of REALTYBARONNS0Image 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 REALTYBARONNS0Image 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 REALTYBARONNS0Image from an XML reader. The element to be read is * "image". * * @param reader The XML reader. * @return The REALTYBARONNS0Image. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; REALTYBARONNS0Image *_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 = (REALTYBARONNS0Image *)[REALTYBARONNS0Image 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 REALTYBARONNS0Image. Expected element image. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0Image. Expected element image. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _image; } /** * Writes this REALTYBARONNS0Image 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 REALTYBARONNS0Image 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 REALTYBARONNS0Image (JAXB) */ #endif /* DEF_REALTYBARONNS0Image_M */ #ifndef DEF_REALTYBARONNS0Link_M #define DEF_REALTYBARONNS0Link_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 REALTYBARONNS0Link /** * (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 { REALTYBARONNS0Link *_rEALTYBARONNS0Link; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _rEALTYBARONNS0Link = (REALTYBARONNS0Link *) [REALTYBARONNS0Link readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _rEALTYBARONNS0Link; } //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 REALTYBARONNS0Link */ /** * Internal, private interface for JAXB reading and writing. */ @interface REALTYBARONNS0Link (JAXB) @end /*interface REALTYBARONNS0Link (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation REALTYBARONNS0Link (JAXB) /** * Read an instance of REALTYBARONNS0Link from an XML reader. * * @param reader The reader. * @return An instance of REALTYBARONNS0Link defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { REALTYBARONNS0Link *_rEALTYBARONNS0Link = [[REALTYBARONNS0Link alloc] init]; NS_DURING { [_rEALTYBARONNS0Link initWithReader: reader]; } NS_HANDLER { _rEALTYBARONNS0Link = nil; [localException raise]; } NS_ENDHANDLER [_rEALTYBARONNS0Link autorelease]; return _rEALTYBARONNS0Link; } /** * Initialize this instance of REALTYBARONNS0Link 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 REALTYBARONNS0Link 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 REALTYBARONNS0Link from an XML reader. The element to be read is * "link". * * @param reader The XML reader. * @return The REALTYBARONNS0Link. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; REALTYBARONNS0Link *_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 = (REALTYBARONNS0Link *)[REALTYBARONNS0Link 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 REALTYBARONNS0Link. Expected element link. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0Link. Expected element link. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _link; } /** * Writes this REALTYBARONNS0Link 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 REALTYBARONNS0Link 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 REALTYBARONNS0Link (JAXB) */ #endif /* DEF_REALTYBARONNS0Link_M */ #ifndef DEF_REALTYBARONNS0Messages_M #define DEF_REALTYBARONNS0Messages_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 REALTYBARONNS0Messages /** * 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 { REALTYBARONNS0Messages *_rEALTYBARONNS0Messages; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _rEALTYBARONNS0Messages = (REALTYBARONNS0Messages *) [REALTYBARONNS0Messages readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _rEALTYBARONNS0Messages; } //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 REALTYBARONNS0Messages */ /** * Internal, private interface for JAXB reading and writing. */ @interface REALTYBARONNS0Messages (JAXB) @end /*interface REALTYBARONNS0Messages (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation REALTYBARONNS0Messages (JAXB) /** * Read an instance of REALTYBARONNS0Messages from an XML reader. * * @param reader The reader. * @return An instance of REALTYBARONNS0Messages defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { REALTYBARONNS0Messages *_rEALTYBARONNS0Messages = [[REALTYBARONNS0Messages alloc] init]; NS_DURING { [_rEALTYBARONNS0Messages initWithReader: reader]; } NS_HANDLER { _rEALTYBARONNS0Messages = nil; [localException raise]; } NS_ENDHANDLER [_rEALTYBARONNS0Messages autorelease]; return _rEALTYBARONNS0Messages; } /** * Initialize this instance of REALTYBARONNS0Messages 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 REALTYBARONNS0Messages 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 REALTYBARONNS0Messages from an XML reader. The element to be read is * "messages". * * @param reader The XML reader. * @return The REALTYBARONNS0Messages. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; REALTYBARONNS0Messages *_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 = (REALTYBARONNS0Messages *)[REALTYBARONNS0Messages 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 REALTYBARONNS0Messages. Expected element messages. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0Messages. Expected element messages. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _messages; } /** * Writes this REALTYBARONNS0Messages 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 REALTYBARONNS0Messages 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 REALTYBARONNS0Messages (JAXB) */ #endif /* DEF_REALTYBARONNS0Messages_M */ #ifndef DEF_REALTYBARONNS0Slug_M #define DEF_REALTYBARONNS0Slug_M /** * Created by IntelliJ IDEA. User: marc Date: Nov 17, 2010 Time: 3:29:07 PM */ @implementation REALTYBARONNS0Slug /** * (no documentation provided) */ - (enum REALTYBARONNS0SlugType *) type { return _type; } /** * (no documentation provided) */ - (void) setType: (enum REALTYBARONNS0SlugType *) 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 { REALTYBARONNS0Slug *_rEALTYBARONNS0Slug; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _rEALTYBARONNS0Slug = (REALTYBARONNS0Slug *) [REALTYBARONNS0Slug readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _rEALTYBARONNS0Slug; } //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 REALTYBARONNS0Slug */ /** * Internal, private interface for JAXB reading and writing. */ @interface REALTYBARONNS0Slug (JAXB) @end /*interface REALTYBARONNS0Slug (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation REALTYBARONNS0Slug (JAXB) /** * Read an instance of REALTYBARONNS0Slug from an XML reader. * * @param reader The reader. * @return An instance of REALTYBARONNS0Slug defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { REALTYBARONNS0Slug *_rEALTYBARONNS0Slug = [[REALTYBARONNS0Slug alloc] init]; NS_DURING { [_rEALTYBARONNS0Slug initWithReader: reader]; } NS_HANDLER { _rEALTYBARONNS0Slug = nil; [localException raise]; } NS_ENDHANDLER [_rEALTYBARONNS0Slug autorelease]; return _rEALTYBARONNS0Slug; } /** * Initialize this instance of REALTYBARONNS0Slug 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 REALTYBARONNS0Slug 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 REALTYBARONNS0Slug from an XML reader. The element to be read is * "slug". * * @param reader The XML reader. * @return The REALTYBARONNS0Slug. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; REALTYBARONNS0Slug *_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 = (REALTYBARONNS0Slug *)[REALTYBARONNS0Slug 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 REALTYBARONNS0Slug. Expected element slug. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0Slug. Expected element slug. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _slug; } /** * Writes this REALTYBARONNS0Slug 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 REALTYBARONNS0Slug 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 = xmlTextReaderReadREALTYBARONNS0SlugTypeType(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 REALTYBARONNS0SlugType*) _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 = xmlTextWriterWriteREALTYBARONNS0SlugTypeType(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 REALTYBARONNS0Slug (JAXB) */ #endif /* DEF_REALTYBARONNS0Slug_M */ #ifndef DEF_REALTYBARONNS0Status_M #define DEF_REALTYBARONNS0Status_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 REALTYBARONNS0Status /** * (no documentation provided) */ - (int) code { return _code; } /** * (no documentation provided) */ - (void) setCode: (int) newCode { _code = newCode; } /** * (no documentation provided) */ - (REALTYBARONNS0Messages *) messages { return _messages; } /** * (no documentation provided) */ - (void) setMessages: (REALTYBARONNS0Messages *) newMessages { [newMessages retain]; [_messages release]; _messages = newMessages; } - (void) dealloc { [self setMessages: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { REALTYBARONNS0Status *_rEALTYBARONNS0Status; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _rEALTYBARONNS0Status = (REALTYBARONNS0Status *) [REALTYBARONNS0Status readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _rEALTYBARONNS0Status; } //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 REALTYBARONNS0Status */ /** * Internal, private interface for JAXB reading and writing. */ @interface REALTYBARONNS0Status (JAXB) @end /*interface REALTYBARONNS0Status (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation REALTYBARONNS0Status (JAXB) /** * Read an instance of REALTYBARONNS0Status from an XML reader. * * @param reader The reader. * @return An instance of REALTYBARONNS0Status defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { REALTYBARONNS0Status *_rEALTYBARONNS0Status = [[REALTYBARONNS0Status alloc] init]; NS_DURING { [_rEALTYBARONNS0Status initWithReader: reader]; } NS_HANDLER { _rEALTYBARONNS0Status = nil; [localException raise]; } NS_ENDHANDLER [_rEALTYBARONNS0Status autorelease]; return _rEALTYBARONNS0Status; } /** * Initialize this instance of REALTYBARONNS0Status 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 REALTYBARONNS0Status 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 REALTYBARONNS0Status from an XML reader. The element to be read is * "status". * * @param reader The XML reader. * @return The REALTYBARONNS0Status. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; REALTYBARONNS0Status *_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 = (REALTYBARONNS0Status *)[REALTYBARONNS0Status 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 REALTYBARONNS0Status. Expected element status. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0Status. Expected element status. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _status; } /** * Writes this REALTYBARONNS0Status 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 REALTYBARONNS0Status 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 = [REALTYBARONNS0Messages 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 REALTYBARONNS0Status (JAXB) */ #endif /* DEF_REALTYBARONNS0Status_M */ #ifndef DEF_REALTYBARONNS0Tool_M #define DEF_REALTYBARONNS0Tool_M /** * User: marc Date: Mar 18, 2010 Time: 9:04:24 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 REALTYBARONNS0Tool /** * (no documentation provided) */ - (NSString *) identifier { return _identifier; } /** * (no documentation provided) */ - (void) setIdentifier: (NSString *) newIdentifier { [newIdentifier retain]; [_identifier release]; _identifier = newIdentifier; } /** * link */ - (REALTYBARONNS0Link *) link { return _link; } /** * link */ - (void) setLink: (REALTYBARONNS0Link *) newLink { [newLink retain]; [_link release]; _link = newLink; } /** * (no documentation provided) */ - (REALTYBARONNS0Image *) image { return _image; } /** * (no documentation provided) */ - (void) setImage: (REALTYBARONNS0Image *) newImage { [newImage retain]; [_image release]; _image = newImage; } - (void) dealloc { [self setIdentifier: nil]; [self setLink: nil]; [self setImage: nil]; [super dealloc]; } @end /* implementation REALTYBARONNS0Tool */ /** * Internal, private interface for JAXB reading and writing. */ @interface REALTYBARONNS0Tool (JAXB) @end /*interface REALTYBARONNS0Tool (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation REALTYBARONNS0Tool (JAXB) /** * Read an instance of REALTYBARONNS0Tool from an XML reader. * * @param reader The reader. * @return An instance of REALTYBARONNS0Tool defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { REALTYBARONNS0Tool *_rEALTYBARONNS0Tool = [[REALTYBARONNS0Tool alloc] init]; NS_DURING { [_rEALTYBARONNS0Tool initWithReader: reader]; } NS_HANDLER { _rEALTYBARONNS0Tool = nil; [localException raise]; } NS_ENDHANDLER [_rEALTYBARONNS0Tool autorelease]; return _rEALTYBARONNS0Tool; } /** * Initialize this instance of REALTYBARONNS0Tool 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 REALTYBARONNS0Tool 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 [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 "link", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}link of type {}link."); #endif __child = [REALTYBARONNS0Link 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 "image", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}image of type {}image."); #endif __child = [REALTYBARONNS0Image readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}image of type {}image."); #endif [self setImage: __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 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 image]) { 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 [[self image] 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 /* implementation REALTYBARONNS0Tool (JAXB) */ #endif /* DEF_REALTYBARONNS0Tool_M */ #ifndef DEF_REALTYBARONNS0Timestamp_M #define DEF_REALTYBARONNS0Timestamp_M /** * Created by IntelliJ IDEA. User: marc Date: Aug 25, 2010 Time: 9:46:16 AM */ @implementation REALTYBARONNS0Timestamp /** * (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 { REALTYBARONNS0Timestamp *_rEALTYBARONNS0Timestamp; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _rEALTYBARONNS0Timestamp = (REALTYBARONNS0Timestamp *) [REALTYBARONNS0Timestamp readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _rEALTYBARONNS0Timestamp; } //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 REALTYBARONNS0Timestamp */ /** * Internal, private interface for JAXB reading and writing. */ @interface REALTYBARONNS0Timestamp (JAXB) @end /*interface REALTYBARONNS0Timestamp (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation REALTYBARONNS0Timestamp (JAXB) /** * Read an instance of REALTYBARONNS0Timestamp from an XML reader. * * @param reader The reader. * @return An instance of REALTYBARONNS0Timestamp defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { REALTYBARONNS0Timestamp *_rEALTYBARONNS0Timestamp = [[REALTYBARONNS0Timestamp alloc] init]; NS_DURING { [_rEALTYBARONNS0Timestamp initWithReader: reader]; } NS_HANDLER { _rEALTYBARONNS0Timestamp = nil; [localException raise]; } NS_ENDHANDLER [_rEALTYBARONNS0Timestamp autorelease]; return _rEALTYBARONNS0Timestamp; } /** * Initialize this instance of REALTYBARONNS0Timestamp 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 REALTYBARONNS0Timestamp 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 REALTYBARONNS0Timestamp from an XML reader. The element to be read is * "timestamp". * * @param reader The XML reader. * @return The REALTYBARONNS0Timestamp. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; REALTYBARONNS0Timestamp *_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 = (REALTYBARONNS0Timestamp *)[REALTYBARONNS0Timestamp 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 REALTYBARONNS0Timestamp. Expected element timestamp. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0Timestamp. Expected element timestamp. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _timestamp; } /** * Writes this REALTYBARONNS0Timestamp 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 REALTYBARONNS0Timestamp 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 REALTYBARONNS0Timestamp (JAXB) */ #endif /* DEF_REALTYBARONNS0Timestamp_M */ #ifndef DEF_REALTYBARONNS0GetUser_M #define DEF_REALTYBARONNS0GetUser_M /** * (no documentation provided) */ @implementation REALTYBARONNS0GetUser /** * (no documentation provided) */ - (REALTYBARONNS0User *) user { return _user; } /** * (no documentation provided) */ - (void) setUser: (REALTYBARONNS0User *) newUser { [newUser retain]; [_user release]; _user = newUser; } /** * (no documentation provided) */ - (REALTYBARONNS0Status *) status { return _status; } /** * (no documentation provided) */ - (void) setStatus: (REALTYBARONNS0Status *) newStatus { [newStatus retain]; [_status release]; _status = newStatus; } - (void) dealloc { [self setUser: nil]; [self setStatus: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { REALTYBARONNS0GetUser *_rEALTYBARONNS0GetUser; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _rEALTYBARONNS0GetUser = (REALTYBARONNS0GetUser *) [REALTYBARONNS0GetUser readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _rEALTYBARONNS0GetUser; } //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 REALTYBARONNS0GetUser */ /** * Internal, private interface for JAXB reading and writing. */ @interface REALTYBARONNS0GetUser (JAXB) @end /*interface REALTYBARONNS0GetUser (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation REALTYBARONNS0GetUser (JAXB) /** * Read an instance of REALTYBARONNS0GetUser from an XML reader. * * @param reader The reader. * @return An instance of REALTYBARONNS0GetUser defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { REALTYBARONNS0GetUser *_rEALTYBARONNS0GetUser = [[REALTYBARONNS0GetUser alloc] init]; NS_DURING { [_rEALTYBARONNS0GetUser initWithReader: reader]; } NS_HANDLER { _rEALTYBARONNS0GetUser = nil; [localException raise]; } NS_ENDHANDLER [_rEALTYBARONNS0GetUser autorelease]; return _rEALTYBARONNS0GetUser; } /** * Initialize this instance of REALTYBARONNS0GetUser 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 REALTYBARONNS0GetUser 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 REALTYBARONNS0GetUser from an XML reader. The element to be read is * "response". * * @param reader The XML reader. * @return The REALTYBARONNS0GetUser. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; REALTYBARONNS0GetUser *_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 = (REALTYBARONNS0GetUser *)[REALTYBARONNS0GetUser 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 REALTYBARONNS0GetUser. Expected element response. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0GetUser. Expected element response. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _getUser; } /** * Writes this REALTYBARONNS0GetUser 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 REALTYBARONNS0GetUser 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 = [REALTYBARONNS0User 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 = [REALTYBARONNS0Status 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 REALTYBARONNS0GetUser (JAXB) */ #endif /* DEF_REALTYBARONNS0GetUser_M */ #ifndef DEF_REALTYBARONNS0Review_M #define DEF_REALTYBARONNS0Review_M /** * (no documentation provided) */ @implementation REALTYBARONNS0Review /** * (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; } /** * (no documentation provided) */ - (NSString *) satisfied { return _satisfied; } /** * (no documentation provided) */ - (void) setSatisfied: (NSString *) newSatisfied { [newSatisfied retain]; [_satisfied release]; _satisfied = newSatisfied; } /** * (no documentation provided) */ - (NSDate *) date { return _date; } /** * (no documentation provided) */ - (void) setDate: (NSDate *) newDate { [newDate retain]; [_date release]; _date = newDate; } /** * (no documentation provided) */ - (NSString *) title { return _title; } /** * (no documentation provided) */ - (void) setTitle: (NSString *) newTitle { [newTitle retain]; [_title release]; _title = newTitle; } /** * (no documentation provided) */ - (REALTYBARONNS0Slugs *) slugs { return _slugs; } /** * (no documentation provided) */ - (void) setSlugs: (REALTYBARONNS0Slugs *) newSlugs { [newSlugs retain]; [_slugs release]; _slugs = newSlugs; } /** * (no documentation provided) */ - (REALTYBARONNS0Link *) link { return _link; } /** * (no documentation provided) */ - (void) setLink: (REALTYBARONNS0Link *) newLink { [newLink retain]; [_link release]; _link = newLink; } /** * (no documentation provided) */ - (NSString *) recommend { return _recommend; } /** * (no documentation provided) */ - (void) setRecommend: (NSString *) newRecommend { [newRecommend retain]; [_recommend release]; _recommend = newRecommend; } /** * (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 *) comment { return _comment; } /** * (no documentation provided) */ - (void) setComment: (NSString *) newComment { [newComment retain]; [_comment release]; _comment = newComment; } - (void) dealloc { [self setIdentifier: NULL]; [self setKey: nil]; [self setSatisfied: nil]; [self setDate: nil]; [self setTitle: nil]; [self setSlugs: nil]; [self setLink: nil]; [self setRecommend: nil]; [self setName: nil]; [self setEmail: nil]; [self setComment: nil]; [super dealloc]; } @end /* implementation REALTYBARONNS0Review */ /** * Internal, private interface for JAXB reading and writing. */ @interface REALTYBARONNS0Review (JAXB) @end /*interface REALTYBARONNS0Review (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation REALTYBARONNS0Review (JAXB) /** * Read an instance of REALTYBARONNS0Review from an XML reader. * * @param reader The reader. * @return An instance of REALTYBARONNS0Review defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { REALTYBARONNS0Review *_rEALTYBARONNS0Review = [[REALTYBARONNS0Review alloc] init]; NS_DURING { [_rEALTYBARONNS0Review initWithReader: reader]; } NS_HANDLER { _rEALTYBARONNS0Review = nil; [localException raise]; } NS_ENDHANDLER [_rEALTYBARONNS0Review autorelease]; return _rEALTYBARONNS0Review; } /** * Initialize this instance of REALTYBARONNS0Review 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 REALTYBARONNS0Review 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 "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 "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 "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 "slugs", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}slugs of type {}slugs."); #endif __child = [REALTYBARONNS0Slugs 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 "link", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}link of type {}link."); #endif __child = [REALTYBARONNS0Link 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 "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" 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 "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" 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 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 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 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 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 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 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."]; } } 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 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."]; } } } @end /* implementation REALTYBARONNS0Review (JAXB) */ #endif /* DEF_REALTYBARONNS0Review_M */ #ifndef DEF_REALTYBARONNS0User_M #define DEF_REALTYBARONNS0User_M /** * (no documentation provided) */ @implementation REALTYBARONNS0User /** * (no documentation provided) */ - (NSString *) email { return _email; } /** * (no documentation provided) */ - (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 REALTYBARONNS0User */ /** * Internal, private interface for JAXB reading and writing. */ @interface REALTYBARONNS0User (JAXB) @end /*interface REALTYBARONNS0User (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation REALTYBARONNS0User (JAXB) /** * Read an instance of REALTYBARONNS0User from an XML reader. * * @param reader The reader. * @return An instance of REALTYBARONNS0User defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { REALTYBARONNS0User *_rEALTYBARONNS0User = [[REALTYBARONNS0User alloc] init]; NS_DURING { [_rEALTYBARONNS0User initWithReader: reader]; } NS_HANDLER { _rEALTYBARONNS0User = nil; [localException raise]; } NS_ENDHANDLER [_rEALTYBARONNS0User autorelease]; return _rEALTYBARONNS0User; } /** * Initialize this instance of REALTYBARONNS0User 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 REALTYBARONNS0User 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 REALTYBARONNS0User (JAXB) */ #endif /* DEF_REALTYBARONNS0User_M */ #ifndef DEF_REALTYBARONNS0EditUser_M #define DEF_REALTYBARONNS0EditUser_M /** * (no documentation provided) */ @implementation REALTYBARONNS0EditUser /** * (no documentation provided) */ - (REALTYBARONNS0Links *) links { return _links; } /** * (no documentation provided) */ - (void) setLinks: (REALTYBARONNS0Links *) newLinks { [newLinks retain]; [_links release]; _links = newLinks; } /** * (no documentation provided) */ - (NSString *) login { return _login; } /** * (no documentation provided) */ - (void) setLogin: (NSString *) newLogin { [newLogin retain]; [_login release]; _login = newLogin; } /** * (no documentation provided) */ - (REALTYBARONNS0Status *) status { return _status; } /** * (no documentation provided) */ - (void) setStatus: (REALTYBARONNS0Status *) newStatus { [newStatus retain]; [_status release]; _status = newStatus; } /** * (no documentation provided) */ - (NSString *) identifier { return _identifier; } /** * (no documentation provided) */ - (void) setIdentifier: (NSString *) newIdentifier { [newIdentifier retain]; [_identifier release]; _identifier = newIdentifier; } - (void) dealloc { [self setLinks: nil]; [self setLogin: nil]; [self setStatus: nil]; [self setIdentifier: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { REALTYBARONNS0EditUser *_rEALTYBARONNS0EditUser; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _rEALTYBARONNS0EditUser = (REALTYBARONNS0EditUser *) [REALTYBARONNS0EditUser readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _rEALTYBARONNS0EditUser; } //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 REALTYBARONNS0EditUser */ /** * Internal, private interface for JAXB reading and writing. */ @interface REALTYBARONNS0EditUser (JAXB) @end /*interface REALTYBARONNS0EditUser (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation REALTYBARONNS0EditUser (JAXB) /** * Read an instance of REALTYBARONNS0EditUser from an XML reader. * * @param reader The reader. * @return An instance of REALTYBARONNS0EditUser defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { REALTYBARONNS0EditUser *_rEALTYBARONNS0EditUser = [[REALTYBARONNS0EditUser alloc] init]; NS_DURING { [_rEALTYBARONNS0EditUser initWithReader: reader]; } NS_HANDLER { _rEALTYBARONNS0EditUser = nil; [localException raise]; } NS_ENDHANDLER [_rEALTYBARONNS0EditUser autorelease]; return _rEALTYBARONNS0EditUser; } /** * Initialize this instance of REALTYBARONNS0EditUser 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 REALTYBARONNS0EditUser 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 REALTYBARONNS0EditUser from an XML reader. The element to be read is * "response". * * @param reader The XML reader. * @return The REALTYBARONNS0EditUser. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; REALTYBARONNS0EditUser *_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 = (REALTYBARONNS0EditUser *)[REALTYBARONNS0EditUser 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 REALTYBARONNS0EditUser. Expected element response. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0EditUser. Expected element response. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _editUser; } /** * Writes this REALTYBARONNS0EditUser 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 REALTYBARONNS0EditUser 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 "links", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}links of type {}links."); #endif __child = [REALTYBARONNS0Links 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 "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 "status", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}status of type {}status."); #endif __child = [REALTYBARONNS0Status 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 "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" 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 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 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 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 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."]; } } } @end /* implementation REALTYBARONNS0EditUser (JAXB) */ #endif /* DEF_REALTYBARONNS0EditUser_M */ #ifndef DEF_REALTYBARONNS0Slugs_M #define DEF_REALTYBARONNS0Slugs_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 REALTYBARONNS0Slugs /** * 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 { REALTYBARONNS0Slugs *_rEALTYBARONNS0Slugs; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _rEALTYBARONNS0Slugs = (REALTYBARONNS0Slugs *) [REALTYBARONNS0Slugs readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _rEALTYBARONNS0Slugs; } //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 REALTYBARONNS0Slugs */ /** * Internal, private interface for JAXB reading and writing. */ @interface REALTYBARONNS0Slugs (JAXB) @end /*interface REALTYBARONNS0Slugs (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation REALTYBARONNS0Slugs (JAXB) /** * Read an instance of REALTYBARONNS0Slugs from an XML reader. * * @param reader The reader. * @return An instance of REALTYBARONNS0Slugs defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { REALTYBARONNS0Slugs *_rEALTYBARONNS0Slugs = [[REALTYBARONNS0Slugs alloc] init]; NS_DURING { [_rEALTYBARONNS0Slugs initWithReader: reader]; } NS_HANDLER { _rEALTYBARONNS0Slugs = nil; [localException raise]; } NS_ENDHANDLER [_rEALTYBARONNS0Slugs autorelease]; return _rEALTYBARONNS0Slugs; } /** * Initialize this instance of REALTYBARONNS0Slugs 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 REALTYBARONNS0Slugs 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 REALTYBARONNS0Slugs from an XML reader. The element to be read is * "slugs". * * @param reader The XML reader. * @return The REALTYBARONNS0Slugs. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; REALTYBARONNS0Slugs *_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 = (REALTYBARONNS0Slugs *)[REALTYBARONNS0Slugs 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 REALTYBARONNS0Slugs. Expected element slugs. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0Slugs. Expected element slugs. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _slugs; } /** * Writes this REALTYBARONNS0Slugs 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 REALTYBARONNS0Slugs 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 = [REALTYBARONNS0Slug 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 REALTYBARONNS0Slugs (JAXB) */ #endif /* DEF_REALTYBARONNS0Slugs_M */ #ifndef DEF_REALTYBARONNS0Links_M #define DEF_REALTYBARONNS0Links_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 REALTYBARONNS0Links /** * 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 { REALTYBARONNS0Links *_rEALTYBARONNS0Links; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _rEALTYBARONNS0Links = (REALTYBARONNS0Links *) [REALTYBARONNS0Links readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _rEALTYBARONNS0Links; } //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 REALTYBARONNS0Links */ /** * Internal, private interface for JAXB reading and writing. */ @interface REALTYBARONNS0Links (JAXB) @end /*interface REALTYBARONNS0Links (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation REALTYBARONNS0Links (JAXB) /** * Read an instance of REALTYBARONNS0Links from an XML reader. * * @param reader The reader. * @return An instance of REALTYBARONNS0Links defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { REALTYBARONNS0Links *_rEALTYBARONNS0Links = [[REALTYBARONNS0Links alloc] init]; NS_DURING { [_rEALTYBARONNS0Links initWithReader: reader]; } NS_HANDLER { _rEALTYBARONNS0Links = nil; [localException raise]; } NS_ENDHANDLER [_rEALTYBARONNS0Links autorelease]; return _rEALTYBARONNS0Links; } /** * Initialize this instance of REALTYBARONNS0Links 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 REALTYBARONNS0Links 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 REALTYBARONNS0Links from an XML reader. The element to be read is * "links". * * @param reader The XML reader. * @return The REALTYBARONNS0Links. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; REALTYBARONNS0Links *_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 = (REALTYBARONNS0Links *)[REALTYBARONNS0Links 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 REALTYBARONNS0Links. Expected element links. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0Links. Expected element links. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _links; } /** * Writes this REALTYBARONNS0Links 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 REALTYBARONNS0Links 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 = [REALTYBARONNS0Link 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 REALTYBARONNS0Links (JAXB) */ #endif /* DEF_REALTYBARONNS0Links_M */ #ifndef DEF_REALTYBARONNS0Images_M #define DEF_REALTYBARONNS0Images_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 REALTYBARONNS0Images /** * 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 { REALTYBARONNS0Images *_rEALTYBARONNS0Images; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _rEALTYBARONNS0Images = (REALTYBARONNS0Images *) [REALTYBARONNS0Images readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _rEALTYBARONNS0Images; } //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 REALTYBARONNS0Images */ /** * Internal, private interface for JAXB reading and writing. */ @interface REALTYBARONNS0Images (JAXB) @end /*interface REALTYBARONNS0Images (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation REALTYBARONNS0Images (JAXB) /** * Read an instance of REALTYBARONNS0Images from an XML reader. * * @param reader The reader. * @return An instance of REALTYBARONNS0Images defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { REALTYBARONNS0Images *_rEALTYBARONNS0Images = [[REALTYBARONNS0Images alloc] init]; NS_DURING { [_rEALTYBARONNS0Images initWithReader: reader]; } NS_HANDLER { _rEALTYBARONNS0Images = nil; [localException raise]; } NS_ENDHANDLER [_rEALTYBARONNS0Images autorelease]; return _rEALTYBARONNS0Images; } /** * Initialize this instance of REALTYBARONNS0Images 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 REALTYBARONNS0Images 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 REALTYBARONNS0Images from an XML reader. The element to be read is * "images". * * @param reader The XML reader. * @return The REALTYBARONNS0Images. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; REALTYBARONNS0Images *_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 = (REALTYBARONNS0Images *)[REALTYBARONNS0Images 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 REALTYBARONNS0Images. Expected element images. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0Images. Expected element images. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _images; } /** * Writes this REALTYBARONNS0Images 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 REALTYBARONNS0Images 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 = [REALTYBARONNS0Image 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 REALTYBARONNS0Images (JAXB) */ #endif /* DEF_REALTYBARONNS0Images_M */ #ifndef DEF_REALTYBARONNS0Content_M #define DEF_REALTYBARONNS0Content_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 REALTYBARONNS0Content /** * (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 { REALTYBARONNS0Content *_rEALTYBARONNS0Content; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _rEALTYBARONNS0Content = (REALTYBARONNS0Content *) [REALTYBARONNS0Content readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _rEALTYBARONNS0Content; } //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 REALTYBARONNS0Content */ /** * Internal, private interface for JAXB reading and writing. */ @interface REALTYBARONNS0Content (JAXB) @end /*interface REALTYBARONNS0Content (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation REALTYBARONNS0Content (JAXB) /** * Read an instance of REALTYBARONNS0Content from an XML reader. * * @param reader The reader. * @return An instance of REALTYBARONNS0Content defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { REALTYBARONNS0Content *_rEALTYBARONNS0Content = [[REALTYBARONNS0Content alloc] init]; NS_DURING { [_rEALTYBARONNS0Content initWithReader: reader]; } NS_HANDLER { _rEALTYBARONNS0Content = nil; [localException raise]; } NS_ENDHANDLER [_rEALTYBARONNS0Content autorelease]; return _rEALTYBARONNS0Content; } /** * Initialize this instance of REALTYBARONNS0Content 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 REALTYBARONNS0Content 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 REALTYBARONNS0Content from an XML reader. The element to be read is * "content". * * @param reader The XML reader. * @return The REALTYBARONNS0Content. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; REALTYBARONNS0Content *_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 = (REALTYBARONNS0Content *)[REALTYBARONNS0Content 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 REALTYBARONNS0Content. Expected element content. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0Content. Expected element content. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _content; } /** * Writes this REALTYBARONNS0Content 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 REALTYBARONNS0Content 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 REALTYBARONNS0Content (JAXB) */ #endif /* DEF_REALTYBARONNS0Content_M */ #ifndef DEF_REALTYBARONNS0Tag_M #define DEF_REALTYBARONNS0Tag_M /** * User: marc Date: Dec 11, 2009 Time: 6:24:03 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 REALTYBARONNS0Tag /** * name */ - (NSString *) value { return _value; } /** * name */ - (void) setValue: (NSString *) newValue { [newValue retain]; [_value release]; _value = newValue; } - (void) dealloc { [self setValue: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { REALTYBARONNS0Tag *_rEALTYBARONNS0Tag; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _rEALTYBARONNS0Tag = (REALTYBARONNS0Tag *) [REALTYBARONNS0Tag readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _rEALTYBARONNS0Tag; } //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 REALTYBARONNS0Tag */ /** * Internal, private interface for JAXB reading and writing. */ @interface REALTYBARONNS0Tag (JAXB) @end /*interface REALTYBARONNS0Tag (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation REALTYBARONNS0Tag (JAXB) /** * Read an instance of REALTYBARONNS0Tag from an XML reader. * * @param reader The reader. * @return An instance of REALTYBARONNS0Tag defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { REALTYBARONNS0Tag *_rEALTYBARONNS0Tag = [[REALTYBARONNS0Tag alloc] init]; NS_DURING { [_rEALTYBARONNS0Tag initWithReader: reader]; } NS_HANDLER { _rEALTYBARONNS0Tag = nil; [localException raise]; } NS_ENDHANDLER [_rEALTYBARONNS0Tag autorelease]; return _rEALTYBARONNS0Tag; } /** * Initialize this instance of REALTYBARONNS0Tag 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 REALTYBARONNS0Tag 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 REALTYBARONNS0Tag from an XML reader. The element to be read is * "tag". * * @param reader The XML reader. * @return The REALTYBARONNS0Tag. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; REALTYBARONNS0Tag *_tag = 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 tag."]; } } if (xmlStrcmp(BAD_CAST "tag", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}tag."); #endif _tag = (REALTYBARONNS0Tag *)[REALTYBARONNS0Tag readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}tag."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0Tag. Expected element tag. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0Tag. Expected element tag. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _tag; } /** * Writes this REALTYBARONNS0Tag to XML under element name "tag". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _tag The Tag to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this REALTYBARONNS0Tag 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 "tag", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}tag. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}tag for root element {}tag..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}tag for root element {}tag..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}tag. 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 { #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]; } //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 REALTYBARONNS0Tag (JAXB) */ #endif /* DEF_REALTYBARONNS0Tag_M */ #ifndef DEF_REALTYBARONNS0Question_M #define DEF_REALTYBARONNS0Question_M /** * User: marc Date: May 12, 2009 Time: 1:49:47 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 REALTYBARONNS0Question /** * (no documentation provided) */ - (NSDate *) creation { return _creation; } /** * (no documentation provided) */ - (void) setCreation: (NSDate *) newCreation { [newCreation retain]; [_creation release]; _creation = newCreation; } /** * (no documentation provided) */ - (enum REALTYBARONNS0ApprovalStatus *) status { return _status; } /** * (no documentation provided) */ - (void) setStatus: (enum REALTYBARONNS0ApprovalStatus *) newStatus { if (_status != NULL) { free(_status); } _status = newStatus; } /** * (no documentation provided) */ - (NSDate *) expiration { return _expiration; } /** * (no documentation provided) */ - (void) setExpiration: (NSDate *) newExpiration { [newExpiration retain]; [_expiration release]; _expiration = newExpiration; } /** * (no documentation provided) */ - (int *) identifier { return _identifier; } /** * (no documentation provided) */ - (void) setIdentifier: (int *) newIdentifier { if (_identifier != NULL) { free(_identifier); } _identifier = newIdentifier; } /** * (no documentation provided) */ - (enum REALTYBARONNS0LocationContext *) context { return _context; } /** * (no documentation provided) */ - (void) setContext: (enum REALTYBARONNS0LocationContext *) newContext { if (_context != NULL) { free(_context); } _context = newContext; } /** * (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; } /** * tags */ - (REALTYBARONNS0Tags *) tags { return _tags; } /** * tags */ - (void) setTags: (REALTYBARONNS0Tags *) newTags { [newTags retain]; [_tags release]; _tags = newTags; } /** * (no documentation provided) */ - (REALTYBARONNS0Links *) links { return _links; } /** * (no documentation provided) */ - (void) setLinks: (REALTYBARONNS0Links *) newLinks { [newLinks retain]; [_links release]; _links = newLinks; } /** * (no documentation provided) */ - (REALTYBARONNS0Slugs *) slugs { return _slugs; } /** * (no documentation provided) */ - (void) setSlugs: (REALTYBARONNS0Slugs *) newSlugs { [newSlugs retain]; [_slugs release]; _slugs = newSlugs; } /** * (no documentation provided) */ - (NSString *) body { return _body; } /** * (no documentation provided) */ - (void) setBody: (NSString *) newBody { [newBody retain]; [_body release]; _body = newBody; } /** * (no documentation provided) */ - (NSString *) title { return _title; } /** * (no documentation provided) */ - (void) setTitle: (NSString *) newTitle { [newTitle retain]; [_title release]; _title = newTitle; } /** * (no documentation provided) */ - (NSString *) fname { return _fname; } /** * (no documentation provided) */ - (void) setFname: (NSString *) newFname { [newFname retain]; [_fname release]; _fname = newFname; } /** * (no documentation provided) */ - (NSString *) lname { return _lname; } /** * (no documentation provided) */ - (void) setLname: (NSString *) newLname { [newLname retain]; [_lname release]; _lname = newLname; } /** * (no documentation provided) */ - (NSString *) email { return _email; } /** * (no documentation provided) */ - (void) setEmail: (NSString *) newEmail { [newEmail retain]; [_email release]; _email = newEmail; } /** * (no documentation provided) */ - (NSString *) location { return _location; } /** * (no documentation provided) */ - (void) setLocation: (NSString *) newLocation { [newLocation retain]; [_location release]; _location = newLocation; } /** * (no documentation provided) */ - (NSString *) countdown { return _countdown; } /** * (no documentation provided) */ - (void) setCountdown: (NSString *) newCountdown { [newCountdown retain]; [_countdown release]; _countdown = newCountdown; } /** * (no documentation provided) */ - (int *) answers { return _answers; } /** * (no documentation provided) */ - (void) setAnswers: (int *) newAnswers { if (_answers != NULL) { free(_answers); } _answers = newAnswers; } - (void) dealloc { [self setCreation: nil]; [self setStatus: NULL]; [self setExpiration: nil]; [self setIdentifier: NULL]; [self setContext: NULL]; [self setLongitude: nil]; [self setLatitude: nil]; [self setKey: nil]; [self setTags: nil]; [self setLinks: nil]; [self setSlugs: nil]; [self setBody: nil]; [self setTitle: nil]; [self setFname: nil]; [self setLname: nil]; [self setEmail: nil]; [self setLocation: nil]; [self setCountdown: nil]; [self setAnswers: NULL]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { REALTYBARONNS0Question *_rEALTYBARONNS0Question; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _rEALTYBARONNS0Question = (REALTYBARONNS0Question *) [REALTYBARONNS0Question readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _rEALTYBARONNS0Question; } //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 REALTYBARONNS0Question */ /** * Internal, private interface for JAXB reading and writing. */ @interface REALTYBARONNS0Question (JAXB) @end /*interface REALTYBARONNS0Question (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation REALTYBARONNS0Question (JAXB) /** * Read an instance of REALTYBARONNS0Question from an XML reader. * * @param reader The reader. * @return An instance of REALTYBARONNS0Question defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { REALTYBARONNS0Question *_rEALTYBARONNS0Question = [[REALTYBARONNS0Question alloc] init]; NS_DURING { [_rEALTYBARONNS0Question initWithReader: reader]; } NS_HANDLER { _rEALTYBARONNS0Question = nil; [localException raise]; } NS_ENDHANDLER [_rEALTYBARONNS0Question autorelease]; return _rEALTYBARONNS0Question; } /** * Initialize this instance of REALTYBARONNS0Question 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 REALTYBARONNS0Question 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 REALTYBARONNS0Question from an XML reader. The element to be read is * "question". * * @param reader The XML reader. * @return The REALTYBARONNS0Question. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; REALTYBARONNS0Question *_question = 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 question."]; } } if (xmlStrcmp(BAD_CAST "question", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}question."); #endif _question = (REALTYBARONNS0Question *)[REALTYBARONNS0Question readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}question."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0Question. Expected element question. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0Question. Expected element question. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _question; } /** * Writes this REALTYBARONNS0Question to XML under element name "question". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _question The Question to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this REALTYBARONNS0Question 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 "question", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}question. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}question for root element {}question..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}question for root element {}question..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}question. 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 "creation", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}creation..."); #endif [self setCreation: (NSDate*) [NSDate readXMLType: reader]]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}creation..."); #endif return YES; } if ((xmlStrcmp(BAD_CAST "status", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}status..."); #endif _child_accessor = xmlTextReaderReadREALTYBARONNS0ApprovalStatusType(reader); if (_child_accessor == NULL) { //panic: unable to read the attribute value for some reason. [NSException raise: @"XMLReadError" format: @"Error reading attribute {}status."]; } [self setStatus: ((enum REALTYBARONNS0ApprovalStatus*) _child_accessor)]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}status..."); #endif return YES; } if ((xmlStrcmp(BAD_CAST "expiration", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}expiration..."); #endif [self setExpiration: (NSDate*) [NSDate readXMLType: reader]]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}expiration..."); #endif 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 "context", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}context..."); #endif _child_accessor = xmlTextReaderReadREALTYBARONNS0LocationContextType(reader); if (_child_accessor == NULL) { //panic: unable to read the attribute value for some reason. [NSException raise: @"XMLReadError" format: @"Error reading attribute {}context."]; } [self setContext: ((enum REALTYBARONNS0LocationContext*) _child_accessor)]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}context..."); #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 "tags", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}tags of type {}tags."); #endif __child = [REALTYBARONNS0Tags readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}tags of type {}tags."); #endif [self setTags: __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 = [REALTYBARONNS0Links 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 "slugs", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}slugs of type {}slugs."); #endif __child = [REALTYBARONNS0Slugs 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 "fname", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}fname of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}fname of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setFname: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "lname", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}lname of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}lname of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setLname: __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 "location", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}location of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}location of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setLocation: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "countdown", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}countdown of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}countdown of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setCountdown: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "answers", 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 setAnswers: ((int*) _child_accessor)]; 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 creation]) { status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "creation", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}creation."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}creation..."); #endif [[self creation] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}creation..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}creation."]; } } if ([self status] != NULL) { status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "status", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}status."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}status..."); #endif status = xmlTextWriterWriteREALTYBARONNS0ApprovalStatusType(writer, [self status]); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing attribute {}status."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}status..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}status."]; } } if ([self expiration]) { status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "expiration", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}expiration."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}expiration..."); #endif [[self expiration] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}expiration..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}expiration."]; } } 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 context] != NULL) { status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "context", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}context."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}context..."); #endif status = xmlTextWriterWriteREALTYBARONNS0LocationContextType(writer, [self context]); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing attribute {}context."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}context..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}context."]; } } 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 tags]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "tags", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}tags."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}tags..."); #endif [[self tags] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}tags..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}tags."]; } } 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 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 fname]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "fname", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}fname."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}fname..."); #endif [[self fname] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}fname..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}fname."]; } } if ([self lname]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "lname", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}lname."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}lname..."); #endif [[self lname] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}lname..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}lname."]; } } 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 location]) { 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 [[self location] 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."]; } } if ([self countdown]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "countdown", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}countdown."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}countdown..."); #endif [[self countdown] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}countdown..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}countdown."]; } } if ([self answers] != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "answers", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}answers."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}answers..."); #endif status = xmlTextWriterWriteIntType(writer, [self answers]); #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}answers..."); #endif if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing child element {}answers."]; } status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}answers."]; } } } @end /* implementation REALTYBARONNS0Question (JAXB) */ #endif /* DEF_REALTYBARONNS0Question_M */ #ifndef DEF_REALTYBARONNS0MonitorQuestions_M #define DEF_REALTYBARONNS0MonitorQuestions_M /** * User: marc Date: May 21, 2009 Time: 5:18:27 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 REALTYBARONNS0MonitorQuestions /** * links */ - (REALTYBARONNS0Links *) links { return _links; } /** * links */ - (void) setLinks: (REALTYBARONNS0Links *) newLinks { [newLinks retain]; [_links release]; _links = newLinks; } /** * status */ - (REALTYBARONNS0Status *) status { return _status; } /** * status */ - (void) setStatus: (REALTYBARONNS0Status *) newStatus { [newStatus retain]; [_status release]; _status = newStatus; } /** * counts */ - (REALTYBARONNS0AnswerCounts *) counts { return _counts; } /** * counts */ - (void) setCounts: (REALTYBARONNS0AnswerCounts *) newCounts { [newCounts retain]; [_counts release]; _counts = newCounts; } /** * statuses */ - (REALTYBARONNS0QuestionApprovals *) approvals { return _approvals; } /** * statuses */ - (void) setApprovals: (REALTYBARONNS0QuestionApprovals *) newApprovals { [newApprovals retain]; [_approvals release]; _approvals = newApprovals; } - (void) dealloc { [self setLinks: nil]; [self setStatus: nil]; [self setCounts: nil]; [self setApprovals: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { REALTYBARONNS0MonitorQuestions *_rEALTYBARONNS0MonitorQuestions; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _rEALTYBARONNS0MonitorQuestions = (REALTYBARONNS0MonitorQuestions *) [REALTYBARONNS0MonitorQuestions readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _rEALTYBARONNS0MonitorQuestions; } //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 REALTYBARONNS0MonitorQuestions */ /** * Internal, private interface for JAXB reading and writing. */ @interface REALTYBARONNS0MonitorQuestions (JAXB) @end /*interface REALTYBARONNS0MonitorQuestions (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation REALTYBARONNS0MonitorQuestions (JAXB) /** * Read an instance of REALTYBARONNS0MonitorQuestions from an XML reader. * * @param reader The reader. * @return An instance of REALTYBARONNS0MonitorQuestions defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { REALTYBARONNS0MonitorQuestions *_rEALTYBARONNS0MonitorQuestions = [[REALTYBARONNS0MonitorQuestions alloc] init]; NS_DURING { [_rEALTYBARONNS0MonitorQuestions initWithReader: reader]; } NS_HANDLER { _rEALTYBARONNS0MonitorQuestions = nil; [localException raise]; } NS_ENDHANDLER [_rEALTYBARONNS0MonitorQuestions autorelease]; return _rEALTYBARONNS0MonitorQuestions; } /** * Initialize this instance of REALTYBARONNS0MonitorQuestions 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 REALTYBARONNS0MonitorQuestions 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 REALTYBARONNS0MonitorQuestions from an XML reader. The element to be read is * "response". * * @param reader The XML reader. * @return The REALTYBARONNS0MonitorQuestions. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; REALTYBARONNS0MonitorQuestions *_monitorQuestions = 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 _monitorQuestions = (REALTYBARONNS0MonitorQuestions *)[REALTYBARONNS0MonitorQuestions 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 REALTYBARONNS0MonitorQuestions. Expected element response. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0MonitorQuestions. Expected element response. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _monitorQuestions; } /** * Writes this REALTYBARONNS0MonitorQuestions to XML under element name "response". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _monitorQuestions The MonitorQuestions to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this REALTYBARONNS0MonitorQuestions 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 {}monitorQuestions for root element {}response..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}monitorQuestions 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 "links", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}links of type {}links."); #endif __child = [REALTYBARONNS0Links 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 = [REALTYBARONNS0Status 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 "counts", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}counts of type {}answerCounts."); #endif __child = [REALTYBARONNS0AnswerCounts readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}counts of type {}answerCounts."); #endif [self setCounts: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "approvals", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}approvals of type {}questionApprovals."); #endif __child = [REALTYBARONNS0QuestionApprovals readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}approvals of type {}questionApprovals."); #endif [self setApprovals: __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 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."]; } } if ([self counts]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "counts", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}counts."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}counts..."); #endif [[self counts] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}counts..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}counts."]; } } if ([self approvals]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "approvals", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}approvals."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}approvals..."); #endif [[self approvals] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}approvals..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}approvals."]; } } } @end /* implementation REALTYBARONNS0MonitorQuestions (JAXB) */ #endif /* DEF_REALTYBARONNS0MonitorQuestions_M */ #ifndef DEF_REALTYBARONNS0GetQuestions_M #define DEF_REALTYBARONNS0GetQuestions_M /** * User: marc Date: May 21, 2009 Time: 5:18:27 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 REALTYBARONNS0GetQuestions /** * links */ - (REALTYBARONNS0Links *) links { return _links; } /** * links */ - (void) setLinks: (REALTYBARONNS0Links *) newLinks { [newLinks retain]; [_links release]; _links = newLinks; } /** * (no documentation provided) */ - (REALTYBARONNS0Status *) status { return _status; } /** * (no documentation provided) */ - (void) setStatus: (REALTYBARONNS0Status *) newStatus { [newStatus retain]; [_status release]; _status = newStatus; } /** * (no documentation provided) */ - (NSArray *) question { return _question; } /** * (no documentation provided) */ - (void) setQuestion: (NSArray *) newQuestion { [newQuestion retain]; [_question release]; _question = newQuestion; } - (void) dealloc { [self setLinks: nil]; [self setStatus: nil]; [self setQuestion: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { REALTYBARONNS0GetQuestions *_rEALTYBARONNS0GetQuestions; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _rEALTYBARONNS0GetQuestions = (REALTYBARONNS0GetQuestions *) [REALTYBARONNS0GetQuestions readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _rEALTYBARONNS0GetQuestions; } //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 REALTYBARONNS0GetQuestions */ /** * Internal, private interface for JAXB reading and writing. */ @interface REALTYBARONNS0GetQuestions (JAXB) @end /*interface REALTYBARONNS0GetQuestions (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation REALTYBARONNS0GetQuestions (JAXB) /** * Read an instance of REALTYBARONNS0GetQuestions from an XML reader. * * @param reader The reader. * @return An instance of REALTYBARONNS0GetQuestions defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { REALTYBARONNS0GetQuestions *_rEALTYBARONNS0GetQuestions = [[REALTYBARONNS0GetQuestions alloc] init]; NS_DURING { [_rEALTYBARONNS0GetQuestions initWithReader: reader]; } NS_HANDLER { _rEALTYBARONNS0GetQuestions = nil; [localException raise]; } NS_ENDHANDLER [_rEALTYBARONNS0GetQuestions autorelease]; return _rEALTYBARONNS0GetQuestions; } /** * Initialize this instance of REALTYBARONNS0GetQuestions 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 REALTYBARONNS0GetQuestions 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 REALTYBARONNS0GetQuestions from an XML reader. The element to be read is * "response". * * @param reader The XML reader. * @return The REALTYBARONNS0GetQuestions. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; REALTYBARONNS0GetQuestions *_getQuestions = 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 _getQuestions = (REALTYBARONNS0GetQuestions *)[REALTYBARONNS0GetQuestions 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 REALTYBARONNS0GetQuestions. Expected element response. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0GetQuestions. Expected element response. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _getQuestions; } /** * Writes this REALTYBARONNS0GetQuestions to XML under element name "response". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _getQuestions The GetQuestions to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this REALTYBARONNS0GetQuestions 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 {}getQuestions for root element {}response..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}getQuestions 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 "links", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}links of type {}links."); #endif __child = [REALTYBARONNS0Links 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 = [REALTYBARONNS0Status 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 "question", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}question of type {}question."); #endif __child = [REALTYBARONNS0Question readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}question of type {}question."); #endif if ([self question]) { [self setQuestion: [[self question] arrayByAddingObject: __child]]; } else { [self setQuestion: [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 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."]; } } if ([self question]) { __enumerator = [[self question] objectEnumerator]; while ( (__item = [__enumerator nextObject]) ) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "question", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}question."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}question..."); #endif [__item writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}question..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}question."]; } } //end item iterator. } } @end /* implementation REALTYBARONNS0GetQuestions (JAXB) */ #endif /* DEF_REALTYBARONNS0GetQuestions_M */ #ifndef DEF_REALTYBARONNS0GetAnswers_M #define DEF_REALTYBARONNS0GetAnswers_M /** * User: marc Date: May 21, 2009 Time: 5:18:27 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 REALTYBARONNS0GetAnswers /** * links */ - (REALTYBARONNS0Links *) links { return _links; } /** * links */ - (void) setLinks: (REALTYBARONNS0Links *) newLinks { [newLinks retain]; [_links release]; _links = newLinks; } /** * (no documentation provided) */ - (REALTYBARONNS0Status *) status { return _status; } /** * (no documentation provided) */ - (void) setStatus: (REALTYBARONNS0Status *) newStatus { [newStatus retain]; [_status release]; _status = newStatus; } /** * (no documentation provided) */ - (REALTYBARONNS0Answers *) answers { return _answers; } /** * (no documentation provided) */ - (void) setAnswers: (REALTYBARONNS0Answers *) newAnswers { [newAnswers retain]; [_answers release]; _answers = newAnswers; } /** * (no documentation provided) */ - (REALTYBARONNS0Question *) question { return _question; } /** * (no documentation provided) */ - (void) setQuestion: (REALTYBARONNS0Question *) newQuestion { [newQuestion retain]; [_question release]; _question = newQuestion; } - (void) dealloc { [self setLinks: nil]; [self setStatus: nil]; [self setAnswers: nil]; [self setQuestion: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { REALTYBARONNS0GetAnswers *_rEALTYBARONNS0GetAnswers; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _rEALTYBARONNS0GetAnswers = (REALTYBARONNS0GetAnswers *) [REALTYBARONNS0GetAnswers readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _rEALTYBARONNS0GetAnswers; } //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 REALTYBARONNS0GetAnswers */ /** * Internal, private interface for JAXB reading and writing. */ @interface REALTYBARONNS0GetAnswers (JAXB) @end /*interface REALTYBARONNS0GetAnswers (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation REALTYBARONNS0GetAnswers (JAXB) /** * Read an instance of REALTYBARONNS0GetAnswers from an XML reader. * * @param reader The reader. * @return An instance of REALTYBARONNS0GetAnswers defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { REALTYBARONNS0GetAnswers *_rEALTYBARONNS0GetAnswers = [[REALTYBARONNS0GetAnswers alloc] init]; NS_DURING { [_rEALTYBARONNS0GetAnswers initWithReader: reader]; } NS_HANDLER { _rEALTYBARONNS0GetAnswers = nil; [localException raise]; } NS_ENDHANDLER [_rEALTYBARONNS0GetAnswers autorelease]; return _rEALTYBARONNS0GetAnswers; } /** * Initialize this instance of REALTYBARONNS0GetAnswers 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 REALTYBARONNS0GetAnswers 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 REALTYBARONNS0GetAnswers from an XML reader. The element to be read is * "response". * * @param reader The XML reader. * @return The REALTYBARONNS0GetAnswers. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; REALTYBARONNS0GetAnswers *_getAnswers = 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 _getAnswers = (REALTYBARONNS0GetAnswers *)[REALTYBARONNS0GetAnswers 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 REALTYBARONNS0GetAnswers. Expected element response. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0GetAnswers. Expected element response. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _getAnswers; } /** * Writes this REALTYBARONNS0GetAnswers to XML under element name "response". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _getAnswers The GetAnswers to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this REALTYBARONNS0GetAnswers 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 {}getAnswers for root element {}response..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}getAnswers 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 "links", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}links of type {}links."); #endif __child = [REALTYBARONNS0Links 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 = [REALTYBARONNS0Status 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 "answers", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}answers of type {}answers."); #endif __child = [REALTYBARONNS0Answers readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}answers of type {}answers."); #endif [self setAnswers: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "question", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}question of type {}question."); #endif __child = [REALTYBARONNS0Question readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}question of type {}question."); #endif [self setQuestion: __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 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."]; } } if ([self answers]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "answers", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}answers."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}answers..."); #endif [[self answers] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}answers..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}answers."]; } } if ([self question]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "question", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}question."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}question..."); #endif [[self question] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}question..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}question."]; } } } @end /* implementation REALTYBARONNS0GetAnswers (JAXB) */ #endif /* DEF_REALTYBARONNS0GetAnswers_M */ #ifndef DEF_REALTYBARONNS0FindLocations_M #define DEF_REALTYBARONNS0FindLocations_M /** * User: marc Date: May 21, 2009 Time: 5:18:27 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 REALTYBARONNS0FindLocations /** * (no documentation provided) */ - (REALTYBARONNS0Status *) status { return _status; } /** * (no documentation provided) */ - (void) setStatus: (REALTYBARONNS0Status *) newStatus { [newStatus retain]; [_status release]; _status = newStatus; } /** * (no documentation provided) */ - (REALTYBARONNS0Locations *) locations { return _locations; } /** * (no documentation provided) */ - (void) setLocations: (REALTYBARONNS0Locations *) newLocations { [newLocations retain]; [_locations release]; _locations = newLocations; } - (void) dealloc { [self setStatus: nil]; [self setLocations: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { REALTYBARONNS0FindLocations *_rEALTYBARONNS0FindLocations; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _rEALTYBARONNS0FindLocations = (REALTYBARONNS0FindLocations *) [REALTYBARONNS0FindLocations readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _rEALTYBARONNS0FindLocations; } //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 REALTYBARONNS0FindLocations */ /** * Internal, private interface for JAXB reading and writing. */ @interface REALTYBARONNS0FindLocations (JAXB) @end /*interface REALTYBARONNS0FindLocations (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation REALTYBARONNS0FindLocations (JAXB) /** * Read an instance of REALTYBARONNS0FindLocations from an XML reader. * * @param reader The reader. * @return An instance of REALTYBARONNS0FindLocations defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { REALTYBARONNS0FindLocations *_rEALTYBARONNS0FindLocations = [[REALTYBARONNS0FindLocations alloc] init]; NS_DURING { [_rEALTYBARONNS0FindLocations initWithReader: reader]; } NS_HANDLER { _rEALTYBARONNS0FindLocations = nil; [localException raise]; } NS_ENDHANDLER [_rEALTYBARONNS0FindLocations autorelease]; return _rEALTYBARONNS0FindLocations; } /** * Initialize this instance of REALTYBARONNS0FindLocations 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 REALTYBARONNS0FindLocations 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 REALTYBARONNS0FindLocations from an XML reader. The element to be read is * "response". * * @param reader The XML reader. * @return The REALTYBARONNS0FindLocations. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; REALTYBARONNS0FindLocations *_findLocations = 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 _findLocations = (REALTYBARONNS0FindLocations *)[REALTYBARONNS0FindLocations 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 REALTYBARONNS0FindLocations. Expected element response. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0FindLocations. Expected element response. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _findLocations; } /** * Writes this REALTYBARONNS0FindLocations to XML under element name "response". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _findLocations The FindLocations to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this REALTYBARONNS0FindLocations 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 {}findLocations for root element {}response..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}findLocations 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 = [REALTYBARONNS0Status 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 "locations", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}locations of type {}locations."); #endif __child = [REALTYBARONNS0Locations readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}locations of type {}locations."); #endif [self setLocations: __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 locations]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "locations", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}locations."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}locations..."); #endif [[self locations] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}locations..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}locations."]; } } } @end /* implementation REALTYBARONNS0FindLocations (JAXB) */ #endif /* DEF_REALTYBARONNS0FindLocations_M */ #ifndef DEF_REALTYBARONNS0Badge_M #define DEF_REALTYBARONNS0Badge_M /** * User: marc Date: Mar 18, 2010 Time: 8:18:29 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 REALTYBARONNS0Badge /** * (no documentation provided) */ - (BOOL) advertiser { return _advertiser; } /** * (no documentation provided) */ - (void) setAdvertiser: (BOOL) newAdvertiser { _advertiser = newAdvertiser; } /** * (no documentation provided) */ - (BOOL) publisher { return _publisher; } /** * (no documentation provided) */ - (void) setPublisher: (BOOL) newPublisher { _publisher = newPublisher; } /** * (no documentation provided) */ - (REALTYBARONNS0Link *) link { return _link; } /** * (no documentation provided) */ - (void) setLink: (REALTYBARONNS0Link *) newLink { [newLink retain]; [_link release]; _link = newLink; } /** * (no documentation provided) */ - (REALTYBARONNS0Image *) image { return _image; } /** * (no documentation provided) */ - (void) setImage: (REALTYBARONNS0Image *) newImage { [newImage retain]; [_image release]; _image = newImage; } /** * (no documentation provided) */ - (NSString *) display_url { return _display_url; } /** * (no documentation provided) */ - (void) setDisplay_url: (NSString *) newDisplay_url { [newDisplay_url retain]; [_display_url release]; _display_url = newDisplay_url; } /** * (no documentation provided) */ - (NSString *) description_1 { return _description_1; } /** * (no documentation provided) */ - (void) setDescription_1: (NSString *) newDescription_1 { [newDescription_1 retain]; [_description_1 release]; _description_1 = newDescription_1; } /** * (no documentation provided) */ - (NSString *) description_2 { return _description_2; } /** * (no documentation provided) */ - (void) setDescription_2: (NSString *) newDescription_2 { [newDescription_2 retain]; [_description_2 release]; _description_2 = newDescription_2; } - (void) dealloc { [self setLink: nil]; [self setImage: nil]; [self setDisplay_url: nil]; [self setDescription_1: nil]; [self setDescription_2: nil]; [super dealloc]; } @end /* implementation REALTYBARONNS0Badge */ /** * Internal, private interface for JAXB reading and writing. */ @interface REALTYBARONNS0Badge (JAXB) @end /*interface REALTYBARONNS0Badge (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation REALTYBARONNS0Badge (JAXB) /** * Read an instance of REALTYBARONNS0Badge from an XML reader. * * @param reader The reader. * @return An instance of REALTYBARONNS0Badge defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { REALTYBARONNS0Badge *_rEALTYBARONNS0Badge = [[REALTYBARONNS0Badge alloc] init]; NS_DURING { [_rEALTYBARONNS0Badge initWithReader: reader]; } NS_HANDLER { _rEALTYBARONNS0Badge = nil; [localException raise]; } NS_ENDHANDLER [_rEALTYBARONNS0Badge autorelease]; return _rEALTYBARONNS0Badge; } /** * Initialize this instance of REALTYBARONNS0Badge 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 REALTYBARONNS0Badge 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 "advertiser", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}advertiser..."); #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 {}advertiser."]; } [self setAdvertiser: *((BOOL*) _child_accessor)]; free(_child_accessor); #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}advertiser..."); #endif return YES; } if ((xmlStrcmp(BAD_CAST "publisher", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}publisher..."); #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 {}publisher."]; } [self setPublisher: *((BOOL*) _child_accessor)]; free(_child_accessor); #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}publisher..."); #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 = [REALTYBARONNS0Link 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 "image", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}image of type {}image."); #endif __child = [REALTYBARONNS0Image readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}image of type {}image."); #endif [self setImage: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "display_url", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}display_url of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}display_url of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setDisplay_url: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "description_1", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}description_1 of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}description_1 of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setDescription_1: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "description_2", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}description_2 of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}description_2 of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setDescription_2: __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 "advertiser", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}advertiser."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}advertiser..."); #endif status = xmlTextWriterWriteBooleanType(writer, &_advertiser); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing attribute {}advertiser."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}advertiser..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}advertiser."]; } } if (YES) { //always write the primitive attributes... status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "publisher", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}publisher."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}publisher..."); #endif status = xmlTextWriterWriteBooleanType(writer, &_publisher); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing attribute {}publisher."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}publisher..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}publisher."]; } } } //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 image]) { 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 [[self image] 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."]; } } if ([self display_url]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "display_url", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}display_url."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}display_url..."); #endif [[self display_url] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}display_url..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}display_url."]; } } if ([self description_1]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "description_1", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}description_1."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}description_1..."); #endif [[self description_1] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}description_1..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}description_1."]; } } if ([self description_2]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "description_2", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}description_2."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}description_2..."); #endif [[self description_2] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}description_2..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}description_2."]; } } } @end /* implementation REALTYBARONNS0Badge (JAXB) */ #endif /* DEF_REALTYBARONNS0Badge_M */ #ifndef DEF_REALTYBARONNS0AnswerCount_M #define DEF_REALTYBARONNS0AnswerCount_M /** * Created by IntelliJ IDEA. User: marc Date: Sep 1, 2010 Time: 2:12:16 PM */ @implementation REALTYBARONNS0AnswerCount /** * (no documentation provided) */ - (int *) question { return _question; } /** * (no documentation provided) */ - (void) setQuestion: (int *) newQuestion { if (_question != NULL) { free(_question); } _question = newQuestion; } /** * count */ - (int *) value { return _value; } /** * count */ - (void) setValue: (int *) newValue { if (_value != NULL) { free(_value); } _value = newValue; } - (void) dealloc { [self setQuestion: NULL]; [self setValue: NULL]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { REALTYBARONNS0AnswerCount *_rEALTYBARONNS0AnswerCount; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _rEALTYBARONNS0AnswerCount = (REALTYBARONNS0AnswerCount *) [REALTYBARONNS0AnswerCount readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _rEALTYBARONNS0AnswerCount; } //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 REALTYBARONNS0AnswerCount */ /** * Internal, private interface for JAXB reading and writing. */ @interface REALTYBARONNS0AnswerCount (JAXB) @end /*interface REALTYBARONNS0AnswerCount (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation REALTYBARONNS0AnswerCount (JAXB) /** * Read an instance of REALTYBARONNS0AnswerCount from an XML reader. * * @param reader The reader. * @return An instance of REALTYBARONNS0AnswerCount defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { REALTYBARONNS0AnswerCount *_rEALTYBARONNS0AnswerCount = [[REALTYBARONNS0AnswerCount alloc] init]; NS_DURING { [_rEALTYBARONNS0AnswerCount initWithReader: reader]; } NS_HANDLER { _rEALTYBARONNS0AnswerCount = nil; [localException raise]; } NS_ENDHANDLER [_rEALTYBARONNS0AnswerCount autorelease]; return _rEALTYBARONNS0AnswerCount; } /** * Initialize this instance of REALTYBARONNS0AnswerCount 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 REALTYBARONNS0AnswerCount 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 REALTYBARONNS0AnswerCount from an XML reader. The element to be read is * "answerCount". * * @param reader The XML reader. * @return The REALTYBARONNS0AnswerCount. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; REALTYBARONNS0AnswerCount *_answerCount = 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 answerCount."]; } } if (xmlStrcmp(BAD_CAST "answerCount", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}answerCount."); #endif _answerCount = (REALTYBARONNS0AnswerCount *)[REALTYBARONNS0AnswerCount readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}answerCount."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0AnswerCount. Expected element answerCount. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0AnswerCount. Expected element answerCount. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _answerCount; } /** * Writes this REALTYBARONNS0AnswerCount to XML under element name "answerCount". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _answerCount The AnswerCount to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this REALTYBARONNS0AnswerCount 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 "answerCount", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}answerCount. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}answerCount for root element {}answerCount..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}answerCount for root element {}answerCount..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}answerCount. 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 "question", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}question..."); #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 {}question."]; } [self setQuestion: ((int*) _child_accessor)]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}question..."); #endif return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { void *_child_accessor; #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read element value..."); #endif if (xmlTextReaderIsEmptyElement(reader) == 0) { _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 setValue: ((int*) _child_accessor)]; } #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 question] != NULL) { status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "question", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}question."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}question..."); #endif status = xmlTextWriterWriteIntType(writer, [self question]); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing attribute {}question."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}question..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}question."]; } } } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element value..."); #endif if (xmlTextWriterWriteIntType(writer, [self value]) < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing element value."]; } #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 REALTYBARONNS0AnswerCount (JAXB) */ #endif /* DEF_REALTYBARONNS0AnswerCount_M */ #ifndef DEF_REALTYBARONNS0Agent_M #define DEF_REALTYBARONNS0Agent_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 REALTYBARONNS0Agent /** * (no documentation provided) */ - (NSString *) identifier { return _identifier; } /** * (no documentation provided) */ - (void) setIdentifier: (NSString *) newIdentifier { [newIdentifier retain]; [_identifier release]; _identifier = newIdentifier; } /** * sales */ - (REALTYBARONNS0Sales *) sales { return _sales; } /** * sales */ - (void) setSales: (REALTYBARONNS0Sales *) newSales { [newSales retain]; [_sales release]; _sales = newSales; } /** * (no documentation provided) */ - (REALTYBARONNS0Images *) charts { return _charts; } /** * (no documentation provided) */ - (void) setCharts: (REALTYBARONNS0Images *) newCharts { [newCharts retain]; [_charts release]; _charts = newCharts; } /** * (no documentation provided) */ - (REALTYBARONNS0Profile *) profile { return _profile; } /** * (no documentation provided) */ - (void) setProfile: (REALTYBARONNS0Profile *) newProfile { [newProfile retain]; [_profile release]; _profile = newProfile; } /** * (no documentation provided) */ - (REALTYBARONNS0Reviews *) reviews { return _reviews; } /** * (no documentation provided) */ - (void) setReviews: (REALTYBARONNS0Reviews *) newReviews { [newReviews retain]; [_reviews release]; _reviews = newReviews; } /** * (no documentation provided) */ - (REALTYBARONNS0Forecasts *) forecasts { return _forecasts; } /** * (no documentation provided) */ - (void) setForecasts: (REALTYBARONNS0Forecasts *) 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 { REALTYBARONNS0Agent *_rEALTYBARONNS0Agent; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _rEALTYBARONNS0Agent = (REALTYBARONNS0Agent *) [REALTYBARONNS0Agent readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _rEALTYBARONNS0Agent; } //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 REALTYBARONNS0Agent */ /** * Internal, private interface for JAXB reading and writing. */ @interface REALTYBARONNS0Agent (JAXB) @end /*interface REALTYBARONNS0Agent (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation REALTYBARONNS0Agent (JAXB) /** * Read an instance of REALTYBARONNS0Agent from an XML reader. * * @param reader The reader. * @return An instance of REALTYBARONNS0Agent defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { REALTYBARONNS0Agent *_rEALTYBARONNS0Agent = [[REALTYBARONNS0Agent alloc] init]; NS_DURING { [_rEALTYBARONNS0Agent initWithReader: reader]; } NS_HANDLER { _rEALTYBARONNS0Agent = nil; [localException raise]; } NS_ENDHANDLER [_rEALTYBARONNS0Agent autorelease]; return _rEALTYBARONNS0Agent; } /** * Initialize this instance of REALTYBARONNS0Agent 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 REALTYBARONNS0Agent 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 REALTYBARONNS0Agent from an XML reader. The element to be read is * "agent". * * @param reader The XML reader. * @return The REALTYBARONNS0Agent. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; REALTYBARONNS0Agent *_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 = (REALTYBARONNS0Agent *)[REALTYBARONNS0Agent 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 REALTYBARONNS0Agent. Expected element agent. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0Agent. Expected element agent. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _agent; } /** * Writes this REALTYBARONNS0Agent 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 REALTYBARONNS0Agent 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 = [REALTYBARONNS0Sales 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 = [REALTYBARONNS0Images 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 = [REALTYBARONNS0Profile 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 = [REALTYBARONNS0Reviews 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 = [REALTYBARONNS0Forecasts 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 REALTYBARONNS0Agent (JAXB) */ #endif /* DEF_REALTYBARONNS0Agent_M */ #ifndef DEF_REALTYBARONNS0PagedList_M #define DEF_REALTYBARONNS0PagedList_M /** * (no documentation provided) */ @implementation REALTYBARONNS0PagedList /** * (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 REALTYBARONNS0PagedList */ /** * Internal, private interface for JAXB reading and writing. */ @interface REALTYBARONNS0PagedList (JAXB) @end /*interface REALTYBARONNS0PagedList (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation REALTYBARONNS0PagedList (JAXB) /** * Read an instance of REALTYBARONNS0PagedList from an XML reader. * * @param reader The reader. * @return An instance of REALTYBARONNS0PagedList defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { REALTYBARONNS0PagedList *_rEALTYBARONNS0PagedList = [[REALTYBARONNS0PagedList alloc] init]; NS_DURING { [_rEALTYBARONNS0PagedList initWithReader: reader]; } NS_HANDLER { _rEALTYBARONNS0PagedList = nil; [localException raise]; } NS_ENDHANDLER [_rEALTYBARONNS0PagedList autorelease]; return _rEALTYBARONNS0PagedList; } /** * Initialize this instance of REALTYBARONNS0PagedList 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 REALTYBARONNS0PagedList 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 REALTYBARONNS0PagedList (JAXB) */ #endif /* DEF_REALTYBARONNS0PagedList_M */ #ifndef DEF_REALTYBARONNS0LocationContext_M #define DEF_REALTYBARONNS0LocationContext_M /** * Reads a LocationContext from XML. The reader is assumed to be at the start element. * * @param reader The XML reader. * @return The LocationContext, or NULL if unable to be read. */ static enum REALTYBARONNS0LocationContext *xmlTextReaderReadREALTYBARONNS0LocationContextType(xmlTextReaderPtr reader) { xmlChar *enumValue = xmlTextReaderReadEntireNodeValue(reader); enum REALTYBARONNS0LocationContext *value = calloc(1, sizeof(enum REALTYBARONNS0LocationContext)); if (enumValue != NULL) { if (xmlStrcmp(enumValue, BAD_CAST "city") == 0) { *value = REALTYBARON_NS0_LOCATIONCONTEXT_CITY; free(enumValue); return value; } if (xmlStrcmp(enumValue, BAD_CAST "state") == 0) { *value = REALTYBARON_NS0_LOCATIONCONTEXT_STATE; free(enumValue); return value; } if (xmlStrcmp(enumValue, BAD_CAST "metro") == 0) { *value = REALTYBARON_NS0_LOCATIONCONTEXT_METRO; free(enumValue); return value; } if (xmlStrcmp(enumValue, BAD_CAST "address") == 0) { *value = REALTYBARON_NS0_LOCATIONCONTEXT_ADDRESS; free(enumValue); return value; } if (xmlStrcmp(enumValue, BAD_CAST "listing") == 0) { *value = REALTYBARON_NS0_LOCATIONCONTEXT_LISTING; free(enumValue); return value; } if (xmlStrcmp(enumValue, BAD_CAST "zipcode") == 0) { *value = REALTYBARON_NS0_LOCATIONCONTEXT_ZIPCODE; free(enumValue); return value; } if (xmlStrcmp(enumValue, BAD_CAST "neighborhood") == 0) { *value = REALTYBARON_NS0_LOCATIONCONTEXT_NEIGHBORHOOD; free(enumValue); return value; } #if DEBUG_ENUNCIATE NSLog(@"Attempt to read enum value failed: %s doesn't match an enum value.", enumValue); #endif } #if DEBUG_ENUNCIATE else { NSLog(@"Attempt to read enum value failed: NULL value."); } #endif return NULL; } /** * Utility method for getting the enum value for a string. * * @param _locationContext The string to format. * @return The enum value or NULL on error. */ static enum REALTYBARONNS0LocationContext *formatStringToREALTYBARONNS0LocationContextType(NSString *_locationContext) { enum REALTYBARONNS0LocationContext *value = calloc(1, sizeof(enum REALTYBARONNS0LocationContext)); value = NULL; if ([@"city" isEqualToString:_locationContext]) { *value = REALTYBARON_NS0_LOCATIONCONTEXT_CITY; } if ([@"state" isEqualToString:_locationContext]) { *value = REALTYBARON_NS0_LOCATIONCONTEXT_STATE; } if ([@"metro" isEqualToString:_locationContext]) { *value = REALTYBARON_NS0_LOCATIONCONTEXT_METRO; } if ([@"address" isEqualToString:_locationContext]) { *value = REALTYBARON_NS0_LOCATIONCONTEXT_ADDRESS; } if ([@"listing" isEqualToString:_locationContext]) { *value = REALTYBARON_NS0_LOCATIONCONTEXT_LISTING; } if ([@"zipcode" isEqualToString:_locationContext]) { *value = REALTYBARON_NS0_LOCATIONCONTEXT_ZIPCODE; } if ([@"neighborhood" isEqualToString:_locationContext]) { *value = REALTYBARON_NS0_LOCATIONCONTEXT_NEIGHBORHOOD; } #if DEBUG_ENUNCIATE NSLog(@"Attempt to read enum value failed: %s doesn't match an enum value.", _locationContext); #endif return value; } /** * Writes a LocationContext to XML. * * @param writer The XML writer. * @param _locationContext The LocationContext to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteREALTYBARONNS0LocationContextType(xmlTextWriterPtr writer, enum REALTYBARONNS0LocationContext *_locationContext) { switch (*_locationContext) { case REALTYBARON_NS0_LOCATIONCONTEXT_CITY: return xmlTextWriterWriteString(writer, BAD_CAST "city"); case REALTYBARON_NS0_LOCATIONCONTEXT_STATE: return xmlTextWriterWriteString(writer, BAD_CAST "state"); case REALTYBARON_NS0_LOCATIONCONTEXT_METRO: return xmlTextWriterWriteString(writer, BAD_CAST "metro"); case REALTYBARON_NS0_LOCATIONCONTEXT_ADDRESS: return xmlTextWriterWriteString(writer, BAD_CAST "address"); case REALTYBARON_NS0_LOCATIONCONTEXT_LISTING: return xmlTextWriterWriteString(writer, BAD_CAST "listing"); case REALTYBARON_NS0_LOCATIONCONTEXT_ZIPCODE: return xmlTextWriterWriteString(writer, BAD_CAST "zipcode"); case REALTYBARON_NS0_LOCATIONCONTEXT_NEIGHBORHOOD: return xmlTextWriterWriteString(writer, BAD_CAST "neighborhood"); } #if DEBUG_ENUNCIATE NSLog(@"Unable to write enum value (no valid value found)."); #endif return -1; } /** * Utility method for getting the string value of LocationContext. * * @param _locationContext The LocationContext to format. * @return The string value or NULL on error. */ static NSString *formatREALTYBARONNS0LocationContextTypeToString(enum REALTYBARONNS0LocationContext *_locationContext) { switch (*_locationContext) { case REALTYBARON_NS0_LOCATIONCONTEXT_CITY: return @"city"; case REALTYBARON_NS0_LOCATIONCONTEXT_STATE: return @"state"; case REALTYBARON_NS0_LOCATIONCONTEXT_METRO: return @"metro"; case REALTYBARON_NS0_LOCATIONCONTEXT_ADDRESS: return @"address"; case REALTYBARON_NS0_LOCATIONCONTEXT_LISTING: return @"listing"; case REALTYBARON_NS0_LOCATIONCONTEXT_ZIPCODE: return @"zipcode"; case REALTYBARON_NS0_LOCATIONCONTEXT_NEIGHBORHOOD: return @"neighborhood"; default: return NULL; } return NULL; } #endif /* DEF_REALTYBARONNS0LocationContext_M */ #ifndef DEF_REALTYBARONNS0ApprovalStatus_M #define DEF_REALTYBARONNS0ApprovalStatus_M /** * Reads a ApprovalStatus from XML. The reader is assumed to be at the start element. * * @param reader The XML reader. * @return The ApprovalStatus, or NULL if unable to be read. */ static enum REALTYBARONNS0ApprovalStatus *xmlTextReaderReadREALTYBARONNS0ApprovalStatusType(xmlTextReaderPtr reader) { xmlChar *enumValue = xmlTextReaderReadEntireNodeValue(reader); enum REALTYBARONNS0ApprovalStatus *value = calloc(1, sizeof(enum REALTYBARONNS0ApprovalStatus)); if (enumValue != NULL) { if (xmlStrcmp(enumValue, BAD_CAST "deleted") == 0) { *value = REALTYBARON_NS0_APPROVALSTATUS_DELETED; free(enumValue); return value; } if (xmlStrcmp(enumValue, BAD_CAST "pending") == 0) { *value = REALTYBARON_NS0_APPROVALSTATUS_PENDING; free(enumValue); return value; } if (xmlStrcmp(enumValue, BAD_CAST "approved") == 0) { *value = REALTYBARON_NS0_APPROVALSTATUS_APPROVED; free(enumValue); return value; } if (xmlStrcmp(enumValue, BAD_CAST "rejected") == 0) { *value = REALTYBARON_NS0_APPROVALSTATUS_REJECTED; free(enumValue); return value; } if (xmlStrcmp(enumValue, BAD_CAST "returned") == 0) { *value = REALTYBARON_NS0_APPROVALSTATUS_RETURNED; free(enumValue); return value; } #if DEBUG_ENUNCIATE NSLog(@"Attempt to read enum value failed: %s doesn't match an enum value.", enumValue); #endif } #if DEBUG_ENUNCIATE else { NSLog(@"Attempt to read enum value failed: NULL value."); } #endif return NULL; } /** * Utility method for getting the enum value for a string. * * @param _approvalStatus The string to format. * @return The enum value or NULL on error. */ static enum REALTYBARONNS0ApprovalStatus *formatStringToREALTYBARONNS0ApprovalStatusType(NSString *_approvalStatus) { enum REALTYBARONNS0ApprovalStatus *value = calloc(1, sizeof(enum REALTYBARONNS0ApprovalStatus)); value = NULL; if ([@"deleted" isEqualToString:_approvalStatus]) { *value = REALTYBARON_NS0_APPROVALSTATUS_DELETED; } if ([@"pending" isEqualToString:_approvalStatus]) { *value = REALTYBARON_NS0_APPROVALSTATUS_PENDING; } if ([@"approved" isEqualToString:_approvalStatus]) { *value = REALTYBARON_NS0_APPROVALSTATUS_APPROVED; } if ([@"rejected" isEqualToString:_approvalStatus]) { *value = REALTYBARON_NS0_APPROVALSTATUS_REJECTED; } if ([@"returned" isEqualToString:_approvalStatus]) { *value = REALTYBARON_NS0_APPROVALSTATUS_RETURNED; } #if DEBUG_ENUNCIATE NSLog(@"Attempt to read enum value failed: %s doesn't match an enum value.", _approvalStatus); #endif return value; } /** * Writes a ApprovalStatus to XML. * * @param writer The XML writer. * @param _approvalStatus The ApprovalStatus to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteREALTYBARONNS0ApprovalStatusType(xmlTextWriterPtr writer, enum REALTYBARONNS0ApprovalStatus *_approvalStatus) { switch (*_approvalStatus) { case REALTYBARON_NS0_APPROVALSTATUS_DELETED: return xmlTextWriterWriteString(writer, BAD_CAST "deleted"); case REALTYBARON_NS0_APPROVALSTATUS_PENDING: return xmlTextWriterWriteString(writer, BAD_CAST "pending"); case REALTYBARON_NS0_APPROVALSTATUS_APPROVED: return xmlTextWriterWriteString(writer, BAD_CAST "approved"); case REALTYBARON_NS0_APPROVALSTATUS_REJECTED: return xmlTextWriterWriteString(writer, BAD_CAST "rejected"); case REALTYBARON_NS0_APPROVALSTATUS_RETURNED: return xmlTextWriterWriteString(writer, BAD_CAST "returned"); } #if DEBUG_ENUNCIATE NSLog(@"Unable to write enum value (no valid value found)."); #endif return -1; } /** * Utility method for getting the string value of ApprovalStatus. * * @param _approvalStatus The ApprovalStatus to format. * @return The string value or NULL on error. */ static NSString *formatREALTYBARONNS0ApprovalStatusTypeToString(enum REALTYBARONNS0ApprovalStatus *_approvalStatus) { switch (*_approvalStatus) { case REALTYBARON_NS0_APPROVALSTATUS_DELETED: return @"deleted"; case REALTYBARON_NS0_APPROVALSTATUS_PENDING: return @"pending"; case REALTYBARON_NS0_APPROVALSTATUS_APPROVED: return @"approved"; case REALTYBARON_NS0_APPROVALSTATUS_REJECTED: return @"rejected"; case REALTYBARON_NS0_APPROVALSTATUS_RETURNED: return @"returned"; default: return NULL; } return NULL; } #endif /* DEF_REALTYBARONNS0ApprovalStatus_M */ #ifndef DEF_REALTYBARONNS0Reviews_M #define DEF_REALTYBARONNS0Reviews_M /** * (no documentation provided) */ @implementation REALTYBARONNS0Reviews /** * (no documentation provided) */ - (NSDecimalNumber *) recommend { return _recommend; } /** * (no documentation provided) */ - (void) setRecommend: (NSDecimalNumber *) newRecommend { [newRecommend retain]; [_recommend release]; _recommend = newRecommend; } /** * (no documentation provided) */ - (NSArray *) review { return _review; } /** * (no documentation provided) */ - (void) setReview: (NSArray *) newReview { [newReview retain]; [_review release]; _review = newReview; } /** * (no documentation provided) */ - (NSDecimalNumber *) satisfied { return _satisfied; } /** * (no documentation provided) */ - (void) setSatisfied: (NSDecimalNumber *) newSatisfied { [newSatisfied retain]; [_satisfied release]; _satisfied = newSatisfied; } - (void) dealloc { [self setRecommend: nil]; [self setReview: nil]; [self setSatisfied: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { REALTYBARONNS0Reviews *_rEALTYBARONNS0Reviews; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _rEALTYBARONNS0Reviews = (REALTYBARONNS0Reviews *) [REALTYBARONNS0Reviews readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _rEALTYBARONNS0Reviews; } //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 REALTYBARONNS0Reviews */ /** * Internal, private interface for JAXB reading and writing. */ @interface REALTYBARONNS0Reviews (JAXB) @end /*interface REALTYBARONNS0Reviews (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation REALTYBARONNS0Reviews (JAXB) /** * Read an instance of REALTYBARONNS0Reviews from an XML reader. * * @param reader The reader. * @return An instance of REALTYBARONNS0Reviews defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { REALTYBARONNS0Reviews *_rEALTYBARONNS0Reviews = [[REALTYBARONNS0Reviews alloc] init]; NS_DURING { [_rEALTYBARONNS0Reviews initWithReader: reader]; } NS_HANDLER { _rEALTYBARONNS0Reviews = nil; [localException raise]; } NS_ENDHANDLER [_rEALTYBARONNS0Reviews autorelease]; return _rEALTYBARONNS0Reviews; } /** * Initialize this instance of REALTYBARONNS0Reviews 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 REALTYBARONNS0Reviews 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 REALTYBARONNS0Reviews from an XML reader. The element to be read is * "reviews". * * @param reader The XML reader. * @return The REALTYBARONNS0Reviews. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; REALTYBARONNS0Reviews *_reviews = 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 reviews."]; } } if (xmlStrcmp(BAD_CAST "reviews", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}reviews."); #endif _reviews = (REALTYBARONNS0Reviews *)[REALTYBARONNS0Reviews readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}reviews."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0Reviews. Expected element reviews. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0Reviews. Expected element reviews. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _reviews; } /** * Writes this REALTYBARONNS0Reviews to XML under element name "reviews". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _reviews The Reviews to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this REALTYBARONNS0Reviews 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 "reviews", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}reviews. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}reviews for root element {}reviews..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}reviews for root element {}reviews..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}reviews. 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 "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}decimal."); #endif __child = [NSDecimalNumber readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}recommend of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif [self setRecommend: __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 = [REALTYBARONNS0Review readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}review of type {}review."); #endif if ([self review]) { [self setReview: [[self review] arrayByAddingObject: __child]]; } else { [self setReview: [NSArray arrayWithObject: __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}decimal."); #endif __child = [NSDecimalNumber readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}satisfied of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif [self setSatisfied: __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 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."]; } } if ([self review]) { __enumerator = [[self review] objectEnumerator]; while ( (__item = [__enumerator nextObject]) ) { 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 [__item 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 item iterator. } 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."]; } } } @end /* implementation REALTYBARONNS0Reviews (JAXB) */ #endif /* DEF_REALTYBARONNS0Reviews_M */ #ifndef DEF_REALTYBARONNS0SlugType_M #define DEF_REALTYBARONNS0SlugType_M /** * Reads a SlugType from XML. The reader is assumed to be at the start element. * * @param reader The XML reader. * @return The SlugType, or NULL if unable to be read. */ static enum REALTYBARONNS0SlugType *xmlTextReaderReadREALTYBARONNS0SlugTypeType(xmlTextReaderPtr reader) { xmlChar *enumValue = xmlTextReaderReadEntireNodeValue(reader); enum REALTYBARONNS0SlugType *value = calloc(1, sizeof(enum REALTYBARONNS0SlugType)); if (enumValue != NULL) { if (xmlStrcmp(enumValue, BAD_CAST "hyphen") == 0) { *value = REALTYBARON_NS0_SLUGTYPE_HYPHEN; free(enumValue); return value; } if (xmlStrcmp(enumValue, BAD_CAST "underscore") == 0) { *value = REALTYBARON_NS0_SLUGTYPE_UNDERSCORE; free(enumValue); return value; } #if DEBUG_ENUNCIATE NSLog(@"Attempt to read enum value failed: %s doesn't match an enum value.", enumValue); #endif } #if DEBUG_ENUNCIATE else { NSLog(@"Attempt to read enum value failed: NULL value."); } #endif return NULL; } /** * Utility method for getting the enum value for a string. * * @param _slugType The string to format. * @return The enum value or NULL on error. */ static enum REALTYBARONNS0SlugType *formatStringToREALTYBARONNS0SlugTypeType(NSString *_slugType) { enum REALTYBARONNS0SlugType *value = calloc(1, sizeof(enum REALTYBARONNS0SlugType)); value = NULL; if ([@"hyphen" isEqualToString:_slugType]) { *value = REALTYBARON_NS0_SLUGTYPE_HYPHEN; } if ([@"underscore" isEqualToString:_slugType]) { *value = REALTYBARON_NS0_SLUGTYPE_UNDERSCORE; } #if DEBUG_ENUNCIATE NSLog(@"Attempt to read enum value failed: %s doesn't match an enum value.", _slugType); #endif return value; } /** * Writes a SlugType to XML. * * @param writer The XML writer. * @param _slugType The SlugType to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteREALTYBARONNS0SlugTypeType(xmlTextWriterPtr writer, enum REALTYBARONNS0SlugType *_slugType) { switch (*_slugType) { case REALTYBARON_NS0_SLUGTYPE_HYPHEN: return xmlTextWriterWriteString(writer, BAD_CAST "hyphen"); case REALTYBARON_NS0_SLUGTYPE_UNDERSCORE: return xmlTextWriterWriteString(writer, BAD_CAST "underscore"); } #if DEBUG_ENUNCIATE NSLog(@"Unable to write enum value (no valid value found)."); #endif return -1; } /** * Utility method for getting the string value of SlugType. * * @param _slugType The SlugType to format. * @return The string value or NULL on error. */ static NSString *formatREALTYBARONNS0SlugTypeTypeToString(enum REALTYBARONNS0SlugType *_slugType) { switch (*_slugType) { case REALTYBARON_NS0_SLUGTYPE_HYPHEN: return @"hyphen"; case REALTYBARON_NS0_SLUGTYPE_UNDERSCORE: return @"underscore"; default: return NULL; } return NULL; } #endif /* DEF_REALTYBARONNS0SlugType_M */ #ifndef DEF_REALTYBARONNS0Questions_M #define DEF_REALTYBARONNS0Questions_M /** * User: marc Date: May 12, 2009 Time: 1:51:52 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 REALTYBARONNS0Questions /** * location */ - (NSString *) location { return _location; } /** * location */ - (void) setLocation: (NSString *) newLocation { [newLocation retain]; [_location release]; _location = newLocation; } /** * (no documentation provided) */ - (enum REALTYBARONNS0LocationContext *) context { return _context; } /** * (no documentation provided) */ - (void) setContext: (enum REALTYBARONNS0LocationContext *) newContext { if (_context != NULL) { free(_context); } _context = newContext; } /** * longitude */ - (NSDecimalNumber *) longitude { return _longitude; } /** * longitude */ - (void) setLongitude: (NSDecimalNumber *) newLongitude { [newLongitude retain]; [_longitude release]; _longitude = newLongitude; } /** * latitude */ - (NSDecimalNumber *) latitude { return _latitude; } /** * latitude */ - (void) setLatitude: (NSDecimalNumber *) newLatitude { [newLatitude retain]; [_latitude release]; _latitude = newLatitude; } /** * list */ - (NSArray *) question { return _question; } /** * list */ - (void) setQuestion: (NSArray *) newQuestion { [newQuestion retain]; [_question release]; _question = newQuestion; } - (void) dealloc { [self setLocation: nil]; [self setContext: NULL]; [self setLongitude: nil]; [self setLatitude: nil]; [self setQuestion: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { REALTYBARONNS0Questions *_rEALTYBARONNS0Questions; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _rEALTYBARONNS0Questions = (REALTYBARONNS0Questions *) [REALTYBARONNS0Questions readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _rEALTYBARONNS0Questions; } //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 REALTYBARONNS0Questions */ /** * Internal, private interface for JAXB reading and writing. */ @interface REALTYBARONNS0Questions (JAXB) @end /*interface REALTYBARONNS0Questions (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation REALTYBARONNS0Questions (JAXB) /** * Read an instance of REALTYBARONNS0Questions from an XML reader. * * @param reader The reader. * @return An instance of REALTYBARONNS0Questions defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { REALTYBARONNS0Questions *_rEALTYBARONNS0Questions = [[REALTYBARONNS0Questions alloc] init]; NS_DURING { [_rEALTYBARONNS0Questions initWithReader: reader]; } NS_HANDLER { _rEALTYBARONNS0Questions = nil; [localException raise]; } NS_ENDHANDLER [_rEALTYBARONNS0Questions autorelease]; return _rEALTYBARONNS0Questions; } /** * Initialize this instance of REALTYBARONNS0Questions 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 REALTYBARONNS0Questions 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 REALTYBARONNS0Questions from an XML reader. The element to be read is * "questions". * * @param reader The XML reader. * @return The REALTYBARONNS0Questions. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; REALTYBARONNS0Questions *_questions = 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 questions."]; } } if (xmlStrcmp(BAD_CAST "questions", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}questions."); #endif _questions = (REALTYBARONNS0Questions *)[REALTYBARONNS0Questions readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}questions."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0Questions. Expected element questions. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0Questions. Expected element questions. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _questions; } /** * Writes this REALTYBARONNS0Questions to XML under element name "questions". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _questions The Questions to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this REALTYBARONNS0Questions 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 "questions", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}questions. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}questions for root element {}questions..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}questions for root element {}questions..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}questions. 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 "location", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}location..."); #endif [self setLocation: (NSString*) [NSString readXMLType: reader]]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}location..."); #endif return YES; } if ((xmlStrcmp(BAD_CAST "context", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}context..."); #endif _child_accessor = xmlTextReaderReadREALTYBARONNS0LocationContextType(reader); if (_child_accessor == NULL) { //panic: unable to read the attribute value for some reason. [NSException raise: @"XMLReadError" format: @"Error reading attribute {}context."]; } [self setContext: ((enum REALTYBARONNS0LocationContext*) _child_accessor)]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}context..."); #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; } 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 "question", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}question of type {}question."); #endif __child = [REALTYBARONNS0Question readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}question of type {}question."); #endif if ([self question]) { [self setQuestion: [[self question] arrayByAddingObject: __child]]; } else { [self setQuestion: [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]; if ([self location]) { status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "location", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}location."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}location..."); #endif [[self location] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}location..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}location."]; } } if ([self context] != NULL) { status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "context", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}context."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}context..."); #endif status = xmlTextWriterWriteREALTYBARONNS0LocationContextType(writer, [self context]); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing attribute {}context."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}context..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}context."]; } } 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."]; } } } //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 question]) { __enumerator = [[self question] objectEnumerator]; while ( (__item = [__enumerator nextObject]) ) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "question", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}question."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}question..."); #endif [__item writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}question..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}question."]; } } //end item iterator. } } @end /* implementation REALTYBARONNS0Questions (JAXB) */ #endif /* DEF_REALTYBARONNS0Questions_M */ #ifndef DEF_REALTYBARONNS0AnswerOrder_M #define DEF_REALTYBARONNS0AnswerOrder_M /** * Reads a AnswerOrder from XML. The reader is assumed to be at the start element. * * @param reader The XML reader. * @return The AnswerOrder, or NULL if unable to be read. */ static enum REALTYBARONNS0AnswerOrder *xmlTextReaderReadREALTYBARONNS0AnswerOrderType(xmlTextReaderPtr reader) { xmlChar *enumValue = xmlTextReaderReadEntireNodeValue(reader); enum REALTYBARONNS0AnswerOrder *value = calloc(1, sizeof(enum REALTYBARONNS0AnswerOrder)); if (enumValue != NULL) { if (xmlStrcmp(enumValue, BAD_CAST "revenue") == 0) { *value = REALTYBARON_NS0_ANSWERORDER_REVENUE; free(enumValue); return value; } if (xmlStrcmp(enumValue, BAD_CAST "ranking") == 0) { *value = REALTYBARON_NS0_ANSWERORDER_RANKING; free(enumValue); return value; } if (xmlStrcmp(enumValue, BAD_CAST "rating") == 0) { *value = REALTYBARON_NS0_ANSWERORDER_RATING; free(enumValue); return value; } if (xmlStrcmp(enumValue, BAD_CAST "recent") == 0) { *value = REALTYBARON_NS0_ANSWERORDER_RECENT; free(enumValue); return value; } if (xmlStrcmp(enumValue, BAD_CAST "oldest") == 0) { *value = REALTYBARON_NS0_ANSWERORDER_OLDEST; free(enumValue); return value; } #if DEBUG_ENUNCIATE NSLog(@"Attempt to read enum value failed: %s doesn't match an enum value.", enumValue); #endif } #if DEBUG_ENUNCIATE else { NSLog(@"Attempt to read enum value failed: NULL value."); } #endif return NULL; } /** * Utility method for getting the enum value for a string. * * @param _answerOrder The string to format. * @return The enum value or NULL on error. */ static enum REALTYBARONNS0AnswerOrder *formatStringToREALTYBARONNS0AnswerOrderType(NSString *_answerOrder) { enum REALTYBARONNS0AnswerOrder *value = calloc(1, sizeof(enum REALTYBARONNS0AnswerOrder)); value = NULL; if ([@"revenue" isEqualToString:_answerOrder]) { *value = REALTYBARON_NS0_ANSWERORDER_REVENUE; } if ([@"ranking" isEqualToString:_answerOrder]) { *value = REALTYBARON_NS0_ANSWERORDER_RANKING; } if ([@"rating" isEqualToString:_answerOrder]) { *value = REALTYBARON_NS0_ANSWERORDER_RATING; } if ([@"recent" isEqualToString:_answerOrder]) { *value = REALTYBARON_NS0_ANSWERORDER_RECENT; } if ([@"oldest" isEqualToString:_answerOrder]) { *value = REALTYBARON_NS0_ANSWERORDER_OLDEST; } #if DEBUG_ENUNCIATE NSLog(@"Attempt to read enum value failed: %s doesn't match an enum value.", _answerOrder); #endif return value; } /** * Writes a AnswerOrder to XML. * * @param writer The XML writer. * @param _answerOrder The AnswerOrder to write. * @return The bytes written (may be 0 in case of buffering) or -1 in case of error. */ static int xmlTextWriterWriteREALTYBARONNS0AnswerOrderType(xmlTextWriterPtr writer, enum REALTYBARONNS0AnswerOrder *_answerOrder) { switch (*_answerOrder) { case REALTYBARON_NS0_ANSWERORDER_REVENUE: return xmlTextWriterWriteString(writer, BAD_CAST "revenue"); case REALTYBARON_NS0_ANSWERORDER_RANKING: return xmlTextWriterWriteString(writer, BAD_CAST "ranking"); case REALTYBARON_NS0_ANSWERORDER_RATING: return xmlTextWriterWriteString(writer, BAD_CAST "rating"); case REALTYBARON_NS0_ANSWERORDER_RECENT: return xmlTextWriterWriteString(writer, BAD_CAST "recent"); case REALTYBARON_NS0_ANSWERORDER_OLDEST: return xmlTextWriterWriteString(writer, BAD_CAST "oldest"); } #if DEBUG_ENUNCIATE NSLog(@"Unable to write enum value (no valid value found)."); #endif return -1; } /** * Utility method for getting the string value of AnswerOrder. * * @param _answerOrder The AnswerOrder to format. * @return The string value or NULL on error. */ static NSString *formatREALTYBARONNS0AnswerOrderTypeToString(enum REALTYBARONNS0AnswerOrder *_answerOrder) { switch (*_answerOrder) { case REALTYBARON_NS0_ANSWERORDER_REVENUE: return @"revenue"; case REALTYBARON_NS0_ANSWERORDER_RANKING: return @"ranking"; case REALTYBARON_NS0_ANSWERORDER_RATING: return @"rating"; case REALTYBARON_NS0_ANSWERORDER_RECENT: return @"recent"; case REALTYBARON_NS0_ANSWERORDER_OLDEST: return @"oldest"; default: return NULL; } return NULL; } #endif /* DEF_REALTYBARONNS0AnswerOrder_M */ #ifndef DEF_REALTYBARONNS0Sales_M #define DEF_REALTYBARONNS0Sales_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 REALTYBARONNS0Sales /** * longitude */ - (NSDecimalNumber *) longitude { return _longitude; } /** * longitude */ - (void) setLongitude: (NSDecimalNumber *) newLongitude { [newLongitude retain]; [_longitude release]; _longitude = newLongitude; } /** * latitude */ - (NSDecimalNumber *) latitude { return _latitude; } /** * latitude */ - (void) setLatitude: (NSDecimalNumber *) newLatitude { [newLatitude retain]; [_latitude release]; _latitude = newLatitude; } /** * list of sales */ - (NSArray *) sale { return _sale; } /** * list of sales */ - (void) setSale: (NSArray *) newSale { [newSale retain]; [_sale release]; _sale = newSale; } - (void) dealloc { [self setLongitude: nil]; [self setLatitude: nil]; [self setSale: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { REALTYBARONNS0Sales *_rEALTYBARONNS0Sales; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _rEALTYBARONNS0Sales = (REALTYBARONNS0Sales *) [REALTYBARONNS0Sales readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _rEALTYBARONNS0Sales; } //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 REALTYBARONNS0Sales */ /** * Internal, private interface for JAXB reading and writing. */ @interface REALTYBARONNS0Sales (JAXB) @end /*interface REALTYBARONNS0Sales (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation REALTYBARONNS0Sales (JAXB) /** * Read an instance of REALTYBARONNS0Sales from an XML reader. * * @param reader The reader. * @return An instance of REALTYBARONNS0Sales defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { REALTYBARONNS0Sales *_rEALTYBARONNS0Sales = [[REALTYBARONNS0Sales alloc] init]; NS_DURING { [_rEALTYBARONNS0Sales initWithReader: reader]; } NS_HANDLER { _rEALTYBARONNS0Sales = nil; [localException raise]; } NS_ENDHANDLER [_rEALTYBARONNS0Sales autorelease]; return _rEALTYBARONNS0Sales; } /** * Initialize this instance of REALTYBARONNS0Sales 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 REALTYBARONNS0Sales 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 REALTYBARONNS0Sales from an XML reader. The element to be read is * "sales". * * @param reader The XML reader. * @return The REALTYBARONNS0Sales. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; REALTYBARONNS0Sales *_sales = 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 sales."]; } } if (xmlStrcmp(BAD_CAST "sales", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}sales."); #endif _sales = (REALTYBARONNS0Sales *)[REALTYBARONNS0Sales readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}sales."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0Sales. Expected element sales. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0Sales. Expected element sales. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _sales; } /** * Writes this REALTYBARONNS0Sales to XML under element name "sales". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _sales The Sales to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this REALTYBARONNS0Sales 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 "sales", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}sales. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}sales for root element {}sales..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}sales for root element {}sales..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}sales. 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 "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; } 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 = [REALTYBARONNS0Sale readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}sale of type {}sale."); #endif if ([self sale]) { [self setSale: [[self sale] arrayByAddingObject: __child]]; } else { [self setSale: [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]; 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."]; } } } //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]) { __enumerator = [[self sale] objectEnumerator]; while ( (__item = [__enumerator nextObject]) ) { 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 [__item 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."]; } } //end item iterator. } } @end /* implementation REALTYBARONNS0Sales (JAXB) */ #endif /* DEF_REALTYBARONNS0Sales_M */ #ifndef DEF_REALTYBARONNS0Profiles_M #define DEF_REALTYBARONNS0Profiles_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 REALTYBARONNS0Profiles /** * location */ - (NSString *) location { return _location; } /** * location */ - (void) setLocation: (NSString *) newLocation { [newLocation retain]; [_location release]; _location = newLocation; } /** * (no documentation provided) */ - (enum REALTYBARONNS0LocationContext *) context { return _context; } /** * (no documentation provided) */ - (void) setContext: (enum REALTYBARONNS0LocationContext *) newContext { if (_context != NULL) { free(_context); } _context = newContext; } /** * list of profiles */ - (NSArray *) profile { return _profile; } /** * list of profiles */ - (void) setProfile: (NSArray *) newProfile { [newProfile retain]; [_profile release]; _profile = newProfile; } - (void) dealloc { [self setLocation: nil]; [self setContext: NULL]; [self setProfile: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { REALTYBARONNS0Profiles *_rEALTYBARONNS0Profiles; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _rEALTYBARONNS0Profiles = (REALTYBARONNS0Profiles *) [REALTYBARONNS0Profiles readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _rEALTYBARONNS0Profiles; } //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 REALTYBARONNS0Profiles */ /** * Internal, private interface for JAXB reading and writing. */ @interface REALTYBARONNS0Profiles (JAXB) @end /*interface REALTYBARONNS0Profiles (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation REALTYBARONNS0Profiles (JAXB) /** * Read an instance of REALTYBARONNS0Profiles from an XML reader. * * @param reader The reader. * @return An instance of REALTYBARONNS0Profiles defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { REALTYBARONNS0Profiles *_rEALTYBARONNS0Profiles = [[REALTYBARONNS0Profiles alloc] init]; NS_DURING { [_rEALTYBARONNS0Profiles initWithReader: reader]; } NS_HANDLER { _rEALTYBARONNS0Profiles = nil; [localException raise]; } NS_ENDHANDLER [_rEALTYBARONNS0Profiles autorelease]; return _rEALTYBARONNS0Profiles; } /** * Initialize this instance of REALTYBARONNS0Profiles 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 REALTYBARONNS0Profiles 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 REALTYBARONNS0Profiles from an XML reader. The element to be read is * "profiles". * * @param reader The XML reader. * @return The REALTYBARONNS0Profiles. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; REALTYBARONNS0Profiles *_profiles = 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 profiles."]; } } if (xmlStrcmp(BAD_CAST "profiles", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}profiles."); #endif _profiles = (REALTYBARONNS0Profiles *)[REALTYBARONNS0Profiles readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}profiles."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0Profiles. Expected element profiles. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0Profiles. Expected element profiles. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _profiles; } /** * Writes this REALTYBARONNS0Profiles to XML under element name "profiles". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _profiles The Profiles to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this REALTYBARONNS0Profiles 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 "profiles", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}profiles. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}profiles for root element {}profiles..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}profiles for root element {}profiles..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}profiles. 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 "location", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}location..."); #endif [self setLocation: (NSString*) [NSString readXMLType: reader]]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}location..."); #endif return YES; } if ((xmlStrcmp(BAD_CAST "context", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}context..."); #endif _child_accessor = xmlTextReaderReadREALTYBARONNS0LocationContextType(reader); if (_child_accessor == NULL) { //panic: unable to read the attribute value for some reason. [NSException raise: @"XMLReadError" format: @"Error reading attribute {}context."]; } [self setContext: ((enum REALTYBARONNS0LocationContext*) _child_accessor)]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}context..."); #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 "profile", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}profile of type {}profile."); #endif __child = [REALTYBARONNS0Profile readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}profile of type {}profile."); #endif if ([self profile]) { [self setProfile: [[self profile] arrayByAddingObject: __child]]; } else { [self setProfile: [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]; if ([self location]) { status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "location", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}location."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}location..."); #endif [[self location] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}location..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}location."]; } } if ([self context] != NULL) { status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "context", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}context."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}context..."); #endif status = xmlTextWriterWriteREALTYBARONNS0LocationContextType(writer, [self context]); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing attribute {}context."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}context..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}context."]; } } } //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 profile]) { __enumerator = [[self profile] objectEnumerator]; while ( (__item = [__enumerator nextObject]) ) { 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 [__item 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 item iterator. } } @end /* implementation REALTYBARONNS0Profiles (JAXB) */ #endif /* DEF_REALTYBARONNS0Profiles_M */ #ifndef DEF_REALTYBARONNS0Forecasts_M #define DEF_REALTYBARONNS0Forecasts_M /** * A root element for a collection of forecasts. The underlying data source can be either the forecasts of an individual agent or the aggregate forecasts of multiple agents.

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 REALTYBARONNS0Forecasts /** * title */ - (NSString *) title { return _title; } /** * title */ - (void) setTitle: (NSString *) newTitle { [newTitle retain]; [_title release]; _title = newTitle; } /** * list */ - (NSArray *) forecast { return _forecast; } /** * list */ - (void) setForecast: (NSArray *) newForecast { [newForecast retain]; [_forecast release]; _forecast = newForecast; } - (void) dealloc { [self setTitle: nil]; [self setForecast: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { REALTYBARONNS0Forecasts *_rEALTYBARONNS0Forecasts; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _rEALTYBARONNS0Forecasts = (REALTYBARONNS0Forecasts *) [REALTYBARONNS0Forecasts readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _rEALTYBARONNS0Forecasts; } //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 REALTYBARONNS0Forecasts */ /** * Internal, private interface for JAXB reading and writing. */ @interface REALTYBARONNS0Forecasts (JAXB) @end /*interface REALTYBARONNS0Forecasts (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation REALTYBARONNS0Forecasts (JAXB) /** * Read an instance of REALTYBARONNS0Forecasts from an XML reader. * * @param reader The reader. * @return An instance of REALTYBARONNS0Forecasts defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { REALTYBARONNS0Forecasts *_rEALTYBARONNS0Forecasts = [[REALTYBARONNS0Forecasts alloc] init]; NS_DURING { [_rEALTYBARONNS0Forecasts initWithReader: reader]; } NS_HANDLER { _rEALTYBARONNS0Forecasts = nil; [localException raise]; } NS_ENDHANDLER [_rEALTYBARONNS0Forecasts autorelease]; return _rEALTYBARONNS0Forecasts; } /** * Initialize this instance of REALTYBARONNS0Forecasts 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 REALTYBARONNS0Forecasts 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 REALTYBARONNS0Forecasts from an XML reader. The element to be read is * "forecasts". * * @param reader The XML reader. * @return The REALTYBARONNS0Forecasts. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; REALTYBARONNS0Forecasts *_forecasts = 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 forecasts."]; } } if (xmlStrcmp(BAD_CAST "forecasts", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}forecasts."); #endif _forecasts = (REALTYBARONNS0Forecasts *)[REALTYBARONNS0Forecasts readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}forecasts."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0Forecasts. Expected element forecasts. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read REALTYBARONNS0Forecasts. Expected element forecasts. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _forecasts; } /** * Writes this REALTYBARONNS0Forecasts to XML under element name "forecasts". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _forecasts The Forecasts to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this REALTYBARONNS0Forecasts 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 "forecasts", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}forecasts. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}forecasts for root element {}forecasts..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}forecasts for root element {}forecasts..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}forecasts. 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 "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 "forecast", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}forecast of type {}forecast."); #endif __child = [REALTYBARONNS0Forecast readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}forecast of type {}forecast."); #endif if ([self forecast]) { [self setForecast: [[self forecast] arrayByAddingObject: __child]]; } else { [self setForecast: [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 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 forecast]) { __enumerator = [[self forecast] objectEnumerator]; while ( (__item = [__enumerator nextObject]) ) { 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 [__item 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."]; } } //end item iterator. } } @end /* implementation REALTYBARONNS0Forecasts (JAXB) */ #endif /* DEF_REALTYBARONNS0Forecasts_M */