#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_REALTYBARONNS0AnswerInquiry_M
#define DEF_REALTYBARONNS0AnswerInquiry_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 REALTYBARONNS0AnswerInquiry
/**
* (no documentation provided)
*/
- (REALTYBARONNS0Links *) links
{
return _links;
}
/**
* (no documentation provided)
*/
- (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;
}
- (void) dealloc
{
[self setLinks: nil];
[self setStatus: nil];
[super dealloc];
}
//documentation inherited.
+ (id) readFromXML: (NSData *) xml
{
REALTYBARONNS0AnswerInquiry *_rEALTYBARONNS0AnswerInquiry;
xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
if (reader == NULL) {
[NSException raise: @"XMLReadError"
format: @"Error instantiating an XML reader."];
return nil;
}
_rEALTYBARONNS0AnswerInquiry = (REALTYBARONNS0AnswerInquiry *) [REALTYBARONNS0AnswerInquiry readXMLElement: reader];
xmlFreeTextReader(reader); //free the reader
return _rEALTYBARONNS0AnswerInquiry;
}
//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 REALTYBARONNS0AnswerInquiry */
/**
* Internal, private interface for JAXB reading and writing.
*/
@interface REALTYBARONNS0AnswerInquiry (JAXB)
@end /*interface REALTYBARONNS0AnswerInquiry (JAXB)*/
/**
* Internal, private implementation for JAXB reading and writing.
*/
@implementation REALTYBARONNS0AnswerInquiry (JAXB)
/**
* Read an instance of REALTYBARONNS0AnswerInquiry from an XML reader.
*
* @param reader The reader.
* @return An instance of REALTYBARONNS0AnswerInquiry defined by the XML reader.
*/
+ (id) readXMLType: (xmlTextReaderPtr) reader
{
REALTYBARONNS0AnswerInquiry *_rEALTYBARONNS0AnswerInquiry = [[REALTYBARONNS0AnswerInquiry alloc] init];
NS_DURING
{
[_rEALTYBARONNS0AnswerInquiry initWithReader: reader];
}
NS_HANDLER
{
_rEALTYBARONNS0AnswerInquiry = nil;
[localException raise];
}
NS_ENDHANDLER
[_rEALTYBARONNS0AnswerInquiry autorelease];
return _rEALTYBARONNS0AnswerInquiry;
}
/**
* Initialize this instance of REALTYBARONNS0AnswerInquiry 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 REALTYBARONNS0AnswerInquiry 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 REALTYBARONNS0AnswerInquiry from an XML reader. The element to be read is
* "response".
*
* @param reader The XML reader.
* @return The REALTYBARONNS0AnswerInquiry.
*/
+ (id) readXMLElement: (xmlTextReaderPtr) reader {
int status;
REALTYBARONNS0AnswerInquiry *_answerInquiry = 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
_answerInquiry = (REALTYBARONNS0AnswerInquiry *)[REALTYBARONNS0AnswerInquiry 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 REALTYBARONNS0AnswerInquiry. Expected element response. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
}
else {
[NSException raise: @"XMLReadError"
format: @"Unable to read REALTYBARONNS0AnswerInquiry. Expected element response. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
}
}
return _answerInquiry;
}
/**
* Writes this REALTYBARONNS0AnswerInquiry to XML under element name "response".
* The namespace declarations for the element will be written.
*
* @param writer The XML writer.
* @param _answerInquiry The AnswerInquiry to write.
* @return 1 if successful, 0 otherwise.
*/
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
[self writeXMLElement: writer writeNamespaces: YES];
}
/**
* Writes this REALTYBARONNS0AnswerInquiry 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 {}answerInquiry for root element {}response...");
#endif
[self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote type {}answerInquiry 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"
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."];
}
}
}
@end /* implementation REALTYBARONNS0AnswerInquiry (JAXB) */
#endif /* DEF_REALTYBARONNS0AnswerInquiry_M */
#ifndef DEF_REALTYBARONNS0Auction_M
#define DEF_REALTYBARONNS0Auction_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 REALTYBARONNS0Auction
/**
* (no documentation provided)
*/
- (int *) identifier
{
return _identifier;
}
/**
* (no documentation provided)
*/
- (void) setIdentifier: (int *) newIdentifier
{
if (_identifier != NULL) {
free(_identifier);
}
_identifier = newIdentifier;
}
/**
* secret key
*/
- (NSString *) key
{
return _key;
}
/**
* secret key
*/
- (void) setKey: (NSString *) newKey
{
[newKey retain];
[_key release];
_key = newKey;
}
/**
* (no documentation provided)
*/
- (NSString *) title
{
return _title;
}
/**
* (no documentation provided)
*/
- (void) setTitle: (NSString *) newTitle
{
[newTitle retain];
[_title release];
_title = newTitle;
}
/**
* (no documentation provided)
*/
- (NSString *) bid_quote
{
return _bid_quote;
}
/**
* (no documentation provided)
*/
- (void) setBid_quote: (NSString *) newBid_quote
{
[newBid_quote retain];
[_bid_quote release];
_bid_quote = newBid_quote;
}
/**
* (no documentation provided)
*/
- (NSString *) bid_winner
{
return _bid_winner;
}
/**
* (no documentation provided)
*/
- (void) setBid_winner: (NSString *) newBid_winner
{
[newBid_winner retain];
[_bid_winner release];
_bid_winner = newBid_winner;
}
/**
* (no documentation provided)
*/
- (NSString *) bid_leaders
{
return _bid_leaders;
}
/**
* (no documentation provided)
*/
- (void) setBid_leaders: (NSString *) newBid_leaders
{
[newBid_leaders retain];
[_bid_leaders release];
_bid_leaders = newBid_leaders;
}
/**
* (no documentation provided)
*/
- (NSString *) time_remaining
{
return _time_remaining;
}
/**
* (no documentation provided)
*/
- (void) setTime_remaining: (NSString *) newTime_remaining
{
[newTime_remaining retain];
[_time_remaining release];
_time_remaining = newTime_remaining;
}
/**
* (no documentation provided)
*/
- (int *) bid_count
{
return _bid_count;
}
/**
* (no documentation provided)
*/
- (void) setBid_count: (int *) newBid_count
{
if (_bid_count != NULL) {
free(_bid_count);
}
_bid_count = newBid_count;
}
- (void) dealloc
{
[self setIdentifier: NULL];
[self setKey: nil];
[self setTitle: nil];
[self setBid_quote: nil];
[self setBid_winner: nil];
[self setBid_leaders: nil];
[self setTime_remaining: nil];
[self setBid_count: NULL];
[super dealloc];
}
//documentation inherited.
+ (id) readFromXML: (NSData *) xml
{
REALTYBARONNS0Auction *_rEALTYBARONNS0Auction;
xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
if (reader == NULL) {
[NSException raise: @"XMLReadError"
format: @"Error instantiating an XML reader."];
return nil;
}
_rEALTYBARONNS0Auction = (REALTYBARONNS0Auction *) [REALTYBARONNS0Auction readXMLElement: reader];
xmlFreeTextReader(reader); //free the reader
return _rEALTYBARONNS0Auction;
}
//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 REALTYBARONNS0Auction */
/**
* Internal, private interface for JAXB reading and writing.
*/
@interface REALTYBARONNS0Auction (JAXB)
@end /*interface REALTYBARONNS0Auction (JAXB)*/
/**
* Internal, private implementation for JAXB reading and writing.
*/
@implementation REALTYBARONNS0Auction (JAXB)
/**
* Read an instance of REALTYBARONNS0Auction from an XML reader.
*
* @param reader The reader.
* @return An instance of REALTYBARONNS0Auction defined by the XML reader.
*/
+ (id) readXMLType: (xmlTextReaderPtr) reader
{
REALTYBARONNS0Auction *_rEALTYBARONNS0Auction = [[REALTYBARONNS0Auction alloc] init];
NS_DURING
{
[_rEALTYBARONNS0Auction initWithReader: reader];
}
NS_HANDLER
{
_rEALTYBARONNS0Auction = nil;
[localException raise];
}
NS_ENDHANDLER
[_rEALTYBARONNS0Auction autorelease];
return _rEALTYBARONNS0Auction;
}
/**
* Initialize this instance of REALTYBARONNS0Auction 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 REALTYBARONNS0Auction 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 REALTYBARONNS0Auction from an XML reader. The element to be read is
* "auction".
*
* @param reader The XML reader.
* @return The REALTYBARONNS0Auction.
*/
+ (id) readXMLElement: (xmlTextReaderPtr) reader {
int status;
REALTYBARONNS0Auction *_auction = 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 auction."];
}
}
if (xmlStrcmp(BAD_CAST "auction", xmlTextReaderConstLocalName(reader)) == 0
&& xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
NSLog(@"Attempting to read root element {}auction.");
#endif
_auction = (REALTYBARONNS0Auction *)[REALTYBARONNS0Auction readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
NSLog(@"Successfully read root element {}auction.");
#endif
}
else {
if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
[NSException raise: @"XMLReadError"
format: @"Unable to read REALTYBARONNS0Auction. Expected element auction. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
}
else {
[NSException raise: @"XMLReadError"
format: @"Unable to read REALTYBARONNS0Auction. Expected element auction. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
}
}
return _auction;
}
/**
* Writes this REALTYBARONNS0Auction to XML under element name "auction".
* The namespace declarations for the element will be written.
*
* @param writer The XML writer.
* @param _auction The Auction to write.
* @return 1 if successful, 0 otherwise.
*/
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
[self writeXMLElement: writer writeNamespaces: YES];
}
/**
* Writes this REALTYBARONNS0Auction 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 "auction", NULL);
if (rc < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing start element {}auction. XML writer status: %i\n", rc];
}
#if DEBUG_ENUNCIATE > 1
NSLog(@"writing type {}auction for root element {}auction...");
#endif
[self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote type {}auction for root element {}auction...");
#endif
rc = xmlTextWriterEndElement(writer);
if (rc < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing end element {}auction. 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 "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 "bid_quote", xmlTextReaderConstLocalName(reader)) == 0
&& xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
NSLog(@"Attempting to read choice {}bid_quote of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
__child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully read choice {}bid_quote of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
[self setBid_quote: __child];
return YES;
} //end "if choice"
if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
&& xmlStrcmp(BAD_CAST "bid_winner", xmlTextReaderConstLocalName(reader)) == 0
&& xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
NSLog(@"Attempting to read choice {}bid_winner of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
__child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully read choice {}bid_winner of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
[self setBid_winner: __child];
return YES;
} //end "if choice"
if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
&& xmlStrcmp(BAD_CAST "bid_leaders", xmlTextReaderConstLocalName(reader)) == 0
&& xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
NSLog(@"Attempting to read choice {}bid_leaders of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
__child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully read choice {}bid_leaders of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
[self setBid_leaders: __child];
return YES;
} //end "if choice"
if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
&& xmlStrcmp(BAD_CAST "time_remaining", xmlTextReaderConstLocalName(reader)) == 0
&& xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
NSLog(@"Attempting to read choice {}time_remaining of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
__child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully read choice {}time_remaining of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
[self setTime_remaining: __child];
return YES;
} //end "if choice"
if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
&& xmlStrcmp(BAD_CAST "bid_count", 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 setBid_count: ((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 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 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 bid_quote]) {
status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "bid_quote", NULL);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing start child element {}bid_quote."];
}
#if DEBUG_ENUNCIATE > 1
NSLog(@"writing element {}bid_quote...");
#endif
[[self bid_quote] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote element {}bid_quote...");
#endif
status = xmlTextWriterEndElement(writer);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing end child element {}bid_quote."];
}
}
if ([self bid_winner]) {
status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "bid_winner", NULL);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing start child element {}bid_winner."];
}
#if DEBUG_ENUNCIATE > 1
NSLog(@"writing element {}bid_winner...");
#endif
[[self bid_winner] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote element {}bid_winner...");
#endif
status = xmlTextWriterEndElement(writer);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing end child element {}bid_winner."];
}
}
if ([self bid_leaders]) {
status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "bid_leaders", NULL);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing start child element {}bid_leaders."];
}
#if DEBUG_ENUNCIATE > 1
NSLog(@"writing element {}bid_leaders...");
#endif
[[self bid_leaders] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote element {}bid_leaders...");
#endif
status = xmlTextWriterEndElement(writer);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing end child element {}bid_leaders."];
}
}
if ([self time_remaining]) {
status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "time_remaining", NULL);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing start child element {}time_remaining."];
}
#if DEBUG_ENUNCIATE > 1
NSLog(@"writing element {}time_remaining...");
#endif
[[self time_remaining] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote element {}time_remaining...");
#endif
status = xmlTextWriterEndElement(writer);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing end child element {}time_remaining."];
}
}
if ([self bid_count] != NULL) {
status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "bid_count", NULL);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing start child element {}bid_count."];
}
#if DEBUG_ENUNCIATE > 1
NSLog(@"writing element {}bid_count...");
#endif
status = xmlTextWriterWriteIntType(writer, [self bid_count]);
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote element {}bid_count...");
#endif
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing child element {}bid_count."];
}
status = xmlTextWriterEndElement(writer);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing end child element {}bid_count."];
}
}
}
@end /* implementation REALTYBARONNS0Auction (JAXB) */
#endif /* DEF_REALTYBARONNS0Auction_M */
#ifndef DEF_REALTYBARONNS0Bid_M
#define DEF_REALTYBARONNS0Bid_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 REALTYBARONNS0Bid
/**
* id
*/
- (NSString *) identifier
{
return _identifier;
}
/**
* id
*/
- (void) setIdentifier: (NSString *) newIdentifier
{
[newIdentifier retain];
[_identifier release];
_identifier = newIdentifier;
}
/**
* agent
*/
- (REALTYBARONNS0Agent *) agent
{
return _agent;
}
/**
* agent
*/
- (void) setAgent: (REALTYBARONNS0Agent *) newAgent
{
[newAgent retain];
[_agent release];
_agent = newAgent;
}
/**
* amount formatted as either percentage or currency
*/
- (NSString *) amount
{
return _amount;
}
/**
* amount formatted as either percentage or currency
*/
- (void) setAmount: (NSString *) newAmount
{
[newAmount retain];
[_amount release];
_amount = newAmount;
}
- (void) dealloc
{
[self setIdentifier: nil];
[self setAgent: nil];
[self setAmount: nil];
[super dealloc];
}
//documentation inherited.
+ (id) readFromXML: (NSData *) xml
{
REALTYBARONNS0Bid *_rEALTYBARONNS0Bid;
xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
if (reader == NULL) {
[NSException raise: @"XMLReadError"
format: @"Error instantiating an XML reader."];
return nil;
}
_rEALTYBARONNS0Bid = (REALTYBARONNS0Bid *) [REALTYBARONNS0Bid readXMLElement: reader];
xmlFreeTextReader(reader); //free the reader
return _rEALTYBARONNS0Bid;
}
//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 REALTYBARONNS0Bid */
/**
* Internal, private interface for JAXB reading and writing.
*/
@interface REALTYBARONNS0Bid (JAXB)
@end /*interface REALTYBARONNS0Bid (JAXB)*/
/**
* Internal, private implementation for JAXB reading and writing.
*/
@implementation REALTYBARONNS0Bid (JAXB)
/**
* Read an instance of REALTYBARONNS0Bid from an XML reader.
*
* @param reader The reader.
* @return An instance of REALTYBARONNS0Bid defined by the XML reader.
*/
+ (id) readXMLType: (xmlTextReaderPtr) reader
{
REALTYBARONNS0Bid *_rEALTYBARONNS0Bid = [[REALTYBARONNS0Bid alloc] init];
NS_DURING
{
[_rEALTYBARONNS0Bid initWithReader: reader];
}
NS_HANDLER
{
_rEALTYBARONNS0Bid = nil;
[localException raise];
}
NS_ENDHANDLER
[_rEALTYBARONNS0Bid autorelease];
return _rEALTYBARONNS0Bid;
}
/**
* Initialize this instance of REALTYBARONNS0Bid 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 REALTYBARONNS0Bid 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 REALTYBARONNS0Bid from an XML reader. The element to be read is
* "bid".
*
* @param reader The XML reader.
* @return The REALTYBARONNS0Bid.
*/
+ (id) readXMLElement: (xmlTextReaderPtr) reader {
int status;
REALTYBARONNS0Bid *_bid = 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 bid."];
}
}
if (xmlStrcmp(BAD_CAST "bid", xmlTextReaderConstLocalName(reader)) == 0
&& xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
NSLog(@"Attempting to read root element {}bid.");
#endif
_bid = (REALTYBARONNS0Bid *)[REALTYBARONNS0Bid readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
NSLog(@"Successfully read root element {}bid.");
#endif
}
else {
if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
[NSException raise: @"XMLReadError"
format: @"Unable to read REALTYBARONNS0Bid. Expected element bid. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
}
else {
[NSException raise: @"XMLReadError"
format: @"Unable to read REALTYBARONNS0Bid. Expected element bid. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
}
}
return _bid;
}
/**
* Writes this REALTYBARONNS0Bid to XML under element name "bid".
* The namespace declarations for the element will be written.
*
* @param writer The XML writer.
* @param _bid The Bid to write.
* @return 1 if successful, 0 otherwise.
*/
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
[self writeXMLElement: writer writeNamespaces: YES];
}
/**
* Writes this REALTYBARONNS0Bid 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 "bid", NULL);
if (rc < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing start element {}bid. XML writer status: %i\n", rc];
}
#if DEBUG_ENUNCIATE > 1
NSLog(@"writing type {}bid for root element {}bid...");
#endif
[self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote type {}bid for root element {}bid...");
#endif
rc = xmlTextWriterEndElement(writer);
if (rc < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing end element {}bid. 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 "agent", xmlTextReaderConstLocalName(reader)) == 0
&& xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
NSLog(@"Attempting to read choice {}agent of type {}agent.");
#endif
__child = [REALTYBARONNS0Agent readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully read choice {}agent of type {}agent.");
#endif
[self setAgent: __child];
return YES;
} //end "if choice"
if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
&& xmlStrcmp(BAD_CAST "amount", xmlTextReaderConstLocalName(reader)) == 0
&& xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
NSLog(@"Attempting to read choice {}amount of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
__child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully read choice {}amount of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
[self setAmount: __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 agent]) {
status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "agent", NULL);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing start child element {}agent."];
}
#if DEBUG_ENUNCIATE > 1
NSLog(@"writing element {}agent...");
#endif
[[self agent] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote element {}agent...");
#endif
status = xmlTextWriterEndElement(writer);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing end child element {}agent."];
}
}
if ([self amount]) {
status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "amount", NULL);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing start child element {}amount."];
}
#if DEBUG_ENUNCIATE > 1
NSLog(@"writing element {}amount...");
#endif
[[self amount] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote element {}amount...");
#endif
status = xmlTextWriterEndElement(writer);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing end child element {}amount."];
}
}
}
@end /* implementation REALTYBARONNS0Bid (JAXB) */
#endif /* DEF_REALTYBARONNS0Bid_M */
#ifndef DEF_REALTYBARONNS0CancelAuction_M
#define DEF_REALTYBARONNS0CancelAuction_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 REALTYBARONNS0CancelAuction
/**
* status
*/
- (REALTYBARONNS0Status *) status
{
return _status;
}
/**
* status
*/
- (void) setStatus: (REALTYBARONNS0Status *) newStatus
{
[newStatus retain];
[_status release];
_status = newStatus;
}
- (void) dealloc
{
[self setStatus: nil];
[super dealloc];
}
//documentation inherited.
+ (id) readFromXML: (NSData *) xml
{
REALTYBARONNS0CancelAuction *_rEALTYBARONNS0CancelAuction;
xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
if (reader == NULL) {
[NSException raise: @"XMLReadError"
format: @"Error instantiating an XML reader."];
return nil;
}
_rEALTYBARONNS0CancelAuction = (REALTYBARONNS0CancelAuction *) [REALTYBARONNS0CancelAuction readXMLElement: reader];
xmlFreeTextReader(reader); //free the reader
return _rEALTYBARONNS0CancelAuction;
}
//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 REALTYBARONNS0CancelAuction */
/**
* Internal, private interface for JAXB reading and writing.
*/
@interface REALTYBARONNS0CancelAuction (JAXB)
@end /*interface REALTYBARONNS0CancelAuction (JAXB)*/
/**
* Internal, private implementation for JAXB reading and writing.
*/
@implementation REALTYBARONNS0CancelAuction (JAXB)
/**
* Read an instance of REALTYBARONNS0CancelAuction from an XML reader.
*
* @param reader The reader.
* @return An instance of REALTYBARONNS0CancelAuction defined by the XML reader.
*/
+ (id) readXMLType: (xmlTextReaderPtr) reader
{
REALTYBARONNS0CancelAuction *_rEALTYBARONNS0CancelAuction = [[REALTYBARONNS0CancelAuction alloc] init];
NS_DURING
{
[_rEALTYBARONNS0CancelAuction initWithReader: reader];
}
NS_HANDLER
{
_rEALTYBARONNS0CancelAuction = nil;
[localException raise];
}
NS_ENDHANDLER
[_rEALTYBARONNS0CancelAuction autorelease];
return _rEALTYBARONNS0CancelAuction;
}
/**
* Initialize this instance of REALTYBARONNS0CancelAuction 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 REALTYBARONNS0CancelAuction 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 REALTYBARONNS0CancelAuction from an XML reader. The element to be read is
* "response".
*
* @param reader The XML reader.
* @return The REALTYBARONNS0CancelAuction.
*/
+ (id) readXMLElement: (xmlTextReaderPtr) reader {
int status;
REALTYBARONNS0CancelAuction *_cancelAuction = 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
_cancelAuction = (REALTYBARONNS0CancelAuction *)[REALTYBARONNS0CancelAuction 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 REALTYBARONNS0CancelAuction. Expected element response. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
}
else {
[NSException raise: @"XMLReadError"
format: @"Unable to read REALTYBARONNS0CancelAuction. Expected element response. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
}
}
return _cancelAuction;
}
/**
* Writes this REALTYBARONNS0CancelAuction to XML under element name "response".
* The namespace declarations for the element will be written.
*
* @param writer The XML writer.
* @param _cancelAuction The CancelAuction to write.
* @return 1 if successful, 0 otherwise.
*/
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
[self writeXMLElement: writer writeNamespaces: YES];
}
/**
* Writes this REALTYBARONNS0CancelAuction 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 {}cancelAuction for root element {}response...");
#endif
[self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote type {}cancelAuction 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"
return NO;
}
//documentation inherited.
- (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader
{
return [super readUnknownJAXBChildElement: reader];
}
//documentation inherited.
- (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader
{
[super readUnknownJAXBAttribute: reader];
}
//documentation inherited.
- (void) writeJAXBAttributes: (xmlTextWriterPtr) writer
{
int status;
[super writeJAXBAttributes: writer];
}
//documentation inherited.
- (void) writeJAXBValue: (xmlTextWriterPtr) writer
{
[super writeJAXBValue: writer];
}
/**
* Method for writing the child elements.
*
* @param writer The writer.
*/
- (void) writeJAXBChildElements: (xmlTextWriterPtr) writer
{
int status;
id __item;
NSEnumerator *__enumerator;
[super writeJAXBChildElements: writer];
if ([self status]) {
status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "status", NULL);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing start child element {}status."];
}
#if DEBUG_ENUNCIATE > 1
NSLog(@"writing element {}status...");
#endif
[[self status] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote element {}status...");
#endif
status = xmlTextWriterEndElement(writer);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing end child element {}status."];
}
}
}
@end /* implementation REALTYBARONNS0CancelAuction (JAXB) */
#endif /* DEF_REALTYBARONNS0CancelAuction_M */
#ifndef DEF_REALTYBARONNS0FindAuctions_M
#define DEF_REALTYBARONNS0FindAuctions_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 REALTYBARONNS0FindAuctions
/**
* status
*/
- (REALTYBARONNS0Status *) status
{
return _status;
}
/**
* status
*/
- (void) setStatus: (REALTYBARONNS0Status *) newStatus
{
[newStatus retain];
[_status release];
_status = newStatus;
}
/**
* list of auctions
*/
- (REALTYBARONNS0Auctions *) auctions
{
return _auctions;
}
/**
* list of auctions
*/
- (void) setAuctions: (REALTYBARONNS0Auctions *) newAuctions
{
[newAuctions retain];
[_auctions release];
_auctions = newAuctions;
}
- (void) dealloc
{
[self setStatus: nil];
[self setAuctions: nil];
[super dealloc];
}
//documentation inherited.
+ (id) readFromXML: (NSData *) xml
{
REALTYBARONNS0FindAuctions *_rEALTYBARONNS0FindAuctions;
xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
if (reader == NULL) {
[NSException raise: @"XMLReadError"
format: @"Error instantiating an XML reader."];
return nil;
}
_rEALTYBARONNS0FindAuctions = (REALTYBARONNS0FindAuctions *) [REALTYBARONNS0FindAuctions readXMLElement: reader];
xmlFreeTextReader(reader); //free the reader
return _rEALTYBARONNS0FindAuctions;
}
//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 REALTYBARONNS0FindAuctions */
/**
* Internal, private interface for JAXB reading and writing.
*/
@interface REALTYBARONNS0FindAuctions (JAXB)
@end /*interface REALTYBARONNS0FindAuctions (JAXB)*/
/**
* Internal, private implementation for JAXB reading and writing.
*/
@implementation REALTYBARONNS0FindAuctions (JAXB)
/**
* Read an instance of REALTYBARONNS0FindAuctions from an XML reader.
*
* @param reader The reader.
* @return An instance of REALTYBARONNS0FindAuctions defined by the XML reader.
*/
+ (id) readXMLType: (xmlTextReaderPtr) reader
{
REALTYBARONNS0FindAuctions *_rEALTYBARONNS0FindAuctions = [[REALTYBARONNS0FindAuctions alloc] init];
NS_DURING
{
[_rEALTYBARONNS0FindAuctions initWithReader: reader];
}
NS_HANDLER
{
_rEALTYBARONNS0FindAuctions = nil;
[localException raise];
}
NS_ENDHANDLER
[_rEALTYBARONNS0FindAuctions autorelease];
return _rEALTYBARONNS0FindAuctions;
}
/**
* Initialize this instance of REALTYBARONNS0FindAuctions 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 REALTYBARONNS0FindAuctions 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 REALTYBARONNS0FindAuctions from an XML reader. The element to be read is
* "response".
*
* @param reader The XML reader.
* @return The REALTYBARONNS0FindAuctions.
*/
+ (id) readXMLElement: (xmlTextReaderPtr) reader {
int status;
REALTYBARONNS0FindAuctions *_findAuctions = 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
_findAuctions = (REALTYBARONNS0FindAuctions *)[REALTYBARONNS0FindAuctions 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 REALTYBARONNS0FindAuctions. Expected element response. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
}
else {
[NSException raise: @"XMLReadError"
format: @"Unable to read REALTYBARONNS0FindAuctions. Expected element response. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
}
}
return _findAuctions;
}
/**
* Writes this REALTYBARONNS0FindAuctions to XML under element name "response".
* The namespace declarations for the element will be written.
*
* @param writer The XML writer.
* @param _findAuctions The FindAuctions to write.
* @return 1 if successful, 0 otherwise.
*/
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
[self writeXMLElement: writer writeNamespaces: YES];
}
/**
* Writes this REALTYBARONNS0FindAuctions 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 {}findAuctions for root element {}response...");
#endif
[self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote type {}findAuctions 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 "auctions", xmlTextReaderConstLocalName(reader)) == 0
&& xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
NSLog(@"Attempting to read choice {}auctions of type {}auctions.");
#endif
__child = [REALTYBARONNS0Auctions readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully read choice {}auctions of type {}auctions.");
#endif
[self setAuctions: __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 auctions]) {
status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "auctions", NULL);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing start child element {}auctions."];
}
#if DEBUG_ENUNCIATE > 1
NSLog(@"writing element {}auctions...");
#endif
[[self auctions] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote element {}auctions...");
#endif
status = xmlTextWriterEndElement(writer);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing end child element {}auctions."];
}
}
}
@end /* implementation REALTYBARONNS0FindAuctions (JAXB) */
#endif /* DEF_REALTYBARONNS0FindAuctions_M */
#ifndef DEF_REALTYBARONNS0GetReview_M
#define DEF_REALTYBARONNS0GetReview_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 REALTYBARONNS0GetReview
/**
* (no documentation provided)
*/
- (REALTYBARONNS0Status *) status
{
return _status;
}
/**
* (no documentation provided)
*/
- (void) setStatus: (REALTYBARONNS0Status *) newStatus
{
[newStatus retain];
[_status release];
_status = newStatus;
}
/**
* (no documentation provided)
*/
- (REALTYBARONNS0Review *) review
{
return _review;
}
/**
* (no documentation provided)
*/
- (void) setReview: (REALTYBARONNS0Review *) newReview
{
[newReview retain];
[_review release];
_review = newReview;
}
- (void) dealloc
{
[self setStatus: nil];
[self setReview: nil];
[super dealloc];
}
//documentation inherited.
+ (id) readFromXML: (NSData *) xml
{
REALTYBARONNS0GetReview *_rEALTYBARONNS0GetReview;
xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
if (reader == NULL) {
[NSException raise: @"XMLReadError"
format: @"Error instantiating an XML reader."];
return nil;
}
_rEALTYBARONNS0GetReview = (REALTYBARONNS0GetReview *) [REALTYBARONNS0GetReview readXMLElement: reader];
xmlFreeTextReader(reader); //free the reader
return _rEALTYBARONNS0GetReview;
}
//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 REALTYBARONNS0GetReview */
/**
* Internal, private interface for JAXB reading and writing.
*/
@interface REALTYBARONNS0GetReview (JAXB)
@end /*interface REALTYBARONNS0GetReview (JAXB)*/
/**
* Internal, private implementation for JAXB reading and writing.
*/
@implementation REALTYBARONNS0GetReview (JAXB)
/**
* Read an instance of REALTYBARONNS0GetReview from an XML reader.
*
* @param reader The reader.
* @return An instance of REALTYBARONNS0GetReview defined by the XML reader.
*/
+ (id) readXMLType: (xmlTextReaderPtr) reader
{
REALTYBARONNS0GetReview *_rEALTYBARONNS0GetReview = [[REALTYBARONNS0GetReview alloc] init];
NS_DURING
{
[_rEALTYBARONNS0GetReview initWithReader: reader];
}
NS_HANDLER
{
_rEALTYBARONNS0GetReview = nil;
[localException raise];
}
NS_ENDHANDLER
[_rEALTYBARONNS0GetReview autorelease];
return _rEALTYBARONNS0GetReview;
}
/**
* Initialize this instance of REALTYBARONNS0GetReview 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 REALTYBARONNS0GetReview 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 REALTYBARONNS0GetReview from an XML reader. The element to be read is
* "response".
*
* @param reader The XML reader.
* @return The REALTYBARONNS0GetReview.
*/
+ (id) readXMLElement: (xmlTextReaderPtr) reader {
int status;
REALTYBARONNS0GetReview *_getReview = nil;
if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) {
status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
if (status < 1) {
[NSException raise: @"XMLReadError"
format: @"Error advancing the reader to start element response."];
}
}
if (xmlStrcmp(BAD_CAST "response", xmlTextReaderConstLocalName(reader)) == 0
&& xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
NSLog(@"Attempting to read root element {}response.");
#endif
_getReview = (REALTYBARONNS0GetReview *)[REALTYBARONNS0GetReview 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 REALTYBARONNS0GetReview. Expected element response. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
}
else {
[NSException raise: @"XMLReadError"
format: @"Unable to read REALTYBARONNS0GetReview. Expected element response. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
}
}
return _getReview;
}
/**
* Writes this REALTYBARONNS0GetReview to XML under element name "response".
* The namespace declarations for the element will be written.
*
* @param writer The XML writer.
* @param _getReview The GetReview to write.
* @return 1 if successful, 0 otherwise.
*/
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
[self writeXMLElement: writer writeNamespaces: YES];
}
/**
* Writes this REALTYBARONNS0GetReview to an XML writer.
*
* @param writer The writer.
* @param writeNs Whether to write the namespaces for this element to the xml writer.
*/
- (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs
{
int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "response", NULL);
if (rc < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing start element {}response. XML writer status: %i\n", rc];
}
#if DEBUG_ENUNCIATE > 1
NSLog(@"writing type {}getReview for root element {}response...");
#endif
[self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote type {}getReview for root element {}response...");
#endif
rc = xmlTextWriterEndElement(writer);
if (rc < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing end element {}response. XML writer status: %i\n", rc];
}
}
//documentation inherited.
- (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader
{
void *_child_accessor;
if ([super readJAXBAttribute: reader]) {
return YES;
}
return NO;
}
//documentation inherited.
- (BOOL) readJAXBValue: (xmlTextReaderPtr) reader
{
return [super readJAXBValue: reader];
}
//documentation inherited.
- (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader
{
id __child;
void *_child_accessor;
int status, depth;
if ([super readJAXBChildElement: reader]) {
return YES;
}
if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
&& xmlStrcmp(BAD_CAST "status", xmlTextReaderConstLocalName(reader)) == 0
&& xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
NSLog(@"Attempting to read choice {}status of type {}status.");
#endif
__child = [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 "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
[self setReview: __child];
return YES;
} //end "if choice"
return NO;
}
//documentation inherited.
- (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader
{
return [super readUnknownJAXBChildElement: reader];
}
//documentation inherited.
- (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader
{
[super readUnknownJAXBAttribute: reader];
}
//documentation inherited.
- (void) writeJAXBAttributes: (xmlTextWriterPtr) writer
{
int status;
[super writeJAXBAttributes: writer];
}
//documentation inherited.
- (void) writeJAXBValue: (xmlTextWriterPtr) writer
{
[super writeJAXBValue: writer];
}
/**
* Method for writing the child elements.
*
* @param writer The writer.
*/
- (void) writeJAXBChildElements: (xmlTextWriterPtr) writer
{
int status;
id __item;
NSEnumerator *__enumerator;
[super writeJAXBChildElements: writer];
if ([self status]) {
status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "status", NULL);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing start child element {}status."];
}
#if DEBUG_ENUNCIATE > 1
NSLog(@"writing element {}status...");
#endif
[[self status] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote element {}status...");
#endif
status = xmlTextWriterEndElement(writer);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing end child element {}status."];
}
}
if ([self review]) {
status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "review", NULL);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing start child element {}review."];
}
#if DEBUG_ENUNCIATE > 1
NSLog(@"writing element {}review...");
#endif
[[self review] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote element {}review...");
#endif
status = xmlTextWriterEndElement(writer);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing end child element {}review."];
}
}
}
@end /* implementation REALTYBARONNS0GetReview (JAXB) */
#endif /* DEF_REALTYBARONNS0GetReview_M */
#ifndef DEF_REALTYBARONNS0Lead_M
#define DEF_REALTYBARONNS0Lead_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 REALTYBARONNS0Lead
/**
* lead ID
*/
- (int *) identifier
{
return _identifier;
}
/**
* lead ID
*/
- (void) setIdentifier: (int *) newIdentifier
{
if (_identifier != NULL) {
free(_identifier);
}
_identifier = newIdentifier;
}
/**
* source ID
*/
- (int *) source
{
return _source;
}
/**
* source ID
*/
- (void) setSource: (int *) newSource
{
if (_source != NULL) {
free(_source);
}
_source = newSource;
}
/**
* link
*/
- (REALTYBARONNS0Link *) agreement
{
return _agreement;
}
/**
* link
*/
- (void) setAgreement: (REALTYBARONNS0Link *) newAgreement
{
[newAgreement retain];
[_agreement release];
_agreement = newAgreement;
}
/**
* user recipient
*/
- (REALTYBARONNS0User *) recipient
{
return _recipient;
}
/**
* user recipient
*/
- (void) setRecipient: (REALTYBARONNS0User *) newRecipient
{
[newRecipient retain];
[_recipient release];
_recipient = newRecipient;
}
/**
* (no documentation provided)
*/
- (enum REALTYBARONNS0LeadStatus *) status
{
return _status;
}
/**
* (no documentation provided)
*/
- (void) setStatus: (enum REALTYBARONNS0LeadStatus *) newStatus
{
if (_status != NULL) {
free(_status);
}
_status = newStatus;
}
- (void) dealloc
{
[self setIdentifier: NULL];
[self setSource: NULL];
[self setAgreement: nil];
[self setRecipient: nil];
[self setStatus: NULL];
[super dealloc];
}
//documentation inherited.
+ (id) readFromXML: (NSData *) xml
{
REALTYBARONNS0Lead *_rEALTYBARONNS0Lead;
xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
if (reader == NULL) {
[NSException raise: @"XMLReadError"
format: @"Error instantiating an XML reader."];
return nil;
}
_rEALTYBARONNS0Lead = (REALTYBARONNS0Lead *) [REALTYBARONNS0Lead readXMLElement: reader];
xmlFreeTextReader(reader); //free the reader
return _rEALTYBARONNS0Lead;
}
//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 REALTYBARONNS0Lead */
/**
* Internal, private interface for JAXB reading and writing.
*/
@interface REALTYBARONNS0Lead (JAXB)
@end /*interface REALTYBARONNS0Lead (JAXB)*/
/**
* Internal, private implementation for JAXB reading and writing.
*/
@implementation REALTYBARONNS0Lead (JAXB)
/**
* Read an instance of REALTYBARONNS0Lead from an XML reader.
*
* @param reader The reader.
* @return An instance of REALTYBARONNS0Lead defined by the XML reader.
*/
+ (id) readXMLType: (xmlTextReaderPtr) reader
{
REALTYBARONNS0Lead *_rEALTYBARONNS0Lead = [[REALTYBARONNS0Lead alloc] init];
NS_DURING
{
[_rEALTYBARONNS0Lead initWithReader: reader];
}
NS_HANDLER
{
_rEALTYBARONNS0Lead = nil;
[localException raise];
}
NS_ENDHANDLER
[_rEALTYBARONNS0Lead autorelease];
return _rEALTYBARONNS0Lead;
}
/**
* Initialize this instance of REALTYBARONNS0Lead 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 REALTYBARONNS0Lead 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 REALTYBARONNS0Lead from an XML reader. The element to be read is
* "lead".
*
* @param reader The XML reader.
* @return The REALTYBARONNS0Lead.
*/
+ (id) readXMLElement: (xmlTextReaderPtr) reader {
int status;
REALTYBARONNS0Lead *_lead = 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 lead."];
}
}
if (xmlStrcmp(BAD_CAST "lead", xmlTextReaderConstLocalName(reader)) == 0
&& xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
NSLog(@"Attempting to read root element {}lead.");
#endif
_lead = (REALTYBARONNS0Lead *)[REALTYBARONNS0Lead readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
NSLog(@"Successfully read root element {}lead.");
#endif
}
else {
if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
[NSException raise: @"XMLReadError"
format: @"Unable to read REALTYBARONNS0Lead. Expected element lead. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
}
else {
[NSException raise: @"XMLReadError"
format: @"Unable to read REALTYBARONNS0Lead. Expected element lead. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
}
}
return _lead;
}
/**
* Writes this REALTYBARONNS0Lead to XML under element name "lead".
* The namespace declarations for the element will be written.
*
* @param writer The XML writer.
* @param _lead The Lead to write.
* @return 1 if successful, 0 otherwise.
*/
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
[self writeXMLElement: writer writeNamespaces: YES];
}
/**
* Writes this REALTYBARONNS0Lead 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 "lead", NULL);
if (rc < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing start element {}lead. XML writer status: %i\n", rc];
}
#if DEBUG_ENUNCIATE > 1
NSLog(@"writing type {}lead for root element {}lead...");
#endif
[self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote type {}lead for root element {}lead...");
#endif
rc = xmlTextWriterEndElement(writer);
if (rc < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing end element {}lead. 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 "source", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) {
#if DEBUG_ENUNCIATE > 1
NSLog(@"Attempting to read attribute {}source...");
#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 {}source."];
}
[self setSource: ((int*) _child_accessor)];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully read attribute {}source...");
#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 "agreement", xmlTextReaderConstLocalName(reader)) == 0
&& xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
NSLog(@"Attempting to read choice {}agreement of type {}link.");
#endif
__child = [REALTYBARONNS0Link readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully read choice {}agreement of type {}link.");
#endif
[self setAgreement: __child];
return YES;
} //end "if choice"
if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
&& xmlStrcmp(BAD_CAST "recipient", xmlTextReaderConstLocalName(reader)) == 0
&& xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
NSLog(@"Attempting to read choice {}recipient of type {}user.");
#endif
__child = [REALTYBARONNS0User readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully read choice {}recipient of type {}user.");
#endif
[self setRecipient: __child];
return YES;
} //end "if choice"
if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
&& xmlStrcmp(BAD_CAST "status", xmlTextReaderConstLocalName(reader)) == 0
&& xmlTextReaderConstNamespaceUri(reader) == NULL) {
_child_accessor = xmlTextReaderReadREALTYBARONNS0LeadStatusType(reader);
if (_child_accessor == NULL) {
//panic: unable to return the value for some reason.
[NSException raise: @"XMLReadError"
format: @"Error reading element value."];
}
[self setStatus: ((enum REALTYBARONNS0LeadStatus*) _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 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 source] != NULL) {
status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "source", NULL);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing start attribute {}source."];
}
#if DEBUG_ENUNCIATE > 1
NSLog(@"writing attribute {}source...");
#endif
status = xmlTextWriterWriteIntType(writer, [self source]);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing attribute {}source."];
}
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote attribute {}source...");
#endif
status = xmlTextWriterEndAttribute(writer);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing end attribute {}source."];
}
}
}
//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 agreement]) {
status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "agreement", NULL);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing start child element {}agreement."];
}
#if DEBUG_ENUNCIATE > 1
NSLog(@"writing element {}agreement...");
#endif
[[self agreement] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote element {}agreement...");
#endif
status = xmlTextWriterEndElement(writer);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing end child element {}agreement."];
}
}
if ([self recipient]) {
status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "recipient", NULL);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing start child element {}recipient."];
}
#if DEBUG_ENUNCIATE > 1
NSLog(@"writing element {}recipient...");
#endif
[[self recipient] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote element {}recipient...");
#endif
status = xmlTextWriterEndElement(writer);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing end child element {}recipient."];
}
}
if ([self status] != NULL) {
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
status = xmlTextWriterWriteREALTYBARONNS0LeadStatusType(writer, [self status]);
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote element {}status...");
#endif
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing child element {}status."];
}
status = xmlTextWriterEndElement(writer);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing end child element {}status."];
}
}
}
@end /* implementation REALTYBARONNS0Lead (JAXB) */
#endif /* DEF_REALTYBARONNS0Lead_M */
#ifndef DEF_REALTYBARONNS0ListAuctions_M
#define DEF_REALTYBARONNS0ListAuctions_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 REALTYBARONNS0ListAuctions
/**
* status
*/
- (REALTYBARONNS0Status *) status
{
return _status;
}
/**
* status
*/
- (void) setStatus: (REALTYBARONNS0Status *) newStatus
{
[newStatus retain];
[_status release];
_status = newStatus;
}
/**
* auctions
*/
- (REALTYBARONNS0Auctions *) auctions
{
return _auctions;
}
/**
* auctions
*/
- (void) setAuctions: (REALTYBARONNS0Auctions *) newAuctions
{
[newAuctions retain];
[_auctions release];
_auctions = newAuctions;
}
- (void) dealloc
{
[self setStatus: nil];
[self setAuctions: nil];
[super dealloc];
}
//documentation inherited.
+ (id) readFromXML: (NSData *) xml
{
REALTYBARONNS0ListAuctions *_rEALTYBARONNS0ListAuctions;
xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
if (reader == NULL) {
[NSException raise: @"XMLReadError"
format: @"Error instantiating an XML reader."];
return nil;
}
_rEALTYBARONNS0ListAuctions = (REALTYBARONNS0ListAuctions *) [REALTYBARONNS0ListAuctions readXMLElement: reader];
xmlFreeTextReader(reader); //free the reader
return _rEALTYBARONNS0ListAuctions;
}
//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 REALTYBARONNS0ListAuctions */
/**
* Internal, private interface for JAXB reading and writing.
*/
@interface REALTYBARONNS0ListAuctions (JAXB)
@end /*interface REALTYBARONNS0ListAuctions (JAXB)*/
/**
* Internal, private implementation for JAXB reading and writing.
*/
@implementation REALTYBARONNS0ListAuctions (JAXB)
/**
* Read an instance of REALTYBARONNS0ListAuctions from an XML reader.
*
* @param reader The reader.
* @return An instance of REALTYBARONNS0ListAuctions defined by the XML reader.
*/
+ (id) readXMLType: (xmlTextReaderPtr) reader
{
REALTYBARONNS0ListAuctions *_rEALTYBARONNS0ListAuctions = [[REALTYBARONNS0ListAuctions alloc] init];
NS_DURING
{
[_rEALTYBARONNS0ListAuctions initWithReader: reader];
}
NS_HANDLER
{
_rEALTYBARONNS0ListAuctions = nil;
[localException raise];
}
NS_ENDHANDLER
[_rEALTYBARONNS0ListAuctions autorelease];
return _rEALTYBARONNS0ListAuctions;
}
/**
* Initialize this instance of REALTYBARONNS0ListAuctions 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 REALTYBARONNS0ListAuctions 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 REALTYBARONNS0ListAuctions from an XML reader. The element to be read is
* "response".
*
* @param reader The XML reader.
* @return The REALTYBARONNS0ListAuctions.
*/
+ (id) readXMLElement: (xmlTextReaderPtr) reader {
int status;
REALTYBARONNS0ListAuctions *_listAuctions = 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
_listAuctions = (REALTYBARONNS0ListAuctions *)[REALTYBARONNS0ListAuctions 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 REALTYBARONNS0ListAuctions. Expected element response. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
}
else {
[NSException raise: @"XMLReadError"
format: @"Unable to read REALTYBARONNS0ListAuctions. Expected element response. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
}
}
return _listAuctions;
}
/**
* Writes this REALTYBARONNS0ListAuctions to XML under element name "response".
* The namespace declarations for the element will be written.
*
* @param writer The XML writer.
* @param _listAuctions The ListAuctions to write.
* @return 1 if successful, 0 otherwise.
*/
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
[self writeXMLElement: writer writeNamespaces: YES];
}
/**
* Writes this REALTYBARONNS0ListAuctions 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 {}listAuctions for root element {}response...");
#endif
[self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote type {}listAuctions 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 "auctions", xmlTextReaderConstLocalName(reader)) == 0
&& xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
NSLog(@"Attempting to read choice {}auctions of type {}auctions.");
#endif
__child = [REALTYBARONNS0Auctions readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully read choice {}auctions of type {}auctions.");
#endif
[self setAuctions: __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 auctions]) {
status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "auctions", NULL);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing start child element {}auctions."];
}
#if DEBUG_ENUNCIATE > 1
NSLog(@"writing element {}auctions...");
#endif
[[self auctions] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote element {}auctions...");
#endif
status = xmlTextWriterEndElement(writer);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing end child element {}auctions."];
}
}
}
@end /* implementation REALTYBARONNS0ListAuctions (JAXB) */
#endif /* DEF_REALTYBARONNS0ListAuctions_M */
#ifndef DEF_REALTYBARONNS0OpenAuction_M
#define DEF_REALTYBARONNS0OpenAuction_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 REALTYBARONNS0OpenAuction
/**
* (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)
*/
- (REALTYBARONNS0Links *) links
{
return _links;
}
/**
* (no documentation provided)
*/
- (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;
}
- (void) dealloc
{
[self setIdentifier: NULL];
[self setKey: nil];
[self setLinks: nil];
[self setStatus: nil];
[super dealloc];
}
//documentation inherited.
+ (id) readFromXML: (NSData *) xml
{
REALTYBARONNS0OpenAuction *_rEALTYBARONNS0OpenAuction;
xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
if (reader == NULL) {
[NSException raise: @"XMLReadError"
format: @"Error instantiating an XML reader."];
return nil;
}
_rEALTYBARONNS0OpenAuction = (REALTYBARONNS0OpenAuction *) [REALTYBARONNS0OpenAuction readXMLElement: reader];
xmlFreeTextReader(reader); //free the reader
return _rEALTYBARONNS0OpenAuction;
}
//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 REALTYBARONNS0OpenAuction */
/**
* Internal, private interface for JAXB reading and writing.
*/
@interface REALTYBARONNS0OpenAuction (JAXB)
@end /*interface REALTYBARONNS0OpenAuction (JAXB)*/
/**
* Internal, private implementation for JAXB reading and writing.
*/
@implementation REALTYBARONNS0OpenAuction (JAXB)
/**
* Read an instance of REALTYBARONNS0OpenAuction from an XML reader.
*
* @param reader The reader.
* @return An instance of REALTYBARONNS0OpenAuction defined by the XML reader.
*/
+ (id) readXMLType: (xmlTextReaderPtr) reader
{
REALTYBARONNS0OpenAuction *_rEALTYBARONNS0OpenAuction = [[REALTYBARONNS0OpenAuction alloc] init];
NS_DURING
{
[_rEALTYBARONNS0OpenAuction initWithReader: reader];
}
NS_HANDLER
{
_rEALTYBARONNS0OpenAuction = nil;
[localException raise];
}
NS_ENDHANDLER
[_rEALTYBARONNS0OpenAuction autorelease];
return _rEALTYBARONNS0OpenAuction;
}
/**
* Initialize this instance of REALTYBARONNS0OpenAuction 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 REALTYBARONNS0OpenAuction 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 REALTYBARONNS0OpenAuction from an XML reader. The element to be read is
* "response".
*
* @param reader The XML reader.
* @return The REALTYBARONNS0OpenAuction.
*/
+ (id) readXMLElement: (xmlTextReaderPtr) reader {
int status;
REALTYBARONNS0OpenAuction *_openAuction = 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
_openAuction = (REALTYBARONNS0OpenAuction *)[REALTYBARONNS0OpenAuction 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 REALTYBARONNS0OpenAuction. Expected element response. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
}
else {
[NSException raise: @"XMLReadError"
format: @"Unable to read REALTYBARONNS0OpenAuction. Expected element response. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
}
}
return _openAuction;
}
/**
* Writes this REALTYBARONNS0OpenAuction to XML under element name "response".
* The namespace declarations for the element will be written.
*
* @param writer The XML writer.
* @param _openAuction The OpenAuction to write.
* @return 1 if successful, 0 otherwise.
*/
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
[self writeXMLElement: writer writeNamespaces: YES];
}
/**
* Writes this REALTYBARONNS0OpenAuction 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 {}openAuction for root element {}response...");
#endif
[self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote type {}openAuction 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;
}
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 "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"
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 links]) {
status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "links", NULL);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing start child element {}links."];
}
#if DEBUG_ENUNCIATE > 1
NSLog(@"writing element {}links...");
#endif
[[self links] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote element {}links...");
#endif
status = xmlTextWriterEndElement(writer);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing end child element {}links."];
}
}
if ([self status]) {
status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "status", NULL);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing start child element {}status."];
}
#if DEBUG_ENUNCIATE > 1
NSLog(@"writing element {}status...");
#endif
[[self status] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote element {}status...");
#endif
status = xmlTextWriterEndElement(writer);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing end child element {}status."];
}
}
}
@end /* implementation REALTYBARONNS0OpenAuction (JAXB) */
#endif /* DEF_REALTYBARONNS0OpenAuction_M */
#ifndef DEF_REALTYBARONNS0SelectBid_M
#define DEF_REALTYBARONNS0SelectBid_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 REALTYBARONNS0SelectBid
/**
* bid
*/
- (REALTYBARONNS0Links *) links
{
return _links;
}
/**
* bid
*/
- (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;
}
- (void) dealloc
{
[self setLinks: nil];
[self setStatus: nil];
[super dealloc];
}
//documentation inherited.
+ (id) readFromXML: (NSData *) xml
{
REALTYBARONNS0SelectBid *_rEALTYBARONNS0SelectBid;
xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
if (reader == NULL) {
[NSException raise: @"XMLReadError"
format: @"Error instantiating an XML reader."];
return nil;
}
_rEALTYBARONNS0SelectBid = (REALTYBARONNS0SelectBid *) [REALTYBARONNS0SelectBid readXMLElement: reader];
xmlFreeTextReader(reader); //free the reader
return _rEALTYBARONNS0SelectBid;
}
//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 REALTYBARONNS0SelectBid */
/**
* Internal, private interface for JAXB reading and writing.
*/
@interface REALTYBARONNS0SelectBid (JAXB)
@end /*interface REALTYBARONNS0SelectBid (JAXB)*/
/**
* Internal, private implementation for JAXB reading and writing.
*/
@implementation REALTYBARONNS0SelectBid (JAXB)
/**
* Read an instance of REALTYBARONNS0SelectBid from an XML reader.
*
* @param reader The reader.
* @return An instance of REALTYBARONNS0SelectBid defined by the XML reader.
*/
+ (id) readXMLType: (xmlTextReaderPtr) reader
{
REALTYBARONNS0SelectBid *_rEALTYBARONNS0SelectBid = [[REALTYBARONNS0SelectBid alloc] init];
NS_DURING
{
[_rEALTYBARONNS0SelectBid initWithReader: reader];
}
NS_HANDLER
{
_rEALTYBARONNS0SelectBid = nil;
[localException raise];
}
NS_ENDHANDLER
[_rEALTYBARONNS0SelectBid autorelease];
return _rEALTYBARONNS0SelectBid;
}
/**
* Initialize this instance of REALTYBARONNS0SelectBid 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 REALTYBARONNS0SelectBid 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 REALTYBARONNS0SelectBid from an XML reader. The element to be read is
* "response".
*
* @param reader The XML reader.
* @return The REALTYBARONNS0SelectBid.
*/
+ (id) readXMLElement: (xmlTextReaderPtr) reader {
int status;
REALTYBARONNS0SelectBid *_selectBid = 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
_selectBid = (REALTYBARONNS0SelectBid *)[REALTYBARONNS0SelectBid 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 REALTYBARONNS0SelectBid. Expected element response. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
}
else {
[NSException raise: @"XMLReadError"
format: @"Unable to read REALTYBARONNS0SelectBid. Expected element response. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
}
}
return _selectBid;
}
/**
* Writes this REALTYBARONNS0SelectBid to XML under element name "response".
* The namespace declarations for the element will be written.
*
* @param writer The XML writer.
* @param _selectBid The SelectBid to write.
* @return 1 if successful, 0 otherwise.
*/
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
[self writeXMLElement: writer writeNamespaces: YES];
}
/**
* Writes this REALTYBARONNS0SelectBid 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 {}selectBid for root element {}response...");
#endif
[self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote type {}selectBid 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"
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."];
}
}
}
@end /* implementation REALTYBARONNS0SelectBid (JAXB) */
#endif /* DEF_REALTYBARONNS0SelectBid_M */
#ifndef DEF_REALTYBARONNS0ViewBid_M
#define DEF_REALTYBARONNS0ViewBid_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 REALTYBARONNS0ViewBid
/**
* bid
*/
- (REALTYBARONNS0Bid *) bid
{
return _bid;
}
/**
* bid
*/
- (void) setBid: (REALTYBARONNS0Bid *) newBid
{
[newBid retain];
[_bid release];
_bid = newBid;
}
/**
* status
*/
- (REALTYBARONNS0Status *) status
{
return _status;
}
/**
* status
*/
- (void) setStatus: (REALTYBARONNS0Status *) newStatus
{
[newStatus retain];
[_status release];
_status = newStatus;
}
- (void) dealloc
{
[self setBid: nil];
[self setStatus: nil];
[super dealloc];
}
//documentation inherited.
+ (id) readFromXML: (NSData *) xml
{
REALTYBARONNS0ViewBid *_rEALTYBARONNS0ViewBid;
xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
if (reader == NULL) {
[NSException raise: @"XMLReadError"
format: @"Error instantiating an XML reader."];
return nil;
}
_rEALTYBARONNS0ViewBid = (REALTYBARONNS0ViewBid *) [REALTYBARONNS0ViewBid readXMLElement: reader];
xmlFreeTextReader(reader); //free the reader
return _rEALTYBARONNS0ViewBid;
}
//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 REALTYBARONNS0ViewBid */
/**
* Internal, private interface for JAXB reading and writing.
*/
@interface REALTYBARONNS0ViewBid (JAXB)
@end /*interface REALTYBARONNS0ViewBid (JAXB)*/
/**
* Internal, private implementation for JAXB reading and writing.
*/
@implementation REALTYBARONNS0ViewBid (JAXB)
/**
* Read an instance of REALTYBARONNS0ViewBid from an XML reader.
*
* @param reader The reader.
* @return An instance of REALTYBARONNS0ViewBid defined by the XML reader.
*/
+ (id) readXMLType: (xmlTextReaderPtr) reader
{
REALTYBARONNS0ViewBid *_rEALTYBARONNS0ViewBid = [[REALTYBARONNS0ViewBid alloc] init];
NS_DURING
{
[_rEALTYBARONNS0ViewBid initWithReader: reader];
}
NS_HANDLER
{
_rEALTYBARONNS0ViewBid = nil;
[localException raise];
}
NS_ENDHANDLER
[_rEALTYBARONNS0ViewBid autorelease];
return _rEALTYBARONNS0ViewBid;
}
/**
* Initialize this instance of REALTYBARONNS0ViewBid 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 REALTYBARONNS0ViewBid 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 REALTYBARONNS0ViewBid from an XML reader. The element to be read is
* "response".
*
* @param reader The XML reader.
* @return The REALTYBARONNS0ViewBid.
*/
+ (id) readXMLElement: (xmlTextReaderPtr) reader {
int status;
REALTYBARONNS0ViewBid *_viewBid = 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
_viewBid = (REALTYBARONNS0ViewBid *)[REALTYBARONNS0ViewBid 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 REALTYBARONNS0ViewBid. Expected element response. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
}
else {
[NSException raise: @"XMLReadError"
format: @"Unable to read REALTYBARONNS0ViewBid. Expected element response. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
}
}
return _viewBid;
}
/**
* Writes this REALTYBARONNS0ViewBid to XML under element name "response".
* The namespace declarations for the element will be written.
*
* @param writer The XML writer.
* @param _viewBid The ViewBid to write.
* @return 1 if successful, 0 otherwise.
*/
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
[self writeXMLElement: writer writeNamespaces: YES];
}
/**
* Writes this REALTYBARONNS0ViewBid 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 {}viewBid for root element {}response...");
#endif
[self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote type {}viewBid 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 "bid", xmlTextReaderConstLocalName(reader)) == 0
&& xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
NSLog(@"Attempting to read choice {}bid of type {}bid.");
#endif
__child = [REALTYBARONNS0Bid readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully read choice {}bid of type {}bid.");
#endif
[self setBid: __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 bid]) {
status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "bid", NULL);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing start child element {}bid."];
}
#if DEBUG_ENUNCIATE > 1
NSLog(@"writing element {}bid...");
#endif
[[self bid] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote element {}bid...");
#endif
status = xmlTextWriterEndElement(writer);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing end child element {}bid."];
}
}
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 REALTYBARONNS0ViewBid (JAXB) */
#endif /* DEF_REALTYBARONNS0ViewBid_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_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_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_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_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_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_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_REALTYBARONNS0GetUser_M
#define DEF_REALTYBARONNS0GetUser_M
/**
* Created by IntelliJ IDEA. User: marc Date: Jul 24, 2010 Time: 7:07:31 AM
*/
@implementation REALTYBARONNS0GetUser
/**
* user
*/
- (REALTYBARONNS0User *) user
{
return _user;
}
/**
* user
*/
- (void) setUser: (REALTYBARONNS0User *) newUser
{
[newUser retain];
[_user release];
_user = newUser;
}
/**
* status
*/
- (REALTYBARONNS0Status *) status
{
return _status;
}
/**
* status
*/
- (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
/**
* User: marc Date: Mar 4, 2008 Time: 6:39:03 PM
THIS SOFTWARE IS COPYRIGHTED. THE SOFTWARE MAY NOT BE COPIED REPRODUCED, TRANSLATED, OR REDUCED TO ANY ELECTRONIC MEDIUM OR MACHINE READABLE FORM WITHOUT THE PRIOR WRITTEN CONSENT OF SOCO
TECHNOLOGIES.
*/
@implementation 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;
}
/**
* link
*/
- (REALTYBARONNS0Link *) link
{
return _link;
}
/**
* link
*/
- (void) setLink: (REALTYBARONNS0Link *) newLink
{
[newLink retain];
[_link release];
_link = newLink;
}
/**
* (no documentation provided)
*/
- (NSDate *) date
{
return _date;
}
/**
* (no documentation provided)
*/
- (void) setDate: (NSDate *) newDate
{
[newDate retain];
[_date release];
_date = newDate;
}
/**
* (no documentation provided)
*/
- (REALTYBARONNS0Slugs *) slugs
{
return _slugs;
}
/**
* (no documentation provided)
*/
- (void) setSlugs: (REALTYBARONNS0Slugs *) newSlugs
{
[newSlugs retain];
[_slugs release];
_slugs = newSlugs;
}
/**
* (no documentation provided)
*/
- (NSString *) name
{
return _name;
}
/**
* (no documentation provided)
*/
- (void) setName: (NSString *) newName
{
[newName retain];
[_name release];
_name = newName;
}
/**
* (no documentation provided)
*/
- (NSString *) email
{
return _email;
}
/**
* (no documentation provided)
*/
- (void) setEmail: (NSString *) newEmail
{
[newEmail retain];
[_email release];
_email = newEmail;
}
/**
* (no documentation provided)
*/
- (NSString *) title
{
return _title;
}
/**
* (no documentation provided)
*/
- (void) setTitle: (NSString *) newTitle
{
[newTitle retain];
[_title release];
_title = newTitle;
}
/**
* (no documentation provided)
*/
- (NSString *) comment
{
return _comment;
}
/**
* (no documentation provided)
*/
- (void) setComment: (NSString *) newComment
{
[newComment retain];
[_comment release];
_comment = newComment;
}
/**
* (no documentation provided)
*/
- (NSString *) satisfied
{
return _satisfied;
}
/**
* (no documentation provided)
*/
- (void) setSatisfied: (NSString *) newSatisfied
{
[newSatisfied retain];
[_satisfied release];
_satisfied = newSatisfied;
}
/**
* (no documentation provided)
*/
- (NSString *) recommend
{
return _recommend;
}
/**
* (no documentation provided)
*/
- (void) setRecommend: (NSString *) newRecommend
{
[newRecommend retain];
[_recommend release];
_recommend = newRecommend;
}
- (void) dealloc
{
[self setIdentifier: NULL];
[self setKey: nil];
[self setLink: nil];
[self setDate: nil];
[self setSlugs: nil];
[self setName: nil];
[self setEmail: nil];
[self setTitle: nil];
[self setComment: nil];
[self setSatisfied: nil];
[self setRecommend: nil];
[super dealloc];
}
@end /* implementation 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 "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 "name", xmlTextReaderConstLocalName(reader)) == 0
&& xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
NSLog(@"Attempting to read choice {}name of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
__child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully read choice {}name of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
[self setName: __child];
return YES;
} //end "if choice"
if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
&& xmlStrcmp(BAD_CAST "email", xmlTextReaderConstLocalName(reader)) == 0
&& xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
NSLog(@"Attempting to read choice {}email of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
__child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully read choice {}email of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
[self setEmail: __child];
return YES;
} //end "if choice"
if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
&& xmlStrcmp(BAD_CAST "title", xmlTextReaderConstLocalName(reader)) == 0
&& xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
NSLog(@"Attempting to read choice {}title of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
__child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully read choice {}title of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
[self setTitle: __child];
return YES;
} //end "if choice"
if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
&& xmlStrcmp(BAD_CAST "comment", xmlTextReaderConstLocalName(reader)) == 0
&& xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
NSLog(@"Attempting to read choice {}comment of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
__child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully read choice {}comment of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
[self setComment: __child];
return YES;
} //end "if choice"
if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
&& xmlStrcmp(BAD_CAST "satisfied", xmlTextReaderConstLocalName(reader)) == 0
&& xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
NSLog(@"Attempting to read choice {}satisfied of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
__child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully read choice {}satisfied of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
[self setSatisfied: __child];
return YES;
} //end "if choice"
if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
&& xmlStrcmp(BAD_CAST "recommend", xmlTextReaderConstLocalName(reader)) == 0
&& xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
NSLog(@"Attempting to read choice {}recommend of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
__child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully read choice {}recommend of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
[self setRecommend: __child];
return YES;
} //end "if choice"
return NO;
}
//documentation inherited.
- (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader
{
return [super readUnknownJAXBChildElement: reader];
}
//documentation inherited.
- (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader
{
[super readUnknownJAXBAttribute: reader];
}
//documentation inherited.
- (void) writeJAXBAttributes: (xmlTextWriterPtr) writer
{
int status;
[super writeJAXBAttributes: writer];
if ([self identifier] != NULL) {
status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "id", NULL);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing start attribute {}id."];
}
#if DEBUG_ENUNCIATE > 1
NSLog(@"writing attribute {}id...");
#endif
status = xmlTextWriterWriteIntType(writer, [self identifier]);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing attribute {}id."];
}
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote attribute {}id...");
#endif
status = xmlTextWriterEndAttribute(writer);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing end attribute {}id."];
}
}
if ([self key]) {
status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "key", NULL);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing start attribute {}key."];
}
#if DEBUG_ENUNCIATE > 1
NSLog(@"writing attribute {}key...");
#endif
[[self key] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote attribute {}key...");
#endif
status = xmlTextWriterEndAttribute(writer);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing end attribute {}key."];
}
}
}
//documentation inherited.
- (void) writeJAXBValue: (xmlTextWriterPtr) writer
{
[super writeJAXBValue: writer];
}
/**
* Method for writing the child elements.
*
* @param writer The writer.
*/
- (void) writeJAXBChildElements: (xmlTextWriterPtr) writer
{
int status;
id __item;
NSEnumerator *__enumerator;
[super writeJAXBChildElements: writer];
if ([self link]) {
status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "link", NULL);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing start child element {}link."];
}
#if DEBUG_ENUNCIATE > 1
NSLog(@"writing element {}link...");
#endif
[[self link] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote element {}link...");
#endif
status = xmlTextWriterEndElement(writer);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing end child element {}link."];
}
}
if ([self date]) {
status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "date", NULL);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing start child element {}date."];
}
#if DEBUG_ENUNCIATE > 1
NSLog(@"writing element {}date...");
#endif
[[self date] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote element {}date...");
#endif
status = xmlTextWriterEndElement(writer);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing end child element {}date."];
}
}
if ([self slugs]) {
status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "slugs", NULL);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing start child element {}slugs."];
}
#if DEBUG_ENUNCIATE > 1
NSLog(@"writing element {}slugs...");
#endif
[[self slugs] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote element {}slugs...");
#endif
status = xmlTextWriterEndElement(writer);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing end child element {}slugs."];
}
}
if ([self name]) {
status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "name", NULL);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing start child element {}name."];
}
#if DEBUG_ENUNCIATE > 1
NSLog(@"writing element {}name...");
#endif
[[self name] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote element {}name...");
#endif
status = xmlTextWriterEndElement(writer);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing end child element {}name."];
}
}
if ([self email]) {
status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "email", NULL);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing start child element {}email."];
}
#if DEBUG_ENUNCIATE > 1
NSLog(@"writing element {}email...");
#endif
[[self email] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote element {}email...");
#endif
status = xmlTextWriterEndElement(writer);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing end child element {}email."];
}
}
if ([self title]) {
status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "title", NULL);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing start child element {}title."];
}
#if DEBUG_ENUNCIATE > 1
NSLog(@"writing element {}title...");
#endif
[[self title] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote element {}title...");
#endif
status = xmlTextWriterEndElement(writer);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing end child element {}title."];
}
}
if ([self comment]) {
status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "comment", NULL);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing start child element {}comment."];
}
#if DEBUG_ENUNCIATE > 1
NSLog(@"writing element {}comment...");
#endif
[[self comment] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote element {}comment...");
#endif
status = xmlTextWriterEndElement(writer);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing end child element {}comment."];
}
}
if ([self satisfied]) {
status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "satisfied", NULL);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing start child element {}satisfied."];
}
#if DEBUG_ENUNCIATE > 1
NSLog(@"writing element {}satisfied...");
#endif
[[self satisfied] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote element {}satisfied...");
#endif
status = xmlTextWriterEndElement(writer);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing end child element {}satisfied."];
}
}
if ([self recommend]) {
status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "recommend", NULL);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing start child element {}recommend."];
}
#if DEBUG_ENUNCIATE > 1
NSLog(@"writing element {}recommend...");
#endif
[[self recommend] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote element {}recommend...");
#endif
status = xmlTextWriterEndElement(writer);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing end child element {}recommend."];
}
}
}
@end /* implementation REALTYBARONNS0Review (JAXB) */
#endif /* DEF_REALTYBARONNS0Review_M */
#ifndef DEF_REALTYBARONNS0User_M
#define DEF_REALTYBARONNS0User_M
/**
* Created by IntelliJ IDEA. User: marc Date: Dec 29, 2010 Time: 5:28:52 AM
*/
@implementation REALTYBARONNS0User
/**
* password
*/
- (NSString *) email
{
return _email;
}
/**
* password
*/
- (void) setEmail: (NSString *) newEmail
{
[newEmail retain];
[_email release];
_email = newEmail;
}
/**
* (no documentation provided)
*/
- (NSString *) last_name
{
return _last_name;
}
/**
* (no documentation provided)
*/
- (void) setLast_name: (NSString *) newLast_name
{
[newLast_name retain];
[_last_name release];
_last_name = newLast_name;
}
/**
* (no documentation provided)
*/
- (NSString *) first_name
{
return _first_name;
}
/**
* (no documentation provided)
*/
- (void) setFirst_name: (NSString *) newFirst_name
{
[newFirst_name retain];
[_first_name release];
_first_name = newFirst_name;
}
- (void) dealloc
{
[self setEmail: nil];
[self setLast_name: nil];
[self setFirst_name: nil];
[super dealloc];
}
@end /* implementation 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
/**
* Created by IntelliJ IDEA. User: marc Date: Jul 24, 2010 Time: 7:07:31 AM
*/
@implementation REALTYBARONNS0EditUser
/**
* id
*/
- (NSString *) identifier
{
return _identifier;
}
/**
* id
*/
- (void) setIdentifier: (NSString *) newIdentifier
{
[newIdentifier retain];
[_identifier release];
_identifier = newIdentifier;
}
/**
* (no documentation provided)
*/
- (NSString *) login
{
return _login;
}
/**
* (no documentation provided)
*/
- (void) setLogin: (NSString *) newLogin
{
[newLogin retain];
[_login release];
_login = newLogin;
}
/**
* (no documentation provided)
*/
- (REALTYBARONNS0Links *) links
{
return _links;
}
/**
* (no documentation provided)
*/
- (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;
}
- (void) dealloc
{
[self setIdentifier: nil];
[self setLogin: nil];
[self setLinks: nil];
[self setStatus: 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 "id", xmlTextReaderConstLocalName(reader)) == 0
&& xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
NSLog(@"Attempting to read choice {}id of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
__child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully read choice {}id of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
[self setIdentifier: __child];
return YES;
} //end "if choice"
if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
&& xmlStrcmp(BAD_CAST "login", xmlTextReaderConstLocalName(reader)) == 0
&& xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
NSLog(@"Attempting to read choice {}login of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
__child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully read choice {}login of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
[self setLogin: __child];
return YES;
} //end "if choice"
if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
&& xmlStrcmp(BAD_CAST "links", xmlTextReaderConstLocalName(reader)) == 0
&& xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
NSLog(@"Attempting to read choice {}links of type {}links.");
#endif
__child = [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"
return NO;
}
//documentation inherited.
- (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader
{
return [super readUnknownJAXBChildElement: reader];
}
//documentation inherited.
- (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader
{
[super readUnknownJAXBAttribute: reader];
}
//documentation inherited.
- (void) writeJAXBAttributes: (xmlTextWriterPtr) writer
{
int status;
[super writeJAXBAttributes: writer];
}
//documentation inherited.
- (void) writeJAXBValue: (xmlTextWriterPtr) writer
{
[super writeJAXBValue: writer];
}
/**
* Method for writing the child elements.
*
* @param writer The writer.
*/
- (void) writeJAXBChildElements: (xmlTextWriterPtr) writer
{
int status;
id __item;
NSEnumerator *__enumerator;
[super writeJAXBChildElements: writer];
if ([self identifier]) {
status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "id", NULL);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing start child element {}id."];
}
#if DEBUG_ENUNCIATE > 1
NSLog(@"writing element {}id...");
#endif
[[self identifier] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote element {}id...");
#endif
status = xmlTextWriterEndElement(writer);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing end child element {}id."];
}
}
if ([self login]) {
status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "login", NULL);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing start child element {}login."];
}
#if DEBUG_ENUNCIATE > 1
NSLog(@"writing element {}login...");
#endif
[[self login] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote element {}login...");
#endif
status = xmlTextWriterEndElement(writer);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing end child element {}login."];
}
}
if ([self links]) {
status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "links", NULL);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing start child element {}links."];
}
#if DEBUG_ENUNCIATE > 1
NSLog(@"writing element {}links...");
#endif
[[self links] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote element {}links...");
#endif
status = xmlTextWriterEndElement(writer);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing end child element {}links."];
}
}
if ([self status]) {
status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "status", NULL);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing start child element {}status."];
}
#if DEBUG_ENUNCIATE > 1
NSLog(@"writing element {}status...");
#endif
[[self status] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote element {}status...");
#endif
status = xmlTextWriterEndElement(writer);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing end child element {}status."];
}
}
}
@end /* implementation REALTYBARONNS0EditUser (JAXB) */
#endif /* DEF_REALTYBARONNS0EditUser_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_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_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_REALTYBARONNS0ViewInquiry_M
#define DEF_REALTYBARONNS0ViewInquiry_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 REALTYBARONNS0ViewInquiry
/**
* status
*/
- (REALTYBARONNS0Status *) status
{
return _status;
}
/**
* status
*/
- (void) setStatus: (REALTYBARONNS0Status *) newStatus
{
[newStatus retain];
[_status release];
_status = newStatus;
}
/**
* inquiry
*/
- (REALTYBARONNS0Inquiry *) inquiry
{
return _inquiry;
}
/**
* inquiry
*/
- (void) setInquiry: (REALTYBARONNS0Inquiry *) newInquiry
{
[newInquiry retain];
[_inquiry release];
_inquiry = newInquiry;
}
- (void) dealloc
{
[self setStatus: nil];
[self setInquiry: nil];
[super dealloc];
}
//documentation inherited.
+ (id) readFromXML: (NSData *) xml
{
REALTYBARONNS0ViewInquiry *_rEALTYBARONNS0ViewInquiry;
xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
if (reader == NULL) {
[NSException raise: @"XMLReadError"
format: @"Error instantiating an XML reader."];
return nil;
}
_rEALTYBARONNS0ViewInquiry = (REALTYBARONNS0ViewInquiry *) [REALTYBARONNS0ViewInquiry readXMLElement: reader];
xmlFreeTextReader(reader); //free the reader
return _rEALTYBARONNS0ViewInquiry;
}
//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 REALTYBARONNS0ViewInquiry */
/**
* Internal, private interface for JAXB reading and writing.
*/
@interface REALTYBARONNS0ViewInquiry (JAXB)
@end /*interface REALTYBARONNS0ViewInquiry (JAXB)*/
/**
* Internal, private implementation for JAXB reading and writing.
*/
@implementation REALTYBARONNS0ViewInquiry (JAXB)
/**
* Read an instance of REALTYBARONNS0ViewInquiry from an XML reader.
*
* @param reader The reader.
* @return An instance of REALTYBARONNS0ViewInquiry defined by the XML reader.
*/
+ (id) readXMLType: (xmlTextReaderPtr) reader
{
REALTYBARONNS0ViewInquiry *_rEALTYBARONNS0ViewInquiry = [[REALTYBARONNS0ViewInquiry alloc] init];
NS_DURING
{
[_rEALTYBARONNS0ViewInquiry initWithReader: reader];
}
NS_HANDLER
{
_rEALTYBARONNS0ViewInquiry = nil;
[localException raise];
}
NS_ENDHANDLER
[_rEALTYBARONNS0ViewInquiry autorelease];
return _rEALTYBARONNS0ViewInquiry;
}
/**
* Initialize this instance of REALTYBARONNS0ViewInquiry 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 REALTYBARONNS0ViewInquiry 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 REALTYBARONNS0ViewInquiry from an XML reader. The element to be read is
* "response".
*
* @param reader The XML reader.
* @return The REALTYBARONNS0ViewInquiry.
*/
+ (id) readXMLElement: (xmlTextReaderPtr) reader {
int status;
REALTYBARONNS0ViewInquiry *_viewInquiry = 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
_viewInquiry = (REALTYBARONNS0ViewInquiry *)[REALTYBARONNS0ViewInquiry 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 REALTYBARONNS0ViewInquiry. Expected element response. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
}
else {
[NSException raise: @"XMLReadError"
format: @"Unable to read REALTYBARONNS0ViewInquiry. Expected element response. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
}
}
return _viewInquiry;
}
/**
* Writes this REALTYBARONNS0ViewInquiry to XML under element name "response".
* The namespace declarations for the element will be written.
*
* @param writer The XML writer.
* @param _viewInquiry The ViewInquiry to write.
* @return 1 if successful, 0 otherwise.
*/
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
[self writeXMLElement: writer writeNamespaces: YES];
}
/**
* Writes this REALTYBARONNS0ViewInquiry 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 {}viewInquiry for root element {}response...");
#endif
[self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote type {}viewInquiry 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 "inquiry", xmlTextReaderConstLocalName(reader)) == 0
&& xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
NSLog(@"Attempting to read choice {}inquiry of type {}inquiry.");
#endif
__child = [REALTYBARONNS0Inquiry readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully read choice {}inquiry of type {}inquiry.");
#endif
[self setInquiry: __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 inquiry]) {
status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "inquiry", NULL);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing start child element {}inquiry."];
}
#if DEBUG_ENUNCIATE > 1
NSLog(@"writing element {}inquiry...");
#endif
[[self inquiry] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote element {}inquiry...");
#endif
status = xmlTextWriterEndElement(writer);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing end child element {}inquiry."];
}
}
}
@end /* implementation REALTYBARONNS0ViewInquiry (JAXB) */
#endif /* DEF_REALTYBARONNS0ViewInquiry_M */
#ifndef DEF_REALTYBARONNS0ViewAuction_M
#define DEF_REALTYBARONNS0ViewAuction_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 REALTYBARONNS0ViewAuction
/**
* auction
*/
- (REALTYBARONNS0Auction *) auction
{
return _auction;
}
/**
* auction
*/
- (void) setAuction: (REALTYBARONNS0Auction *) newAuction
{
[newAuction retain];
[_auction release];
_auction = newAuction;
}
/**
* (no documentation provided)
*/
- (REALTYBARONNS0Status *) status
{
return _status;
}
/**
* (no documentation provided)
*/
- (void) setStatus: (REALTYBARONNS0Status *) newStatus
{
[newStatus retain];
[_status release];
_status = newStatus;
}
- (void) dealloc
{
[self setAuction: nil];
[self setStatus: nil];
[super dealloc];
}
//documentation inherited.
+ (id) readFromXML: (NSData *) xml
{
REALTYBARONNS0ViewAuction *_rEALTYBARONNS0ViewAuction;
xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
if (reader == NULL) {
[NSException raise: @"XMLReadError"
format: @"Error instantiating an XML reader."];
return nil;
}
_rEALTYBARONNS0ViewAuction = (REALTYBARONNS0ViewAuction *) [REALTYBARONNS0ViewAuction readXMLElement: reader];
xmlFreeTextReader(reader); //free the reader
return _rEALTYBARONNS0ViewAuction;
}
//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 REALTYBARONNS0ViewAuction */
/**
* Internal, private interface for JAXB reading and writing.
*/
@interface REALTYBARONNS0ViewAuction (JAXB)
@end /*interface REALTYBARONNS0ViewAuction (JAXB)*/
/**
* Internal, private implementation for JAXB reading and writing.
*/
@implementation REALTYBARONNS0ViewAuction (JAXB)
/**
* Read an instance of REALTYBARONNS0ViewAuction from an XML reader.
*
* @param reader The reader.
* @return An instance of REALTYBARONNS0ViewAuction defined by the XML reader.
*/
+ (id) readXMLType: (xmlTextReaderPtr) reader
{
REALTYBARONNS0ViewAuction *_rEALTYBARONNS0ViewAuction = [[REALTYBARONNS0ViewAuction alloc] init];
NS_DURING
{
[_rEALTYBARONNS0ViewAuction initWithReader: reader];
}
NS_HANDLER
{
_rEALTYBARONNS0ViewAuction = nil;
[localException raise];
}
NS_ENDHANDLER
[_rEALTYBARONNS0ViewAuction autorelease];
return _rEALTYBARONNS0ViewAuction;
}
/**
* Initialize this instance of REALTYBARONNS0ViewAuction 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 REALTYBARONNS0ViewAuction 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 REALTYBARONNS0ViewAuction from an XML reader. The element to be read is
* "response".
*
* @param reader The XML reader.
* @return The REALTYBARONNS0ViewAuction.
*/
+ (id) readXMLElement: (xmlTextReaderPtr) reader {
int status;
REALTYBARONNS0ViewAuction *_viewAuction = 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
_viewAuction = (REALTYBARONNS0ViewAuction *)[REALTYBARONNS0ViewAuction 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 REALTYBARONNS0ViewAuction. Expected element response. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
}
else {
[NSException raise: @"XMLReadError"
format: @"Unable to read REALTYBARONNS0ViewAuction. Expected element response. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
}
}
return _viewAuction;
}
/**
* Writes this REALTYBARONNS0ViewAuction to XML under element name "response".
* The namespace declarations for the element will be written.
*
* @param writer The XML writer.
* @param _viewAuction The ViewAuction to write.
* @return 1 if successful, 0 otherwise.
*/
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
[self writeXMLElement: writer writeNamespaces: YES];
}
/**
* Writes this REALTYBARONNS0ViewAuction 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 {}viewAuction for root element {}response...");
#endif
[self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote type {}viewAuction 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 "auction", xmlTextReaderConstLocalName(reader)) == 0
&& xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
NSLog(@"Attempting to read choice {}auction of type {}auction.");
#endif
__child = [REALTYBARONNS0Auction readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully read choice {}auction of type {}auction.");
#endif
[self setAuction: __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 auction]) {
status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "auction", NULL);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing start child element {}auction."];
}
#if DEBUG_ENUNCIATE > 1
NSLog(@"writing element {}auction...");
#endif
[[self auction] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote element {}auction...");
#endif
status = xmlTextWriterEndElement(writer);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing end child element {}auction."];
}
}
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 REALTYBARONNS0ViewAuction (JAXB) */
#endif /* DEF_REALTYBARONNS0ViewAuction_M */
#ifndef DEF_REALTYBARONNS0PostAuction_M
#define DEF_REALTYBARONNS0PostAuction_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 REALTYBARONNS0PostAuction
/**
* 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)
*/
- (NSString *) key
{
return _key;
}
/**
* (no documentation provided)
*/
- (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
{
REALTYBARONNS0PostAuction *_rEALTYBARONNS0PostAuction;
xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
if (reader == NULL) {
[NSException raise: @"XMLReadError"
format: @"Error instantiating an XML reader."];
return nil;
}
_rEALTYBARONNS0PostAuction = (REALTYBARONNS0PostAuction *) [REALTYBARONNS0PostAuction readXMLElement: reader];
xmlFreeTextReader(reader); //free the reader
return _rEALTYBARONNS0PostAuction;
}
//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 REALTYBARONNS0PostAuction */
/**
* Internal, private interface for JAXB reading and writing.
*/
@interface REALTYBARONNS0PostAuction (JAXB)
@end /*interface REALTYBARONNS0PostAuction (JAXB)*/
/**
* Internal, private implementation for JAXB reading and writing.
*/
@implementation REALTYBARONNS0PostAuction (JAXB)
/**
* Read an instance of REALTYBARONNS0PostAuction from an XML reader.
*
* @param reader The reader.
* @return An instance of REALTYBARONNS0PostAuction defined by the XML reader.
*/
+ (id) readXMLType: (xmlTextReaderPtr) reader
{
REALTYBARONNS0PostAuction *_rEALTYBARONNS0PostAuction = [[REALTYBARONNS0PostAuction alloc] init];
NS_DURING
{
[_rEALTYBARONNS0PostAuction initWithReader: reader];
}
NS_HANDLER
{
_rEALTYBARONNS0PostAuction = nil;
[localException raise];
}
NS_ENDHANDLER
[_rEALTYBARONNS0PostAuction autorelease];
return _rEALTYBARONNS0PostAuction;
}
/**
* Initialize this instance of REALTYBARONNS0PostAuction 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 REALTYBARONNS0PostAuction 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 REALTYBARONNS0PostAuction from an XML reader. The element to be read is
* "response".
*
* @param reader The XML reader.
* @return The REALTYBARONNS0PostAuction.
*/
+ (id) readXMLElement: (xmlTextReaderPtr) reader {
int status;
REALTYBARONNS0PostAuction *_postAuction = 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
_postAuction = (REALTYBARONNS0PostAuction *)[REALTYBARONNS0PostAuction 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 REALTYBARONNS0PostAuction. Expected element response. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
}
else {
[NSException raise: @"XMLReadError"
format: @"Unable to read REALTYBARONNS0PostAuction. Expected element response. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
}
}
return _postAuction;
}
/**
* Writes this REALTYBARONNS0PostAuction to XML under element name "response".
* The namespace declarations for the element will be written.
*
* @param writer The XML writer.
* @param _postAuction The PostAuction to write.
* @return 1 if successful, 0 otherwise.
*/
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
[self writeXMLElement: writer writeNamespaces: YES];
}
/**
* Writes this REALTYBARONNS0PostAuction 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 {}postAuction for root element {}response...");
#endif
[self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote type {}postAuction 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 REALTYBARONNS0PostAuction (JAXB) */
#endif /* DEF_REALTYBARONNS0PostAuction_M */
#ifndef DEF_REALTYBARONNS0ListBids_M
#define DEF_REALTYBARONNS0ListBids_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 REALTYBARONNS0ListBids
/**
* bids
*/
- (REALTYBARONNS0Bids *) bids
{
return _bids;
}
/**
* bids
*/
- (void) setBids: (REALTYBARONNS0Bids *) newBids
{
[newBids retain];
[_bids release];
_bids = newBids;
}
/**
* status
*/
- (REALTYBARONNS0Status *) status
{
return _status;
}
/**
* status
*/
- (void) setStatus: (REALTYBARONNS0Status *) newStatus
{
[newStatus retain];
[_status release];
_status = newStatus;
}
- (void) dealloc
{
[self setBids: nil];
[self setStatus: nil];
[super dealloc];
}
//documentation inherited.
+ (id) readFromXML: (NSData *) xml
{
REALTYBARONNS0ListBids *_rEALTYBARONNS0ListBids;
xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
if (reader == NULL) {
[NSException raise: @"XMLReadError"
format: @"Error instantiating an XML reader."];
return nil;
}
_rEALTYBARONNS0ListBids = (REALTYBARONNS0ListBids *) [REALTYBARONNS0ListBids readXMLElement: reader];
xmlFreeTextReader(reader); //free the reader
return _rEALTYBARONNS0ListBids;
}
//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 REALTYBARONNS0ListBids */
/**
* Internal, private interface for JAXB reading and writing.
*/
@interface REALTYBARONNS0ListBids (JAXB)
@end /*interface REALTYBARONNS0ListBids (JAXB)*/
/**
* Internal, private implementation for JAXB reading and writing.
*/
@implementation REALTYBARONNS0ListBids (JAXB)
/**
* Read an instance of REALTYBARONNS0ListBids from an XML reader.
*
* @param reader The reader.
* @return An instance of REALTYBARONNS0ListBids defined by the XML reader.
*/
+ (id) readXMLType: (xmlTextReaderPtr) reader
{
REALTYBARONNS0ListBids *_rEALTYBARONNS0ListBids = [[REALTYBARONNS0ListBids alloc] init];
NS_DURING
{
[_rEALTYBARONNS0ListBids initWithReader: reader];
}
NS_HANDLER
{
_rEALTYBARONNS0ListBids = nil;
[localException raise];
}
NS_ENDHANDLER
[_rEALTYBARONNS0ListBids autorelease];
return _rEALTYBARONNS0ListBids;
}
/**
* Initialize this instance of REALTYBARONNS0ListBids 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 REALTYBARONNS0ListBids 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 REALTYBARONNS0ListBids from an XML reader. The element to be read is
* "response".
*
* @param reader The XML reader.
* @return The REALTYBARONNS0ListBids.
*/
+ (id) readXMLElement: (xmlTextReaderPtr) reader {
int status;
REALTYBARONNS0ListBids *_listBids = 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
_listBids = (REALTYBARONNS0ListBids *)[REALTYBARONNS0ListBids 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 REALTYBARONNS0ListBids. Expected element response. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
}
else {
[NSException raise: @"XMLReadError"
format: @"Unable to read REALTYBARONNS0ListBids. Expected element response. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
}
}
return _listBids;
}
/**
* Writes this REALTYBARONNS0ListBids to XML under element name "response".
* The namespace declarations for the element will be written.
*
* @param writer The XML writer.
* @param _listBids The ListBids to write.
* @return 1 if successful, 0 otherwise.
*/
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
[self writeXMLElement: writer writeNamespaces: YES];
}
/**
* Writes this REALTYBARONNS0ListBids 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 {}listBids for root element {}response...");
#endif
[self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote type {}listBids 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 "bids", xmlTextReaderConstLocalName(reader)) == 0
&& xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
NSLog(@"Attempting to read choice {}bids of type {}bids.");
#endif
__child = [REALTYBARONNS0Bids readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully read choice {}bids of type {}bids.");
#endif
[self setBids: __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 bids]) {
status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "bids", NULL);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing start child element {}bids."];
}
#if DEBUG_ENUNCIATE > 1
NSLog(@"writing element {}bids...");
#endif
[[self bids] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote element {}bids...");
#endif
status = xmlTextWriterEndElement(writer);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing end child element {}bids."];
}
}
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 REALTYBARONNS0ListBids (JAXB) */
#endif /* DEF_REALTYBARONNS0ListBids_M */
#ifndef DEF_REALTYBARONNS0Leads_M
#define DEF_REALTYBARONNS0Leads_M
/**
* User: marc Date: Feb 3, 2010 Time: 7:22:30 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 REALTYBARONNS0Leads
/**
* count
*/
- (int *) count
{
return _count;
}
/**
* count
*/
- (void) setCount: (int *) newCount
{
if (_count != NULL) {
free(_count);
}
_count = newCount;
}
/**
* leads
*/
- (NSArray *) lead
{
return _lead;
}
/**
* leads
*/
- (void) setLead: (NSArray *) newLead
{
[newLead retain];
[_lead release];
_lead = newLead;
}
- (void) dealloc
{
[self setCount: NULL];
[self setLead: nil];
[super dealloc];
}
@end /* implementation REALTYBARONNS0Leads */
/**
* Internal, private interface for JAXB reading and writing.
*/
@interface REALTYBARONNS0Leads (JAXB)
@end /*interface REALTYBARONNS0Leads (JAXB)*/
/**
* Internal, private implementation for JAXB reading and writing.
*/
@implementation REALTYBARONNS0Leads (JAXB)
/**
* Read an instance of REALTYBARONNS0Leads from an XML reader.
*
* @param reader The reader.
* @return An instance of REALTYBARONNS0Leads defined by the XML reader.
*/
+ (id) readXMLType: (xmlTextReaderPtr) reader
{
REALTYBARONNS0Leads *_rEALTYBARONNS0Leads = [[REALTYBARONNS0Leads alloc] init];
NS_DURING
{
[_rEALTYBARONNS0Leads initWithReader: reader];
}
NS_HANDLER
{
_rEALTYBARONNS0Leads = nil;
[localException raise];
}
NS_ENDHANDLER
[_rEALTYBARONNS0Leads autorelease];
return _rEALTYBARONNS0Leads;
}
/**
* Initialize this instance of REALTYBARONNS0Leads 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 REALTYBARONNS0Leads 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 "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 "lead", xmlTextReaderConstLocalName(reader)) == 0
&& xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
NSLog(@"Attempting to read choice {}lead of type {}lead.");
#endif
__child = [REALTYBARONNS0Lead readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully read choice {}lead of type {}lead.");
#endif
if ([self lead]) {
[self setLead: [[self lead] arrayByAddingObject: __child]];
}
else {
[self setLead: [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 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 lead]) {
__enumerator = [[self lead] objectEnumerator];
while ( (__item = [__enumerator nextObject]) ) {
status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "lead", NULL);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing start child element {}lead."];
}
#if DEBUG_ENUNCIATE > 1
NSLog(@"writing element {}lead...");
#endif
[__item writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote element {}lead...");
#endif
status = xmlTextWriterEndElement(writer);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing end child element {}lead."];
}
} //end item iterator.
}
}
@end /* implementation REALTYBARONNS0Leads (JAXB) */
#endif /* DEF_REALTYBARONNS0Leads_M */
#ifndef DEF_REALTYBARONNS0Inquiry_M
#define DEF_REALTYBARONNS0Inquiry_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 REALTYBARONNS0Inquiry
/**
* id
*/
- (NSString *) identifier
{
return _identifier;
}
/**
* id
*/
- (void) setIdentifier: (NSString *) newIdentifier
{
[newIdentifier retain];
[_identifier release];
_identifier = newIdentifier;
}
/**
* (no documentation provided)
*/
- (NSString *) user
{
return _user;
}
/**
* (no documentation provided)
*/
- (void) setUser: (NSString *) newUser
{
[newUser retain];
[_user release];
_user = newUser;
}
/**
* (no documentation provided)
*/
- (NSString *) text
{
return _text;
}
/**
* (no documentation provided)
*/
- (void) setText: (NSString *) newText
{
[newText retain];
[_text release];
_text = newText;
}
- (void) dealloc
{
[self setIdentifier: nil];
[self setUser: nil];
[self setText: nil];
[super dealloc];
}
//documentation inherited.
+ (id) readFromXML: (NSData *) xml
{
REALTYBARONNS0Inquiry *_rEALTYBARONNS0Inquiry;
xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
if (reader == NULL) {
[NSException raise: @"XMLReadError"
format: @"Error instantiating an XML reader."];
return nil;
}
_rEALTYBARONNS0Inquiry = (REALTYBARONNS0Inquiry *) [REALTYBARONNS0Inquiry readXMLElement: reader];
xmlFreeTextReader(reader); //free the reader
return _rEALTYBARONNS0Inquiry;
}
//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 REALTYBARONNS0Inquiry */
/**
* Internal, private interface for JAXB reading and writing.
*/
@interface REALTYBARONNS0Inquiry (JAXB)
@end /*interface REALTYBARONNS0Inquiry (JAXB)*/
/**
* Internal, private implementation for JAXB reading and writing.
*/
@implementation REALTYBARONNS0Inquiry (JAXB)
/**
* Read an instance of REALTYBARONNS0Inquiry from an XML reader.
*
* @param reader The reader.
* @return An instance of REALTYBARONNS0Inquiry defined by the XML reader.
*/
+ (id) readXMLType: (xmlTextReaderPtr) reader
{
REALTYBARONNS0Inquiry *_rEALTYBARONNS0Inquiry = [[REALTYBARONNS0Inquiry alloc] init];
NS_DURING
{
[_rEALTYBARONNS0Inquiry initWithReader: reader];
}
NS_HANDLER
{
_rEALTYBARONNS0Inquiry = nil;
[localException raise];
}
NS_ENDHANDLER
[_rEALTYBARONNS0Inquiry autorelease];
return _rEALTYBARONNS0Inquiry;
}
/**
* Initialize this instance of REALTYBARONNS0Inquiry 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 REALTYBARONNS0Inquiry 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 REALTYBARONNS0Inquiry from an XML reader. The element to be read is
* "inquiry".
*
* @param reader The XML reader.
* @return The REALTYBARONNS0Inquiry.
*/
+ (id) readXMLElement: (xmlTextReaderPtr) reader {
int status;
REALTYBARONNS0Inquiry *_inquiry = 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 inquiry."];
}
}
if (xmlStrcmp(BAD_CAST "inquiry", xmlTextReaderConstLocalName(reader)) == 0
&& xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
NSLog(@"Attempting to read root element {}inquiry.");
#endif
_inquiry = (REALTYBARONNS0Inquiry *)[REALTYBARONNS0Inquiry readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
NSLog(@"Successfully read root element {}inquiry.");
#endif
}
else {
if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
[NSException raise: @"XMLReadError"
format: @"Unable to read REALTYBARONNS0Inquiry. Expected element inquiry. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
}
else {
[NSException raise: @"XMLReadError"
format: @"Unable to read REALTYBARONNS0Inquiry. Expected element inquiry. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
}
}
return _inquiry;
}
/**
* Writes this REALTYBARONNS0Inquiry to XML under element name "inquiry".
* The namespace declarations for the element will be written.
*
* @param writer The XML writer.
* @param _inquiry The Inquiry to write.
* @return 1 if successful, 0 otherwise.
*/
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
[self writeXMLElement: writer writeNamespaces: YES];
}
/**
* Writes this REALTYBARONNS0Inquiry 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 "inquiry", NULL);
if (rc < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing start element {}inquiry. XML writer status: %i\n", rc];
}
#if DEBUG_ENUNCIATE > 1
NSLog(@"writing type {}inquiry for root element {}inquiry...");
#endif
[self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote type {}inquiry for root element {}inquiry...");
#endif
rc = xmlTextWriterEndElement(writer);
if (rc < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing end element {}inquiry. 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 "user", xmlTextReaderConstLocalName(reader)) == 0
&& xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
NSLog(@"Attempting to read choice {}user of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
__child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully read choice {}user of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
[self setUser: __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"
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 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 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."];
}
}
}
@end /* implementation REALTYBARONNS0Inquiry (JAXB) */
#endif /* DEF_REALTYBARONNS0Inquiry_M */
#ifndef DEF_REALTYBARONNS0FindLeads_M
#define DEF_REALTYBARONNS0FindLeads_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 REALTYBARONNS0FindLeads
/**
* leads
*/
- (REALTYBARONNS0Leads *) leads
{
return _leads;
}
/**
* leads
*/
- (void) setLeads: (REALTYBARONNS0Leads *) newLeads
{
[newLeads retain];
[_leads release];
_leads = newLeads;
}
/**
* status
*/
- (REALTYBARONNS0Status *) status
{
return _status;
}
/**
* status
*/
- (void) setStatus: (REALTYBARONNS0Status *) newStatus
{
[newStatus retain];
[_status release];
_status = newStatus;
}
- (void) dealloc
{
[self setLeads: nil];
[self setStatus: nil];
[super dealloc];
}
//documentation inherited.
+ (id) readFromXML: (NSData *) xml
{
REALTYBARONNS0FindLeads *_rEALTYBARONNS0FindLeads;
xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
if (reader == NULL) {
[NSException raise: @"XMLReadError"
format: @"Error instantiating an XML reader."];
return nil;
}
_rEALTYBARONNS0FindLeads = (REALTYBARONNS0FindLeads *) [REALTYBARONNS0FindLeads readXMLElement: reader];
xmlFreeTextReader(reader); //free the reader
return _rEALTYBARONNS0FindLeads;
}
//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 REALTYBARONNS0FindLeads */
/**
* Internal, private interface for JAXB reading and writing.
*/
@interface REALTYBARONNS0FindLeads (JAXB)
@end /*interface REALTYBARONNS0FindLeads (JAXB)*/
/**
* Internal, private implementation for JAXB reading and writing.
*/
@implementation REALTYBARONNS0FindLeads (JAXB)
/**
* Read an instance of REALTYBARONNS0FindLeads from an XML reader.
*
* @param reader The reader.
* @return An instance of REALTYBARONNS0FindLeads defined by the XML reader.
*/
+ (id) readXMLType: (xmlTextReaderPtr) reader
{
REALTYBARONNS0FindLeads *_rEALTYBARONNS0FindLeads = [[REALTYBARONNS0FindLeads alloc] init];
NS_DURING
{
[_rEALTYBARONNS0FindLeads initWithReader: reader];
}
NS_HANDLER
{
_rEALTYBARONNS0FindLeads = nil;
[localException raise];
}
NS_ENDHANDLER
[_rEALTYBARONNS0FindLeads autorelease];
return _rEALTYBARONNS0FindLeads;
}
/**
* Initialize this instance of REALTYBARONNS0FindLeads 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 REALTYBARONNS0FindLeads 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 REALTYBARONNS0FindLeads from an XML reader. The element to be read is
* "response".
*
* @param reader The XML reader.
* @return The REALTYBARONNS0FindLeads.
*/
+ (id) readXMLElement: (xmlTextReaderPtr) reader {
int status;
REALTYBARONNS0FindLeads *_findLeads = 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
_findLeads = (REALTYBARONNS0FindLeads *)[REALTYBARONNS0FindLeads 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 REALTYBARONNS0FindLeads. Expected element response. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
}
else {
[NSException raise: @"XMLReadError"
format: @"Unable to read REALTYBARONNS0FindLeads. Expected element response. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
}
}
return _findLeads;
}
/**
* Writes this REALTYBARONNS0FindLeads to XML under element name "response".
* The namespace declarations for the element will be written.
*
* @param writer The XML writer.
* @param _findLeads The FindLeads to write.
* @return 1 if successful, 0 otherwise.
*/
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
[self writeXMLElement: writer writeNamespaces: YES];
}
/**
* Writes this REALTYBARONNS0FindLeads 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 {}findLeads for root element {}response...");
#endif
[self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote type {}findLeads 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 "leads", xmlTextReaderConstLocalName(reader)) == 0
&& xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
NSLog(@"Attempting to read choice {}leads of type {}leads.");
#endif
__child = [REALTYBARONNS0Leads readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully read choice {}leads of type {}leads.");
#endif
[self setLeads: __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 leads]) {
status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "leads", NULL);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing start child element {}leads."];
}
#if DEBUG_ENUNCIATE > 1
NSLog(@"writing element {}leads...");
#endif
[[self leads] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote element {}leads...");
#endif
status = xmlTextWriterEndElement(writer);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing end child element {}leads."];
}
}
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 REALTYBARONNS0FindLeads (JAXB) */
#endif /* DEF_REALTYBARONNS0FindLeads_M */
#ifndef DEF_REALTYBARONNS0DeleteBid_M
#define DEF_REALTYBARONNS0DeleteBid_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 REALTYBARONNS0DeleteBid
/**
* bid
*/
- (REALTYBARONNS0Links *) links
{
return _links;
}
/**
* bid
*/
- (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;
}
- (void) dealloc
{
[self setLinks: nil];
[self setStatus: nil];
[super dealloc];
}
//documentation inherited.
+ (id) readFromXML: (NSData *) xml
{
REALTYBARONNS0DeleteBid *_rEALTYBARONNS0DeleteBid;
xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
if (reader == NULL) {
[NSException raise: @"XMLReadError"
format: @"Error instantiating an XML reader."];
return nil;
}
_rEALTYBARONNS0DeleteBid = (REALTYBARONNS0DeleteBid *) [REALTYBARONNS0DeleteBid readXMLElement: reader];
xmlFreeTextReader(reader); //free the reader
return _rEALTYBARONNS0DeleteBid;
}
//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 REALTYBARONNS0DeleteBid */
/**
* Internal, private interface for JAXB reading and writing.
*/
@interface REALTYBARONNS0DeleteBid (JAXB)
@end /*interface REALTYBARONNS0DeleteBid (JAXB)*/
/**
* Internal, private implementation for JAXB reading and writing.
*/
@implementation REALTYBARONNS0DeleteBid (JAXB)
/**
* Read an instance of REALTYBARONNS0DeleteBid from an XML reader.
*
* @param reader The reader.
* @return An instance of REALTYBARONNS0DeleteBid defined by the XML reader.
*/
+ (id) readXMLType: (xmlTextReaderPtr) reader
{
REALTYBARONNS0DeleteBid *_rEALTYBARONNS0DeleteBid = [[REALTYBARONNS0DeleteBid alloc] init];
NS_DURING
{
[_rEALTYBARONNS0DeleteBid initWithReader: reader];
}
NS_HANDLER
{
_rEALTYBARONNS0DeleteBid = nil;
[localException raise];
}
NS_ENDHANDLER
[_rEALTYBARONNS0DeleteBid autorelease];
return _rEALTYBARONNS0DeleteBid;
}
/**
* Initialize this instance of REALTYBARONNS0DeleteBid 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 REALTYBARONNS0DeleteBid 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 REALTYBARONNS0DeleteBid from an XML reader. The element to be read is
* "response".
*
* @param reader The XML reader.
* @return The REALTYBARONNS0DeleteBid.
*/
+ (id) readXMLElement: (xmlTextReaderPtr) reader {
int status;
REALTYBARONNS0DeleteBid *_deleteBid = 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
_deleteBid = (REALTYBARONNS0DeleteBid *)[REALTYBARONNS0DeleteBid 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 REALTYBARONNS0DeleteBid. Expected element response. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
}
else {
[NSException raise: @"XMLReadError"
format: @"Unable to read REALTYBARONNS0DeleteBid. Expected element response. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
}
}
return _deleteBid;
}
/**
* Writes this REALTYBARONNS0DeleteBid to XML under element name "response".
* The namespace declarations for the element will be written.
*
* @param writer The XML writer.
* @param _deleteBid The DeleteBid to write.
* @return 1 if successful, 0 otherwise.
*/
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
[self writeXMLElement: writer writeNamespaces: YES];
}
/**
* Writes this REALTYBARONNS0DeleteBid 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 {}deleteBid for root element {}response...");
#endif
[self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote type {}deleteBid 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"
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."];
}
}
}
@end /* implementation REALTYBARONNS0DeleteBid (JAXB) */
#endif /* DEF_REALTYBARONNS0DeleteBid_M */
#ifndef DEF_REALTYBARONNS0Bids_M
#define DEF_REALTYBARONNS0Bids_M
/**
* User: marc Date: Feb 3, 2010 Time: 7:22:30 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 REALTYBARONNS0Bids
/**
* bids
*/
- (NSArray *) bid
{
return _bid;
}
/**
* bids
*/
- (void) setBid: (NSArray *) newBid
{
[newBid retain];
[_bid release];
_bid = newBid;
}
- (void) dealloc
{
[self setBid: nil];
[super dealloc];
}
@end /* implementation REALTYBARONNS0Bids */
/**
* Internal, private interface for JAXB reading and writing.
*/
@interface REALTYBARONNS0Bids (JAXB)
@end /*interface REALTYBARONNS0Bids (JAXB)*/
/**
* Internal, private implementation for JAXB reading and writing.
*/
@implementation REALTYBARONNS0Bids (JAXB)
/**
* Read an instance of REALTYBARONNS0Bids from an XML reader.
*
* @param reader The reader.
* @return An instance of REALTYBARONNS0Bids defined by the XML reader.
*/
+ (id) readXMLType: (xmlTextReaderPtr) reader
{
REALTYBARONNS0Bids *_rEALTYBARONNS0Bids = [[REALTYBARONNS0Bids alloc] init];
NS_DURING
{
[_rEALTYBARONNS0Bids initWithReader: reader];
}
NS_HANDLER
{
_rEALTYBARONNS0Bids = nil;
[localException raise];
}
NS_ENDHANDLER
[_rEALTYBARONNS0Bids autorelease];
return _rEALTYBARONNS0Bids;
}
/**
* Initialize this instance of REALTYBARONNS0Bids 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 REALTYBARONNS0Bids 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 "bid", xmlTextReaderConstLocalName(reader)) == 0
&& xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
NSLog(@"Attempting to read choice {}bid of type {}bid.");
#endif
__child = [REALTYBARONNS0Bid readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully read choice {}bid of type {}bid.");
#endif
if ([self bid]) {
[self setBid: [[self bid] arrayByAddingObject: __child]];
}
else {
[self setBid: [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 bid]) {
__enumerator = [[self bid] objectEnumerator];
while ( (__item = [__enumerator nextObject]) ) {
status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "bid", NULL);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing start child element {}bid."];
}
#if DEBUG_ENUNCIATE > 1
NSLog(@"writing element {}bid...");
#endif
[__item writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote element {}bid...");
#endif
status = xmlTextWriterEndElement(writer);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing end child element {}bid."];
}
} //end item iterator.
}
}
@end /* implementation REALTYBARONNS0Bids (JAXB) */
#endif /* DEF_REALTYBARONNS0Bids_M */
#ifndef DEF_REALTYBARONNS0Auctions_M
#define DEF_REALTYBARONNS0Auctions_M
/**
* User: marc Date: Feb 3, 2010 Time: 7:22:30 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 REALTYBARONNS0Auctions
/**
* count
*/
- (int *) count
{
return _count;
}
/**
* count
*/
- (void) setCount: (int *) newCount
{
if (_count != NULL) {
free(_count);
}
_count = newCount;
}
/**
* bids
*/
- (NSArray *) auction
{
return _auction;
}
/**
* bids
*/
- (void) setAuction: (NSArray *) newAuction
{
[newAuction retain];
[_auction release];
_auction = newAuction;
}
- (void) dealloc
{
[self setCount: NULL];
[self setAuction: nil];
[super dealloc];
}
@end /* implementation REALTYBARONNS0Auctions */
/**
* Internal, private interface for JAXB reading and writing.
*/
@interface REALTYBARONNS0Auctions (JAXB)
@end /*interface REALTYBARONNS0Auctions (JAXB)*/
/**
* Internal, private implementation for JAXB reading and writing.
*/
@implementation REALTYBARONNS0Auctions (JAXB)
/**
* Read an instance of REALTYBARONNS0Auctions from an XML reader.
*
* @param reader The reader.
* @return An instance of REALTYBARONNS0Auctions defined by the XML reader.
*/
+ (id) readXMLType: (xmlTextReaderPtr) reader
{
REALTYBARONNS0Auctions *_rEALTYBARONNS0Auctions = [[REALTYBARONNS0Auctions alloc] init];
NS_DURING
{
[_rEALTYBARONNS0Auctions initWithReader: reader];
}
NS_HANDLER
{
_rEALTYBARONNS0Auctions = nil;
[localException raise];
}
NS_ENDHANDLER
[_rEALTYBARONNS0Auctions autorelease];
return _rEALTYBARONNS0Auctions;
}
/**
* Initialize this instance of REALTYBARONNS0Auctions 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 REALTYBARONNS0Auctions 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 "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 "auction", xmlTextReaderConstLocalName(reader)) == 0
&& xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
NSLog(@"Attempting to read choice {}auction of type {}auction.");
#endif
__child = [REALTYBARONNS0Auction readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully read choice {}auction of type {}auction.");
#endif
if ([self auction]) {
[self setAuction: [[self auction] arrayByAddingObject: __child]];
}
else {
[self setAuction: [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 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 auction]) {
__enumerator = [[self auction] objectEnumerator];
while ( (__item = [__enumerator nextObject]) ) {
status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "auction", NULL);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing start child element {}auction."];
}
#if DEBUG_ENUNCIATE > 1
NSLog(@"writing element {}auction...");
#endif
[__item writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote element {}auction...");
#endif
status = xmlTextWriterEndElement(writer);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing end child element {}auction."];
}
} //end item iterator.
}
}
@end /* implementation REALTYBARONNS0Auctions (JAXB) */
#endif /* DEF_REALTYBARONNS0Auctions_M */
#ifndef DEF_REALTYBARONNS0AnswerReview_M
#define DEF_REALTYBARONNS0AnswerReview_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 REALTYBARONNS0AnswerReview
/**
* (no documentation provided)
*/
- (REALTYBARONNS0Status *) status
{
return _status;
}
/**
* (no documentation provided)
*/
- (void) setStatus: (REALTYBARONNS0Status *) newStatus
{
[newStatus retain];
[_status release];
_status = newStatus;
}
- (void) dealloc
{
[self setStatus: nil];
[super dealloc];
}
//documentation inherited.
+ (id) readFromXML: (NSData *) xml
{
REALTYBARONNS0AnswerReview *_rEALTYBARONNS0AnswerReview;
xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
if (reader == NULL) {
[NSException raise: @"XMLReadError"
format: @"Error instantiating an XML reader."];
return nil;
}
_rEALTYBARONNS0AnswerReview = (REALTYBARONNS0AnswerReview *) [REALTYBARONNS0AnswerReview readXMLElement: reader];
xmlFreeTextReader(reader); //free the reader
return _rEALTYBARONNS0AnswerReview;
}
//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 REALTYBARONNS0AnswerReview */
/**
* Internal, private interface for JAXB reading and writing.
*/
@interface REALTYBARONNS0AnswerReview (JAXB)
@end /*interface REALTYBARONNS0AnswerReview (JAXB)*/
/**
* Internal, private implementation for JAXB reading and writing.
*/
@implementation REALTYBARONNS0AnswerReview (JAXB)
/**
* Read an instance of REALTYBARONNS0AnswerReview from an XML reader.
*
* @param reader The reader.
* @return An instance of REALTYBARONNS0AnswerReview defined by the XML reader.
*/
+ (id) readXMLType: (xmlTextReaderPtr) reader
{
REALTYBARONNS0AnswerReview *_rEALTYBARONNS0AnswerReview = [[REALTYBARONNS0AnswerReview alloc] init];
NS_DURING
{
[_rEALTYBARONNS0AnswerReview initWithReader: reader];
}
NS_HANDLER
{
_rEALTYBARONNS0AnswerReview = nil;
[localException raise];
}
NS_ENDHANDLER
[_rEALTYBARONNS0AnswerReview autorelease];
return _rEALTYBARONNS0AnswerReview;
}
/**
* Initialize this instance of REALTYBARONNS0AnswerReview 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 REALTYBARONNS0AnswerReview 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 REALTYBARONNS0AnswerReview from an XML reader. The element to be read is
* "response".
*
* @param reader The XML reader.
* @return The REALTYBARONNS0AnswerReview.
*/
+ (id) readXMLElement: (xmlTextReaderPtr) reader {
int status;
REALTYBARONNS0AnswerReview *_answerReview = 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
_answerReview = (REALTYBARONNS0AnswerReview *)[REALTYBARONNS0AnswerReview 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 REALTYBARONNS0AnswerReview. Expected element response. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
}
else {
[NSException raise: @"XMLReadError"
format: @"Unable to read REALTYBARONNS0AnswerReview. Expected element response. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
}
}
return _answerReview;
}
/**
* Writes this REALTYBARONNS0AnswerReview to XML under element name "response".
* The namespace declarations for the element will be written.
*
* @param writer The XML writer.
* @param _answerReview The AnswerReview to write.
* @return 1 if successful, 0 otherwise.
*/
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
[self writeXMLElement: writer writeNamespaces: YES];
}
/**
* Writes this REALTYBARONNS0AnswerReview 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 {}answerReview for root element {}response...");
#endif
[self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote type {}answerReview 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"
return NO;
}
//documentation inherited.
- (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader
{
return [super readUnknownJAXBChildElement: reader];
}
//documentation inherited.
- (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader
{
[super readUnknownJAXBAttribute: reader];
}
//documentation inherited.
- (void) writeJAXBAttributes: (xmlTextWriterPtr) writer
{
int status;
[super writeJAXBAttributes: writer];
}
//documentation inherited.
- (void) writeJAXBValue: (xmlTextWriterPtr) writer
{
[super writeJAXBValue: writer];
}
/**
* Method for writing the child elements.
*
* @param writer The writer.
*/
- (void) writeJAXBChildElements: (xmlTextWriterPtr) writer
{
int status;
id __item;
NSEnumerator *__enumerator;
[super writeJAXBChildElements: writer];
if ([self status]) {
status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "status", NULL);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing start child element {}status."];
}
#if DEBUG_ENUNCIATE > 1
NSLog(@"writing element {}status...");
#endif
[[self status] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote element {}status...");
#endif
status = xmlTextWriterEndElement(writer);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing end child element {}status."];
}
}
}
@end /* implementation REALTYBARONNS0AnswerReview (JAXB) */
#endif /* DEF_REALTYBARONNS0AnswerReview_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_REALTYBARONNS0Reviews_M
#define DEF_REALTYBARONNS0Reviews_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 REALTYBARONNS0Reviews
/**
* ratio
*/
- (NSDecimalNumber *) satisfied
{
return _satisfied;
}
/**
* ratio
*/
- (void) setSatisfied: (NSDecimalNumber *) newSatisfied
{
[newSatisfied retain];
[_satisfied release];
_satisfied = newSatisfied;
}
/**
* ratio
*/
- (NSDecimalNumber *) recommend
{
return _recommend;
}
/**
* ratio
*/
- (void) setRecommend: (NSDecimalNumber *) newRecommend
{
[newRecommend retain];
[_recommend release];
_recommend = newRecommend;
}
/**
* list of client reviews
*/
- (NSArray *) review
{
return _review;
}
/**
* list of client reviews
*/
- (void) setReview: (NSArray *) newReview
{
[newReview retain];
[_review release];
_review = newReview;
}
- (void) dealloc
{
[self setSatisfied: nil];
[self setRecommend: nil];
[self setReview: 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 "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"
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"
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 satisfied]) {
status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "satisfied", NULL);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing start child element {}satisfied."];
}
#if DEBUG_ENUNCIATE > 1
NSLog(@"writing element {}satisfied...");
#endif
[[self satisfied] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote element {}satisfied...");
#endif
status = xmlTextWriterEndElement(writer);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing end child element {}satisfied."];
}
}
if ([self recommend]) {
status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "recommend", NULL);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing start child element {}recommend."];
}
#if DEBUG_ENUNCIATE > 1
NSLog(@"writing element {}recommend...");
#endif
[[self recommend] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
NSLog(@"successfully wrote element {}recommend...");
#endif
status = xmlTextWriterEndElement(writer);
if (status < 0) {
[NSException raise: @"XMLWriteError"
format: @"Error writing end child element {}recommend."];
}
}
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.
}
}
@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_REALTYBARONNS0LeadStatus_M
#define DEF_REALTYBARONNS0LeadStatus_M
/**
* Reads a LeadStatus from XML. The reader is assumed to be at the start element.
*
* @param reader The XML reader.
* @return The LeadStatus, or NULL if unable to be read.
*/
static enum REALTYBARONNS0LeadStatus *xmlTextReaderReadREALTYBARONNS0LeadStatusType(xmlTextReaderPtr reader)
{
xmlChar *enumValue = xmlTextReaderReadEntireNodeValue(reader);
enum REALTYBARONNS0LeadStatus *value = calloc(1, sizeof(enum REALTYBARONNS0LeadStatus));
if (enumValue != NULL) {
if (xmlStrcmp(enumValue, BAD_CAST "open") == 0) {
*value = REALTYBARON_NS0_LEADSTATUS_OPEN;
free(enumValue);
return value;
}
if (xmlStrcmp(enumValue, BAD_CAST "bogus") == 0) {
*value = REALTYBARON_NS0_LEADSTATUS_BOGUS;
free(enumValue);
return value;
}
if (xmlStrcmp(enumValue, BAD_CAST "closed") == 0) {
*value = REALTYBARON_NS0_LEADSTATUS_CLOSED;
free(enumValue);
return value;
}
if (xmlStrcmp(enumValue, BAD_CAST "pending") == 0) {
*value = REALTYBARON_NS0_LEADSTATUS_PENDING;
free(enumValue);
return value;
}
if (xmlStrcmp(enumValue, BAD_CAST "refunded") == 0) {
*value = REALTYBARON_NS0_LEADSTATUS_REFUNDED;
free(enumValue);
return value;
}
if (xmlStrcmp(enumValue, BAD_CAST "unresponsive") == 0) {
*value = REALTYBARON_NS0_LEADSTATUS_UNRESPONSIVE;
free(enumValue);
return value;
}
if (xmlStrcmp(enumValue, BAD_CAST "uninterested") == 0) {
*value = REALTYBARON_NS0_LEADSTATUS_UNINTERESTED;
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 _leadStatus The string to format.
* @return The enum value or NULL on error.
*/
static enum REALTYBARONNS0LeadStatus *formatStringToREALTYBARONNS0LeadStatusType(NSString *_leadStatus)
{
enum REALTYBARONNS0LeadStatus *value = calloc(1, sizeof(enum REALTYBARONNS0LeadStatus));
value = NULL;
if ([@"open" isEqualToString:_leadStatus]) {
*value = REALTYBARON_NS0_LEADSTATUS_OPEN;
}
if ([@"bogus" isEqualToString:_leadStatus]) {
*value = REALTYBARON_NS0_LEADSTATUS_BOGUS;
}
if ([@"closed" isEqualToString:_leadStatus]) {
*value = REALTYBARON_NS0_LEADSTATUS_CLOSED;
}
if ([@"pending" isEqualToString:_leadStatus]) {
*value = REALTYBARON_NS0_LEADSTATUS_PENDING;
}
if ([@"refunded" isEqualToString:_leadStatus]) {
*value = REALTYBARON_NS0_LEADSTATUS_REFUNDED;
}
if ([@"unresponsive" isEqualToString:_leadStatus]) {
*value = REALTYBARON_NS0_LEADSTATUS_UNRESPONSIVE;
}
if ([@"uninterested" isEqualToString:_leadStatus]) {
*value = REALTYBARON_NS0_LEADSTATUS_UNINTERESTED;
}
#if DEBUG_ENUNCIATE
NSLog(@"Attempt to read enum value failed: %s doesn't match an enum value.", _leadStatus);
#endif
return value;
}
/**
* Writes a LeadStatus to XML.
*
* @param writer The XML writer.
* @param _leadStatus The LeadStatus to write.
* @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
*/
static int xmlTextWriterWriteREALTYBARONNS0LeadStatusType(xmlTextWriterPtr writer, enum REALTYBARONNS0LeadStatus *_leadStatus)
{
switch (*_leadStatus) {
case REALTYBARON_NS0_LEADSTATUS_OPEN:
return xmlTextWriterWriteString(writer, BAD_CAST "open");
case REALTYBARON_NS0_LEADSTATUS_BOGUS:
return xmlTextWriterWriteString(writer, BAD_CAST "bogus");
case REALTYBARON_NS0_LEADSTATUS_CLOSED:
return xmlTextWriterWriteString(writer, BAD_CAST "closed");
case REALTYBARON_NS0_LEADSTATUS_PENDING:
return xmlTextWriterWriteString(writer, BAD_CAST "pending");
case REALTYBARON_NS0_LEADSTATUS_REFUNDED:
return xmlTextWriterWriteString(writer, BAD_CAST "refunded");
case REALTYBARON_NS0_LEADSTATUS_UNRESPONSIVE:
return xmlTextWriterWriteString(writer, BAD_CAST "unresponsive");
case REALTYBARON_NS0_LEADSTATUS_UNINTERESTED:
return xmlTextWriterWriteString(writer, BAD_CAST "uninterested");
}
#if DEBUG_ENUNCIATE
NSLog(@"Unable to write enum value (no valid value found).");
#endif
return -1;
}
/**
* Utility method for getting the string value of LeadStatus.
*
* @param _leadStatus The LeadStatus to format.
* @return The string value or NULL on error.
*/
static NSString *formatREALTYBARONNS0LeadStatusTypeToString(enum REALTYBARONNS0LeadStatus *_leadStatus)
{
switch (*_leadStatus) {
case REALTYBARON_NS0_LEADSTATUS_OPEN:
return @"open";
case REALTYBARON_NS0_LEADSTATUS_BOGUS:
return @"bogus";
case REALTYBARON_NS0_LEADSTATUS_CLOSED:
return @"closed";
case REALTYBARON_NS0_LEADSTATUS_PENDING:
return @"pending";
case REALTYBARON_NS0_LEADSTATUS_REFUNDED:
return @"refunded";
case REALTYBARON_NS0_LEADSTATUS_UNRESPONSIVE:
return @"unresponsive";
case REALTYBARON_NS0_LEADSTATUS_UNINTERESTED:
return @"uninterested";
default:
return NULL;
}
return NULL;
}
#endif /* DEF_REALTYBARONNS0LeadStatus_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_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 */