#include /** * Enunciate-specific C functions. */ #ifndef ENUNCIATE_C_UTILITIES #define ENUNCIATE_C_UTILITIES /*******************xml utilities************************************/ static int xmlTextReaderAdvanceToNextStartOrEndElement(xmlTextReaderPtr reader) { int status = xmlTextReaderRead(reader); while (status && xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT && xmlTextReaderNodeType(reader) != XML_READER_TYPE_END_ELEMENT) { status = xmlTextReaderRead(reader); } return status; } static int xmlTextReaderSkipElement(xmlTextReaderPtr reader) { int status = xmlTextReaderNext(reader); while (status && xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT && xmlTextReaderNodeType(reader) != XML_READER_TYPE_END_ELEMENT) { status = xmlTextReaderRead(reader); } return status; } static xmlChar *xmlTextReaderReadEntireNodeValue(xmlTextReaderPtr reader) { xmlChar *buffer = calloc(1, sizeof(xmlChar)); const xmlChar *snippet; int status; if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ATTRIBUTE) { return xmlTextReaderValue(reader); } else if (xmlTextReaderIsEmptyElement(reader) == 0) { status = xmlTextReaderRead(reader); while (status && (xmlTextReaderNodeType(reader) == XML_READER_TYPE_TEXT || xmlTextReaderNodeType(reader) == XML_READER_TYPE_CDATA || xmlTextReaderNodeType(reader) == XML_READER_TYPE_ENTITY_REFERENCE)) { snippet = xmlTextReaderConstValue(reader); buffer = realloc(buffer, (xmlStrlen(buffer) + xmlStrlen(snippet) + 1) * sizeof(xmlChar)); xmlStrcat(buffer, snippet); status = xmlTextReaderRead(reader); } } return buffer; } /*******************base 64 utilities************************************/ /* * Base64 Translation Table as described in RFC1113. * * This code was graciously ripped from http://base64.sourceforge.net */ static const char cb64[]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; /* * Base64 Translation Table to decode (created by author) * * This code was graciously ripped from http://base64.sourceforge.net */ static const char cd64[]="|$$$}rstuvwxyz{$$$$$$$>?@ABCDEFGHIJKLMNOPQRSTUVW$$$$$$XYZ[\\]^_`abcdefghijklmnopq"; /* * encode 3 8-bit binary bytes as 4 '6-bit' characters * * This code was graciously ripped from http://base64.sourceforge.net * * @param in the block to encode * @param out the block to encode to * @param len the length of the 'in' block. */ static void _encode_base64_block(unsigned char in[3], unsigned char out[4], int len) { out[0] = cb64[ in[0] >> 2 ]; out[1] = cb64[ ((in[0] & 0x03) << 4) | ((in[1] & 0xf0) >> 4) ]; out[2] = (unsigned char) (len > 1 ? cb64[ ((in[1] & 0x0f) << 2) | ((in[2] & 0xc0) >> 6) ] : '='); out[3] = (unsigned char) (len > 2 ? cb64[ in[2] & 0x3f ] : '='); } /* * decode 4 '6-bit' characters into 3 8-bit binary bytes * * This code was graciously ripped from http://base64.sourceforge.net */ static void _decode_base64_block( unsigned char in[4], unsigned char out[3] ) { out[ 0 ] = (unsigned char ) (in[0] << 2 | in[1] >> 4); out[ 1 ] = (unsigned char ) (in[1] << 4 | in[2] >> 2); out[ 2 ] = (unsigned char ) (((in[2] << 6) & 0xc0) | in[3]); } /* * base64 encode a stream adding padding and line breaks as per spec. * * This code was graciously ripped from http://base64.sourceforge.net * * @param instream The stream to encode. * @param insize The size of the stream to encode. * @return The encoded string. */ xmlChar *_encode_base64(unsigned char *instream, int insize) { unsigned char in[3]; unsigned char out[4]; xmlChar *encoded; int i, in_index = 0, out_index = 0, blocklen; if (insize == 0) { return BAD_CAST "\0"; } encoded = calloc(((insize / 3) * 4) + 10, sizeof(xmlChar)); while (in_index <= insize) { blocklen = 0; for (i = 0; i < 3; i++) { in[i] = instream[in_index++]; if (in_index <= insize) { blocklen++; } else { in[i] = 0; } } if (blocklen) { _encode_base64_block(in, out, blocklen); for( i = 0; i < 4; i++ ) { encoded[out_index++] = out[i]; } } } return encoded; } /* * Decode a base64 encoded stream discarding padding, line breaks and noise * * This code was graciously ripped from http://base64.sourceforge.net * * @param invalue The string to decode. * @param outsize Holder for the length of the returned data. * @return The decoded data. */ unsigned char *_decode_base64( const xmlChar *invalue, int *outsize ) { xmlChar in[4]; unsigned char out[3], v; int i, in_index = 0, out_index = 0, blocklen; unsigned char *outstream; if (invalue == NULL) { return NULL; } outstream = calloc(((xmlStrlen(invalue) / 4) * 3) + 1, sizeof(unsigned char)); while (invalue[in_index] != '\0') { for (blocklen = 0, i = 0; i < 4 && invalue[in_index]; i++) { v = 0; while (invalue[in_index] != '\0' && v == 0) { v = (unsigned char) invalue[in_index++]; v = (unsigned char) ((v < 43 || v > 122) ? 0 : cd64[ v - 43 ]); if (v) { v = (unsigned char) ((v == '$') ? 0 : v - 61); } } if (invalue[in_index] != '\0') { blocklen++; if (v) { in[i] = (unsigned char) (v - 1); } } else { in[i] = 0; } } if (blocklen) { _decode_base64_block( in, out ); for( i = 0; i < blocklen - 1; i++ ) { outstream[out_index++] = out[i]; } } } if (outsize != NULL) { *outsize = out_index; } return outstream; } #endif /* ENUNCIATE_C_UTILITIES */ #ifndef ENUNCIATE_OBJC_CLASSES #define ENUNCIATE_OBJC_CLASSES /** * Protocol defining a JAXB (see https://jaxb.dev.java.net/) type. */ @protocol JAXBType /** * Read an XML type from an XML reader. * * @param reader The reader. * @return An instance of the object defining the JAXB type. */ + (id) readXMLType: (xmlTextReaderPtr) reader; /** * Initialize the object with an XML reader. * * @param reader The XML reader from which to initialize the values of this type. */ - (id) initWithReader: (xmlTextReaderPtr) reader; /** * Write this instance of a JAXB type to a writer. * * @param writer The writer. */ - (void) writeXMLType: (xmlTextWriterPtr) writer; @end /*protocol JAXBType*/ /** * Protocol defining a JAXB (see https://jaxb.dev.java.net/) element. */ @protocol JAXBElement /** * Read the XML element from an XML reader. It is assumed * that the reader is pointing at the start element (be careful * that it's not still pointing to the XML document). * * @param reader The reader. * @return An instance of the object defining the JAXB element. */ + (id) readXMLElement: (xmlTextReaderPtr) reader; /** * Write this instance of a JAXB element to a writer. * * @param writer The writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer; /** * Write this instance of a JAXB element to a 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; @end /*protocol JAXBElement*/ /** * Protocol defining methods for events that occur * when reading/parsing XML. Intended for internal * use only. */ @protocol JAXBReading /** * Method for reading an attribute. * * @param reader The reader pointing to the attribute. * @return Whether the attribute was read. */ - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader; /** * Method for reading the value of an element. * * @param reader The reader pointing to the element containing a value. * @return Whether the value was read. */ - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader; /** * Method for reading a child element. If (and only if) the child * element was handled, the element in the reader should be * "consumed" and the reader will be pointing to the end element. * * @param reader The reader pointing to the child element. * @return Whether the child element was read. */ - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader; /** * Method for reading an unknown attribute. * * @param reader The reader pointing to the unknown attribute. * @return Whether the attribute was read. */ - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader; /** * Method for reading an unknown child element. Implementations * must be responsible for "consuming" the child element. * * @param reader The reader pointing to the unknown child element. * @return The status of the reader after having consumed the unknown child element. */ - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader; @end /*protocol JAXBReading*/ /** * Protocol defining methods for events that occur * when writing XML. Intended for internal * use only. */ @protocol JAXBWriting /** * Method for writing the attributes. * * @param writer The writer. */ - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer; /** * Method for writing the element value. * * @param writer The writer. */ - (void) writeJAXBValue: (xmlTextWriterPtr) writer; /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer; @end /*protocol JAXBWriting*/ /** * Declaration of the JAXB type, element, events for a base object. */ @interface NSObject (JAXB) @end /** * Implementation of the JAXB type, element, events for a base object. */ @implementation NSObject (JAXB) /** * Read the XML type from the reader; an instance of NSXMLElement. * * @param reader The reader. * @return An instance of NSXMLElement */ + (id) readXMLType: (xmlTextReaderPtr) reader { return [JAXBBasicXMLNode readXMLType: reader]; } /** * Read an XML type from an XML reader into an existing instance. * * @param reader The reader. * @param existing The existing instance into which to read values. */ - (id) initWithReader: (xmlTextReaderPtr) reader { int status, depth; if ((self = [self init])) { if (xmlTextReaderHasAttributes(reader)) { while (xmlTextReaderMoveToNextAttribute(reader)) { if ([self readJAXBAttribute: reader] == NO) { [self readUnknownJAXBAttribute: reader]; } } status = xmlTextReaderMoveToElement(reader); if (!status) { //panic: unable to return to the element node. [NSException raise: @"XMLReadError" format: @"Error moving back to element position from attributes."]; } } if ([self readJAXBValue: reader] == NO) { //no value handled; attempt to process child elements if (xmlTextReaderIsEmptyElement(reader) == 0) { depth = xmlTextReaderDepth(reader);//track the depth. status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); while (xmlTextReaderDepth(reader) > depth) { if (status < 1) { //panic: XML read error. [NSException raise: @"XMLReadError" format: @"Error handling a child element."]; } else if ([self readJAXBChildElement: reader]) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); } else { status = [self readUnknownJAXBChildElement: reader]; } } } } } return self; } /** * Write the XML type value of this object to the writer. * * @param writer The writer. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [self writeJAXBAttributes: writer]; [self writeJAXBValue: writer]; [self writeJAXBChildElements: writer]; } /** * Read the XML element from the reader; an instance of NSXMLElement. * * @param reader The reader. * @return An instance of NSXMLElement */ + (id) readXMLElement: (xmlTextReaderPtr) reader { return (id) [JAXBBasicXMLNode readXMLType: reader]; } /** * No op; root objects don't have an element name/namespace. Subclasses must override. * * @param writer The writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { //no-op } /** * No op; root objects don't have an element name/namespace. Subclasses must override. * * @param writer The writer. * @param writeNs Ignored. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { //no-op } /** * No-op; base objects do not handle any attributes. * * @param reader The reader pointing to the attribute. * @return NO */ - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { return NO; } /** * No-op; base objects do not handle any values. * * @param reader The reader pointing to the element containing a value. * @return NO */ - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return NO; } /** * No-op; base objects do not handle any child elements. * * @param reader The reader pointing to the child element. * @return NO */ - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { return NO; } /** * No-op; base objects do not handle any attributes. * * @param reader The reader pointing to the unknown attribute. */ - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { } /** * Just skips the unknown element; base objects do not handle any child elements. * * @param reader The reader pointing to the unknown child element. * @return The status of the reader after skipping the unknown child element. */ - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return xmlTextReaderSkipElement(reader); } /** * No-op; base objects have no attributes. * * @param writer The writer. */ - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { //no-op. } /** * No-op; base objects have no element value. * * @param writer The writer. */ - (void) writeJAXBValue: (xmlTextWriterPtr) writer { //no-op. } /** * No-op; base objects have no child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { //no-op. } @end /*NSObject (JAXB)*/ /** * Implementation of the JAXB type, element for an xml element. */ @implementation JAXBBasicXMLNode /** * Accessor for the (local) name of the XML node. * * @return The (local) name of the XML node. */ - (NSString *) name { return _name; } /** * Accessor for the (local) name of the XML node. * * @param newName The (local) name of the XML node. */ - (void) setName: (NSString *) newName { [newName retain]; [_name release]; _name = newName; } /** * Accessor for the namespace of the XML node. * * @return The namespace of the XML node. */ - (NSString *) ns { return _ns; } /** * Accessor for the namespace of the XML node. * * @param newNs The namespace of the XML node. */ - (void) setNs: (NSString *) newNs { [newNs retain]; [_ns release]; _ns = newNs; } /** * Accessor for the namespace prefix of the XML node. * * @return The namespace prefix of the XML node. */ - (NSString *) prefix { return _prefix; } /** * Accessor for the namespace prefix of the XML node. * * @param newPrefix The namespace prefix of the XML node. */ - (void) setPrefix: (NSString *) newPrefix { [newPrefix retain]; [_prefix release]; _prefix = newPrefix; } /** * Accessor for the value of the XML node. * * @return The value of the XML node. */ - (NSString *) value { return _value; } /** * Accessor for the value of the XML node. * * @param newValue The value of the XML node. */ - (void) setValue: (NSString *) newValue { [newValue retain]; [_value release]; _value = newValue; } /** * Accessor for the child elements of the XML node. * * @return The child elements of the XML node. */ - (NSArray *) childElements { return _childElements; } /** * Accessor for the child elements of the XML node. * * @param newValue The child elements of the XML node. */ - (void) setChildElements: (NSArray *) newChildElements { [newChildElements retain]; [_childElements release]; _childElements = newChildElements; } /** * Accessor for the attributes of the XML node. * * @return The attributes of the XML node. */ - (NSArray *) attributes { return _attributes; } /** * Accessor for the attributes of the XML node. * * @param newAttributes The attributes of the XML node. */ - (void) setAttributes: (NSArray *) newAttributes { [newAttributes retain]; [_attributes release]; _attributes = newAttributes; } - (void) dealloc { [self setName: nil]; [self setNs: nil]; [self setPrefix: nil]; [self setValue: nil]; [self setChildElements: nil]; [self setAttributes: nil]; [super dealloc]; } @end /*implementation JAXBBasicXMLNode*/ /** * Internal, private interface for JAXB reading and writing. */ @interface JAXBBasicXMLNode (JAXB) @end /*interface JAXBBasicXMLNode (JAXB)*/ @implementation JAXBBasicXMLNode (JAXB) /** * Read the XML type from the reader; an instance of JAXBBasicXMLNode. * * @param reader The reader. * @return An instance of JAXBBasicXMLNode */ + (id) readXMLType: (xmlTextReaderPtr) reader { JAXBBasicXMLNode *node = [[JAXBBasicXMLNode alloc] init]; NS_DURING { [node initWithReader: reader]; } NS_HANDLER { [node dealloc]; node = nil; [localException raise]; } NS_ENDHANDLER [node autorelease]; return node; } /** * Read an XML type from an XML reader into an existing instance of JAXBBasicXMLNode. * * @param reader The reader. * @param existing The existing instance into which to read values. */ - (id) initWithReader: (xmlTextReaderPtr) reader { int status, depth; JAXBBasicXMLNode *child; xmlChar *value = NULL; const xmlChar *text; NSMutableArray *children; if ((self = [self init])) { depth = xmlTextReaderDepth(reader); [self setName: [NSString stringWithUTF8String: (const char *) xmlTextReaderLocalName(reader)]]; [self setNs: [NSString stringWithUTF8String: (const char *) xmlTextReaderNamespaceUri(reader)]]; [self setPrefix: [NSString stringWithUTF8String: (const char *)xmlTextReaderPrefix(reader)]]; if (xmlTextReaderHasAttributes(reader)) { child = nil; children = [[NSMutableArray alloc] init]; while (xmlTextReaderMoveToNextAttribute(reader)) { child = [[JAXBBasicXMLNode alloc] init]; [child setName: [NSString stringWithUTF8String: (const char *) xmlTextReaderLocalName(reader)]]; [child setNs: [NSString stringWithUTF8String: (const char *)xmlTextReaderNamespaceUri(reader)]]; [child setPrefix: [NSString stringWithUTF8String: (const char *) xmlTextReaderPrefix(reader)]]; [child setValue: [NSString stringWithUTF8String: (const char *) xmlTextReaderValue(reader)]]; [children addObject: child]; } [self setAttributes: children]; status = xmlTextReaderMoveToElement(reader); if (status < 1) { //panic: unable to return to the element node. [NSException raise: @"XMLReadError" format: @"Error moving to element from attributes."]; } } if (xmlTextReaderIsEmptyElement(reader) == 0) { children = [[NSMutableArray alloc] init]; status = xmlTextReaderRead(reader); while (status == 1 && xmlTextReaderDepth(reader) > depth) { switch (xmlTextReaderNodeType(reader)) { case XML_READER_TYPE_ELEMENT: child = (JAXBBasicXMLNode *) [JAXBBasicXMLNode readXMLType: reader]; [children addObject: child]; break; case XML_READER_TYPE_TEXT: case XML_READER_TYPE_CDATA: text = xmlTextReaderConstValue(reader); value = xmlStrncat(value, text, xmlStrlen(text)); break; default: //skip anything else. break; } status = xmlTextReaderRead(reader); } if (status < 1) { //panic: xml read error [NSException raise: @"XMLReadError" format: @"Error reading child elements."]; } if ([children count] > 0) { [self setChildElements: children]; } if (value != NULL) { [self setValue: [NSString stringWithUTF8String: (const char *) value]]; } } } return self; } /** * Read the XML element from the reader; an instance of NSXMLElement. * * @param reader The reader. * @return An instance of NSXMLElement */ + (id) readXMLElement: (xmlTextReaderPtr) reader { return (id) [JAXBBasicXMLNode readXMLType: reader]; } /** * Write the basic node to an xml writer. * * @param writer The writer. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { int status; NSEnumerator *enumerator; JAXBBasicXMLNode *child; xmlChar *childns, *childname, *childprefix, *childvalue; status = xmlTextWriterStartElementNS(writer, _prefix ? BAD_CAST [_prefix UTF8String] : NULL, _name ? BAD_CAST [_name UTF8String] : NULL, _ns ? BAD_CAST [_ns UTF8String] : NULL); if (status < 0) { childns = BAD_CAST ""; if (_ns) { childns = BAD_CAST [_ns UTF8String]; } childname = BAD_CAST ""; if (_name) { childname = BAD_CAST [_name UTF8String]; } [NSException raise: @"XMLWriteError" format: @"Error writing start element {%s}%s for JAXBBasicXMLNode.", childns, childname]; } if (_attributes) { enumerator = [_attributes objectEnumerator]; while ( (child = (JAXBBasicXMLNode *)[enumerator nextObject]) ) { childns = NULL; if ([child ns]) { childns = BAD_CAST [[child ns] UTF8String]; } childprefix = NULL; if ([child prefix]) { childprefix = BAD_CAST [[child prefix] UTF8String]; } childname = NULL; if ([child name]) { childname = BAD_CAST [[child name] UTF8String]; } childvalue = NULL; if ([child value]) { childvalue = BAD_CAST [[child value] UTF8String]; } status = xmlTextWriterWriteAttributeNS(writer, childprefix, childname, childns, childvalue); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing attribute {%s}%s for JAXBBasicXMLNode.", childns, childname]; } } } if (_value) { status = xmlTextWriterWriteString(writer, BAD_CAST [_value UTF8String]); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing value of JAXBBasicXMLNode."]; } } if (_childElements) { enumerator = [_childElements objectEnumerator]; while ( (child = [enumerator nextObject]) ) { [child writeXMLType: writer]; } } status = xmlTextWriterEndElement(writer); if (status < 0) { childns = BAD_CAST ""; if (_ns) { childns = BAD_CAST [_ns UTF8String]; } childname = BAD_CAST ""; if (_name) { childname = BAD_CAST [_name UTF8String]; } [NSException raise: @"XMLWriteError" format: @"Error writing end element {%s}%s for JAXBBasicXMLNode.", childns, childname]; } } /** * Writes this node to a writer. * * @param writer The writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLType: writer]; } /** * Writes this node to a 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 { [self writeXMLType: writer]; } @end /* implementation JAXBBasicXMLNode (JAXB) */ /** * Declaration of the JAXB type for a string. */ @interface NSString (JAXBType) @end /** * Implementation of the JAXB type for a string. */ @implementation NSString (JAXBType) /** * Read the XML type from the reader. * * @param reader The reader. * @return The NSString that was read from the reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { return [NSString stringWithUTF8String: (const char *) xmlTextReaderReadEntireNodeValue(reader)]; } /** * Read an XML type from an XML reader into an existing instance. * * @param reader The reader. * @param existing The existing instance into which to read values. */ - (id) initWithReader: (xmlTextReaderPtr) reader { [NSException raise: @"XMLReadError" format: @"An existing string cannot be modified."]; return nil; } /** * Write the NSString to the writer. * * @param writer The writer. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { xmlTextWriterWriteString(writer, BAD_CAST [self UTF8String]); } @end /*NSString (JAXBType)*/ /** * Declaration of the JAXB type for a big number. */ @interface NSNumber (JAXBType) @end /** * Implementation of the JAXB type for a big number. */ @implementation NSNumber (JAXBType) /** * Read the XML type from the reader. * * @param reader The reader. * @return The NSNumber that was read from the reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { return [NSNumber numberWithLongLong: [[NSString stringWithUTF8String: (const char *) xmlTextReaderReadEntireNodeValue(reader)] longLongValue]]; } /** * Read an XML type from an XML reader into an existing instance. * * @param reader The reader. * @param existing The existing instance into which to read values. */ - (id) initWithReader: (xmlTextReaderPtr) reader { [NSException raise: @"XMLReadError" format: @"An existing number cannot be modified."]; return nil; } /** * Write the NSNumber to the writer. * * @param writer The writer. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { xmlTextWriterWriteString(writer, BAD_CAST [[self description] UTF8String]); } @end /*NSNumber (JAXBType)*/ /** * Declaration of the JAXB type for a big number. */ @interface NSDecimalNumber (JAXBType) @end /** * Implementation of the JAXB type for a big number. */ @implementation NSDecimalNumber (JAXBType) /** * Read the XML type from the reader. * * @param reader The reader. * @return The NSDecimalNumber that was read from the reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { return [NSDecimalNumber decimalNumberWithString: [NSString stringWithUTF8String: (const char *) xmlTextReaderReadEntireNodeValue(reader)]]; } /** * Read an XML type from an XML reader into an existing instance. * * @param reader The reader. * @param existing The existing instance into which to read values. */ - (id) initWithReader: (xmlTextReaderPtr) reader { [NSException raise: @"XMLReadError" format: @"An existing decimal number cannot be modified."]; return nil; } /** * Write the NSDecimalNumber to the writer. * * @param writer The writer. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { xmlTextWriterWriteString(writer, BAD_CAST [[self description] UTF8String]); } @end /*NSDecimalNumber (JAXBType)*/ /** * Declaration of the JAXB type for a url. */ @interface NSURL (JAXBType) @end /** * Implementation of the JAXB type for a url. */ @implementation NSURL (JAXBType) /** * Read the XML type from the reader. * * @param reader The reader. * @return The NSURL that was read from the reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { return [NSURL URLWithString: [NSString stringWithUTF8String: (const char *) xmlTextReaderReadEntireNodeValue(reader)]]; } /** * Read an XML type from an XML reader into an existing instance. * * @param reader The reader. * @param existing The existing instance into which to read values. */ - (id) initWithReader: (xmlTextReaderPtr) reader { [NSException raise: @"XMLReadError" format: @"An existing url cannot be modified."]; return nil; } /** * Write the NSURL to the writer. * * @param writer The writer. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { xmlTextWriterWriteString(writer, BAD_CAST [[self absoluteString] UTF8String]); } @end /*NSURL (JAXBType)*/ /** * Declaration of the JAXB type for binary data. */ @interface NSData (JAXBType) @end /** * Implementation of the JAXB type for a binary data. */ @implementation NSData (JAXBType) /** * Read the XML type from the reader. * * @param reader The reader. * @return The NSData that was read from the reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { xmlChar *base64data = xmlTextReaderReadEntireNodeValue(reader); int len; unsigned char *data = _decode_base64(base64data, &len); NSData *wrappedData = [NSData dataWithBytesNoCopy: data length: len]; free(base64data); return wrappedData; } /** * Read an XML type from an XML reader into an existing instance. * * @param reader The reader. * @param existing The existing instance into which to read values. */ - (id) initWithReader: (xmlTextReaderPtr) reader { [NSException raise: @"XMLReadError" format: @"An existing NSData cannot be modified."]; return nil; } /** * Write the NSData to the writer. * * @param writer The writer. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { xmlChar *out = _encode_base64((unsigned char *)[self bytes], [self length]); xmlTextWriterWriteString(writer, out); free(out); } @end /*NSData (JAXBType)*/ /** * Declaration of the JAXB type for a big number. */ @interface NSDate (JAXBType) @end /** * Implementation of the JAXB type for a big number. */ @implementation NSDate (JAXBType) /** * Read the XML type from the reader. * * @param reader The reader. * @return The NSDate that was read from the reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { xmlChar *timevalue = xmlTextReaderReadEntireNodeValue(reader); NSInteger year = 0; NSUInteger month = 1, day = 1, hour = 0, minute = 0, second = 0; BOOL skip_time = NO; int index = 0, token_index = 0, len = xmlStrlen(timevalue), offset_hour = 0, offset_minute = 0; char token[len]; if (len > (index + 5) && timevalue[index + 4] == '-') { //assume we're at yyyy-MM-dd token_index = 0; while (index < len && timevalue[index] != '-') { token[token_index++] = timevalue[index++]; } token[token_index] = '\0'; if (token_index != 4) { [NSException raise: @"XMLReadError" format: @"Unable to read dateTime %s; invalid year: %s", timevalue, token]; } year = atoi(token); index++; //go to next '-' character. token_index = 0; while (index < len && timevalue[index] != '-') { token[token_index++] = timevalue[index++]; } token[token_index] = '\0'; if (token_index != 2) { [NSException raise: @"XMLReadError" format: @"Unable to read dateTime %s; invalid month: %s", timevalue, token]; } month = atoi(token); index++; //go to 'T', 'Z', '+', or '-' character. token_index = 0; while (index < len && timevalue[index] != 'T' && timevalue[index] != 'Z' && timevalue[index] != '-' && timevalue[index] != '+') { token[token_index++] = timevalue[index++]; } token[token_index] = '\0'; if (token_index != 2) { [NSException raise: @"XMLReadError" format: @"Unable to read dateTime %s; invalid day of month: %s", timevalue, token]; } day = atoi(token); if (timevalue[index] != 'T') { skip_time = YES; } if (timevalue[index] != '-') { index++; } } if (skip_time == NO || (len > (index + 3) && timevalue[index + 2] == ':')) { //assume we're at HH:mm:ss //go to ':' character. token_index = 0; while (index < len && timevalue[index] != ':') { token[token_index++] = timevalue[index++]; } token[token_index] = '\0'; if (token_index != 2) { [NSException raise: @"XMLReadError" format: @"Unable to read dateTime %s; invalid hour: %s", timevalue, token]; } hour = atoi(token); index++; //go to ':' character. token_index = 0; while (index < len && timevalue[index] != ':') { token[token_index++] = timevalue[index++]; } token[token_index] = '\0'; if (token_index != 2) { [NSException raise: @"XMLReadError" format: @"Unable to read dateTime %s; invalid minute: %s", timevalue, token]; } minute = atoi(token); index++; //go to '+' or '-' or 'Z' character. token_index = 0; while (index < len && timevalue[index] != '+' && timevalue[index] != '-' && timevalue[index] != 'Z') { token[token_index++] = timevalue[index++]; } token[token_index] = '\0'; if (token_index == 0) { [NSException raise: @"XMLReadError" format: @"Unable to read dateTime %s; invalid seconds: %s", timevalue, token]; } second = (NSUInteger) atof(token); if (timevalue[index] != '-') { index++; } } //go to ':' character. token_index = 0; while (index < len && timevalue[index] != ':') { token[token_index++] = timevalue[index++]; } token[token_index] = '\0'; offset_hour += atoi(token); index++; //go to end. token_index = 0; while (index < len) { token[token_index++] = timevalue[index++]; } token[token_index] = '\0'; offset_minute += atoi(token); //YYYY-MM-DD HH:MM:SS -HHHMM free(timevalue); return [NSDate dateWithString: [NSString stringWithFormat: @"%04i-%02i-%02i %02i:%02i:%02i %+03i%02i", year, month, day, hour, minute, second, offset_hour, offset_minute]]; } /** * Read an XML type from an XML reader into an existing instance. * * @param reader The reader. * @param existing The existing instance into which to read values. */ - (id) initWithReader: (xmlTextReaderPtr) reader { [NSException raise: @"XMLReadError" format: @"An existing date cannot be modified."]; return nil; } /** * Write the NSDate to the writer. * * @param writer The writer. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { NSDateFormatter *formatter = [[NSDateFormatter alloc] initWithDateFormat: @"%Y-%m-%dT%H:%M:%S %z" allowNaturalLanguage: NO]; xmlChar *timevalue = BAD_CAST [[formatter stringForObjectValue: self] UTF8String]; timevalue[19] = timevalue[20]; timevalue[20] = timevalue[21]; timevalue[21] = timevalue[22]; timevalue[22] = ':'; xmlTextWriterWriteString(writer, timevalue); [formatter release]; } @end /*NSDate (JAXBType)*/ #endif /* ENUNCIATE_OBJC_CLASSES */ #ifndef ENUNCIATE_XML_OBJC_PRIMITIVE_FUNCTIONS #define ENUNCIATE_XML_OBJC_PRIMITIVE_FUNCTIONS /*******************boolean************************************/ /** * Read a boolean value from the reader. * * @param reader The reader (pointing at a node with a value). * @return YES if "true" was read. NO otherwise. */ static BOOL *xmlTextReaderReadBooleanType(xmlTextReaderPtr reader) { xmlChar *nodeValue = xmlTextReaderReadEntireNodeValue(reader); BOOL *value = malloc(sizeof(BOOL)); *value = (xmlStrcmp(BAD_CAST "true", nodeValue) == 0) ? YES : NO; free(nodeValue); return value; } /** * Write a boolean value to the writer. * * @param writer The writer. * @param value The value to be written. * @return the bytes written (may be 0 because of buffering) or -1 in case of error. */ static int xmlTextWriterWriteBooleanType(xmlTextWriterPtr writer, BOOL *value) { if (*value) { return xmlTextWriterWriteString(writer, BAD_CAST "false"); } else { return xmlTextWriterWriteString(writer, BAD_CAST "true"); } } /*******************byte************************************/ /** * Read a byte value from the reader. * * @param reader The reader (pointing at a node with a value). * @return the byte. */ static unsigned char *xmlTextReaderReadByteType(xmlTextReaderPtr reader) { xmlChar *nodeValue = xmlTextReaderReadEntireNodeValue(reader); unsigned char *value = malloc(sizeof(unsigned char)); *value = (unsigned char) atoi((char *) nodeValue); free(nodeValue); return value; } /** * Write a byte value to the writer. * * @param writer The writer. * @param value The value to be written. * @return the bytes written (may be 0 because of buffering) or -1 in case of error. */ static int xmlTextWriterWriteByteType(xmlTextWriterPtr writer, unsigned char *value) { return xmlTextWriterWriteFormatString(writer, "%i", *value); } /*******************double************************************/ /** * Read a double value from the reader. * * @param reader The reader (pointing at a node with a value). * @return the double. */ static double *xmlTextReaderReadDoubleType(xmlTextReaderPtr reader) { xmlChar *nodeValue = xmlTextReaderReadEntireNodeValue(reader); double *value = malloc(sizeof(double)); *value = atof((char *) nodeValue); free(nodeValue); return value; } /** * Write a double value to the writer. * * @param writer The writer. * @param value The value to be written. * @return the bytes written (may be 0 because of buffering) or -1 in case of error. */ static int xmlTextWriterWriteDoubleType(xmlTextWriterPtr writer, double *value) { return xmlTextWriterWriteFormatString(writer, "%f", *value); } /*******************float************************************/ /** * Read a float value from the reader. * * @param reader The reader (pointing at a node with a value). * @return the float. */ static float *xmlTextReaderReadFloatType(xmlTextReaderPtr reader) { xmlChar *nodeValue = xmlTextReaderReadEntireNodeValue(reader); float *value = malloc(sizeof(float)); *value = atof((char *)nodeValue); free(nodeValue); return value; } /** * Write a float value to the writer. * * @param writer The writer. * @param value The value to be written. * @return the bytes written (may be 0 because of buffering) or -1 in case of error. */ static int xmlTextWriterWriteFloatType(xmlTextWriterPtr writer, float *value) { return xmlTextWriterWriteFormatString(writer, "%f", *value); } /*******************int************************************/ /** * Read a int value from the reader. * * @param reader The reader (pointing at a node with a value). * @param value The value to be written. * @return the int. */ static int *xmlTextReaderReadIntType(xmlTextReaderPtr reader) { xmlChar *nodeValue = xmlTextReaderReadEntireNodeValue(reader); int *value = malloc(sizeof(int)); *value = atoi((char *)nodeValue); free(nodeValue); return value; } /** * Write a int value to the writer. * * @param writer The writer. * @param value The value to be written. * @return the bytes written (may be 0 because of buffering) or -1 in case of error. */ static int xmlTextWriterWriteIntType(xmlTextWriterPtr writer, int *value) { return xmlTextWriterWriteFormatString(writer, "%i", *value); } /*******************long************************************/ /** * Read a long value from the reader. * * @param reader The reader (pointing at a node with a value). * @return the long. */ static long *xmlTextReaderReadLongType(xmlTextReaderPtr reader) { xmlChar *nodeValue = xmlTextReaderReadEntireNodeValue(reader); long *value = malloc(sizeof(long)); *value = atol((char *)nodeValue); free(nodeValue); return value; } /** * Write a long value to the writer. * * @param writer The writer. * @param value The value to be written. * @return the bytes written (may be 0 because of buffering) or -1 in case of error. */ static int xmlTextWriterWriteLongType(xmlTextWriterPtr writer, long *value) { return xmlTextWriterWriteFormatString(writer, "%ld", *value); } /*******************short************************************/ /** * Read a short value from the reader. * * @param reader The reader (pointing at a node with a value). * @return the short. */ static short *xmlTextReaderReadShortType(xmlTextReaderPtr reader) { xmlChar *nodeValue = xmlTextReaderReadEntireNodeValue(reader); short *value = malloc(sizeof(short)); *value = atoi((char *)nodeValue); free(nodeValue); return value; } /** * Write a short value to the writer. * * @param writer The writer. * @param value The value to be written. * @return the bytes written (may be 0 because of buffering) or -1 in case of error. */ static int xmlTextWriterWriteShortType(xmlTextWriterPtr writer, short *value) { return xmlTextWriterWriteFormatString(writer, "%hi", *value); } /*******************char************************************/ /** * Read a character value from the reader. * * @param reader The reader (pointing at a node with a value). * @return the character. */ static xmlChar *xmlTextReaderReadCharacterType(xmlTextReaderPtr reader) { return xmlTextReaderReadEntireNodeValue(reader); } /** * Write a character value to the writer. * * @param writer The writer. * @param value The value to be written. * @return the bytes written (may be 0 because of buffering) or -1 in case of error. */ static int xmlTextWriterWriteCharacterType(xmlTextWriterPtr writer, xmlChar *value) { return xmlTextWriterWriteString(writer, value); } #endif /* ENUNCIATE_XML_OBJC_PRIMITIVE_FUNCTIONS */ #ifndef DEF_LEGATOAWSNS2InstanceHistory_M #define DEF_LEGATOAWSNS2InstanceHistory_M /** * (no documentation provided) */ @implementation LEGATOAWSNS2InstanceHistory /** * (no documentation provided) */ - (int *) id { return _id; } /** * (no documentation provided) */ - (void) setId: (int *) newId { if (_id != NULL) { free(_id); } _id = newId; } /** * (no documentation provided) */ - (NSDate *) startDate { return _startDate; } /** * (no documentation provided) */ - (void) setStartDate: (NSDate *) newStartDate { [newStartDate retain]; [_startDate release]; _startDate = newStartDate; } /** * (no documentation provided) */ - (NSDate *) endDate { return _endDate; } /** * (no documentation provided) */ - (void) setEndDate: (NSDate *) newEndDate { [newEndDate retain]; [_endDate release]; _endDate = newEndDate; } /** * (no documentation provided) */ - (NSString *) instanceId { return _instanceId; } /** * (no documentation provided) */ - (void) setInstanceId: (NSString *) newInstanceId { [newInstanceId retain]; [_instanceId release]; _instanceId = newInstanceId; } /** * (no documentation provided) */ - (int *) running { return _running; } /** * (no documentation provided) */ - (void) setRunning: (int *) newRunning { if (_running != NULL) { free(_running); } _running = newRunning; } /** * (no documentation provided) */ - (int *) totalHours { return _totalHours; } /** * (no documentation provided) */ - (void) setTotalHours: (int *) newTotalHours { if (_totalHours != NULL) { free(_totalHours); } _totalHours = newTotalHours; } /** * (no documentation provided) */ - (NSString *) tag { return _tag; } /** * (no documentation provided) */ - (void) setTag: (NSString *) newTag { [newTag retain]; [_tag release]; _tag = newTag; } /** * (no documentation provided) */ - (int *) totalDays { return _totalDays; } /** * (no documentation provided) */ - (void) setTotalDays: (int *) newTotalDays { if (_totalDays != NULL) { free(_totalDays); } _totalDays = newTotalDays; } - (void) dealloc { [self setId: NULL]; [self setStartDate: nil]; [self setEndDate: nil]; [self setInstanceId: nil]; [self setRunning: NULL]; [self setTotalHours: NULL]; [self setTag: nil]; [self setTotalDays: NULL]; [super dealloc]; } @end /* implementation LEGATOAWSNS2InstanceHistory */ /** * Internal, private interface for JAXB reading and writing. */ @interface LEGATOAWSNS2InstanceHistory (JAXB) @end /*interface LEGATOAWSNS2InstanceHistory (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation LEGATOAWSNS2InstanceHistory (JAXB) /** * Read an instance of LEGATOAWSNS2InstanceHistory from an XML reader. * * @param reader The reader. * @return An instance of LEGATOAWSNS2InstanceHistory defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { LEGATOAWSNS2InstanceHistory *_lEGATOAWSNS2InstanceHistory = [[LEGATOAWSNS2InstanceHistory alloc] init]; NS_DURING { [_lEGATOAWSNS2InstanceHistory initWithReader: reader]; } NS_HANDLER { [_lEGATOAWSNS2InstanceHistory dealloc]; _lEGATOAWSNS2InstanceHistory = nil; [localException raise]; } NS_ENDHANDLER [_lEGATOAWSNS2InstanceHistory autorelease]; return _lEGATOAWSNS2InstanceHistory; } /** * Initialize this instance of LEGATOAWSNS2InstanceHistory 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 LEGATOAWSNS2InstanceHistory to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "id", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { _child_accessor = xmlTextReaderReadIntType(reader); if (_child_accessor == NULL) { //panic: unable to return the value for some reason. [self dealloc]; [NSException raise: @"XMLReadError" format: @"Error reading element value."]; } [self setId: ((int*) _child_accessor)]; return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "startDate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}startDate of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif __child = [NSDate readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}startDate of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif [self setStartDate: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "endDate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}endDate of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif __child = [NSDate readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}endDate of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif [self setEndDate: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "instanceId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}instanceId of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}instanceId of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setInstanceId: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "running", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { _child_accessor = xmlTextReaderReadIntType(reader); if (_child_accessor == NULL) { //panic: unable to return the value for some reason. [self dealloc]; [NSException raise: @"XMLReadError" format: @"Error reading element value."]; } [self setRunning: ((int*) _child_accessor)]; return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "totalHours", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { _child_accessor = xmlTextReaderReadIntType(reader); if (_child_accessor == NULL) { //panic: unable to return the value for some reason. [self dealloc]; [NSException raise: @"XMLReadError" format: @"Error reading element value."]; } [self setTotalHours: ((int*) _child_accessor)]; return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "tag", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}tag of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}tag of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setTag: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "totalDays", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { _child_accessor = xmlTextReaderReadIntType(reader); if (_child_accessor == NULL) { //panic: unable to return the value for some reason. [self dealloc]; [NSException raise: @"XMLReadError" format: @"Error reading element value."]; } [self setTotalDays: ((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 id] != 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 id]); #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}id..."); #endif if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing child element {}id."]; } status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}id."]; } } if ([self startDate]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "startDate", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}startDate."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}startDate..."); #endif [[self startDate] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}startDate..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}startDate."]; } } if ([self endDate]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "endDate", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}endDate."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}endDate..."); #endif [[self endDate] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}endDate..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}endDate."]; } } if ([self instanceId]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "instanceId", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}instanceId."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}instanceId..."); #endif [[self instanceId] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}instanceId..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}instanceId."]; } } if ([self running] != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "running", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}running."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}running..."); #endif status = xmlTextWriterWriteIntType(writer, [self running]); #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}running..."); #endif if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing child element {}running."]; } status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}running."]; } } if ([self totalHours] != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "totalHours", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}totalHours."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}totalHours..."); #endif status = xmlTextWriterWriteIntType(writer, [self totalHours]); #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}totalHours..."); #endif if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing child element {}totalHours."]; } status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}totalHours."]; } } if ([self tag]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "tag", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}tag."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}tag..."); #endif [[self tag] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}tag..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}tag."]; } } if ([self totalDays] != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "totalDays", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}totalDays."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}totalDays..."); #endif status = xmlTextWriterWriteIntType(writer, [self totalDays]); #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}totalDays..."); #endif if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing child element {}totalDays."]; } status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}totalDays."]; } } } @end /* implementation LEGATOAWSNS2InstanceHistory (JAXB) */ #endif /* DEF_LEGATOAWSNS2InstanceHistory_M */ #ifndef DEF_LEGATOAWSNS2Results_M #define DEF_LEGATOAWSNS2Results_M /** * (no documentation provided) */ @implementation LEGATOAWSNS2Results /** * (no documentation provided) */ - (NSArray *) data { return _data; } /** * (no documentation provided) */ - (void) setData: (NSArray *) newData { [newData retain]; [_data release]; _data = newData; } /** * (no documentation provided) */ - (BOOL) success { return _success; } /** * (no documentation provided) */ - (void) setSuccess: (BOOL) newSuccess { _success = newSuccess; } /** * (no documentation provided) */ - (NSString *) message { return _message; } /** * (no documentation provided) */ - (void) setMessage: (NSString *) newMessage { [newMessage retain]; [_message release]; _message = newMessage; } - (void) dealloc { [self setData: nil]; [self setMessage: nil]; [super dealloc]; } @end /* implementation LEGATOAWSNS2Results */ /** * Internal, private interface for JAXB reading and writing. */ @interface LEGATOAWSNS2Results (JAXB) @end /*interface LEGATOAWSNS2Results (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation LEGATOAWSNS2Results (JAXB) /** * Read an instance of LEGATOAWSNS2Results from an XML reader. * * @param reader The reader. * @return An instance of LEGATOAWSNS2Results defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { LEGATOAWSNS2Results *_lEGATOAWSNS2Results = [[LEGATOAWSNS2Results alloc] init]; NS_DURING { [_lEGATOAWSNS2Results initWithReader: reader]; } NS_HANDLER { [_lEGATOAWSNS2Results dealloc]; _lEGATOAWSNS2Results = nil; [localException raise]; } NS_ENDHANDLER [_lEGATOAWSNS2Results autorelease]; return _lEGATOAWSNS2Results; } /** * Initialize this instance of LEGATOAWSNS2Results 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 LEGATOAWSNS2Results 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 "data", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}data of type {http://api.ifyouwannabecool.com}event."); #endif __child = [LEGATOAWSNS2Event readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}data of type {http://api.ifyouwannabecool.com}event."); #endif if ([self data]) { [self setData: [[self data] arrayByAddingObject: __child]]; } else { [self setData: [NSArray arrayWithObject: __child]]; } return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "success", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { _child_accessor = xmlTextReaderReadBooleanType(reader); if (_child_accessor == NULL) { //panic: unable to return the value for some reason. [self dealloc]; [NSException raise: @"XMLReadError" format: @"Error reading element value."]; } [self setSuccess: *((BOOL*) _child_accessor)]; free(_child_accessor); 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 [self setMessage: __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 data]) { __enumerator = [[self data] objectEnumerator]; while ( (__item = [__enumerator nextObject]) ) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "data", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}data."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}data..."); #endif [__item writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}data..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}data."]; } } //end item iterator. } if (YES) { //always write the primitive element... status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "success", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}success."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}success..."); #endif status = xmlTextWriterWriteBooleanType(writer, &_success); #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}success..."); #endif if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing child element {}success."]; } status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}success."]; } } if ([self message]) { 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 [[self message] 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 /* implementation LEGATOAWSNS2Results (JAXB) */ #endif /* DEF_LEGATOAWSNS2Results_M */ #ifndef DEF_LEGATOAWSNS2Result_M #define DEF_LEGATOAWSNS2Result_M /** * (no documentation provided) */ @implementation LEGATOAWSNS2Result /** * (no documentation provided) */ - (LEGATOAWSNS2Event *) data { return _data; } /** * (no documentation provided) */ - (void) setData: (LEGATOAWSNS2Event *) newData { [newData retain]; [_data release]; _data = newData; } /** * (no documentation provided) */ - (BOOL) success { return _success; } /** * (no documentation provided) */ - (void) setSuccess: (BOOL) newSuccess { _success = newSuccess; } /** * (no documentation provided) */ - (NSString *) message { return _message; } /** * (no documentation provided) */ - (void) setMessage: (NSString *) newMessage { [newMessage retain]; [_message release]; _message = newMessage; } /** * (no documentation provided) */ - (int) id { return _id; } /** * (no documentation provided) */ - (void) setId: (int) newId { _id = newId; } - (void) dealloc { [self setData: nil]; [self setMessage: nil]; [super dealloc]; } @end /* implementation LEGATOAWSNS2Result */ /** * Internal, private interface for JAXB reading and writing. */ @interface LEGATOAWSNS2Result (JAXB) @end /*interface LEGATOAWSNS2Result (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation LEGATOAWSNS2Result (JAXB) /** * Read an instance of LEGATOAWSNS2Result from an XML reader. * * @param reader The reader. * @return An instance of LEGATOAWSNS2Result defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { LEGATOAWSNS2Result *_lEGATOAWSNS2Result = [[LEGATOAWSNS2Result alloc] init]; NS_DURING { [_lEGATOAWSNS2Result initWithReader: reader]; } NS_HANDLER { [_lEGATOAWSNS2Result dealloc]; _lEGATOAWSNS2Result = nil; [localException raise]; } NS_ENDHANDLER [_lEGATOAWSNS2Result autorelease]; return _lEGATOAWSNS2Result; } /** * Initialize this instance of LEGATOAWSNS2Result 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 LEGATOAWSNS2Result 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 "data", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}data of type {http://api.ifyouwannabecool.com}event."); #endif __child = [LEGATOAWSNS2Event readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}data of type {http://api.ifyouwannabecool.com}event."); #endif [self setData: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "success", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { _child_accessor = xmlTextReaderReadBooleanType(reader); if (_child_accessor == NULL) { //panic: unable to return the value for some reason. [self dealloc]; [NSException raise: @"XMLReadError" format: @"Error reading element value."]; } [self setSuccess: *((BOOL*) _child_accessor)]; free(_child_accessor); 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 [self setMessage: __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. [self dealloc]; [NSException raise: @"XMLReadError" format: @"Error reading element value."]; } [self setId: *((int*) _child_accessor)]; free(_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 data]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "data", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}data."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}data..."); #endif [[self data] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}data..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}data."]; } } if (YES) { //always write the primitive element... status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "success", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}success."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}success..."); #endif status = xmlTextWriterWriteBooleanType(writer, &_success); #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}success..."); #endif if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing child element {}success."]; } status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}success."]; } } if ([self message]) { 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 [[self message] 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."]; } } if (YES) { //always write the primitive element... status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "id", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}id."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}id..."); #endif status = xmlTextWriterWriteIntType(writer, &_id); #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 LEGATOAWSNS2Result (JAXB) */ #endif /* DEF_LEGATOAWSNS2Result_M */ #ifndef DEF_LEGATOAWSNS2Instance_M #define DEF_LEGATOAWSNS2Instance_M /** * (no documentation provided) */ @implementation LEGATOAWSNS2Instance /** * (no documentation provided) */ - (NSString *) tags { return _tags; } /** * (no documentation provided) */ - (void) setTags: (NSString *) newTags { [newTags retain]; [_tags release]; _tags = newTags; } /** * (no documentation provided) */ - (NSString *) instanceId { return _instanceId; } /** * (no documentation provided) */ - (void) setInstanceId: (NSString *) newInstanceId { [newInstanceId retain]; [_instanceId release]; _instanceId = newInstanceId; } /** * (no documentation provided) */ - (NSString *) imageId { return _imageId; } /** * (no documentation provided) */ - (void) setImageId: (NSString *) newImageId { [newImageId retain]; [_imageId release]; _imageId = newImageId; } /** * (no documentation provided) */ - (NSString *) state { return _state; } /** * (no documentation provided) */ - (void) setState: (NSString *) newState { [newState retain]; [_state release]; _state = newState; } /** * (no documentation provided) */ - (NSString *) privateDnsName { return _privateDnsName; } /** * (no documentation provided) */ - (void) setPrivateDnsName: (NSString *) newPrivateDnsName { [newPrivateDnsName retain]; [_privateDnsName release]; _privateDnsName = newPrivateDnsName; } /** * (no documentation provided) */ - (NSString *) publicDnsName { return _publicDnsName; } /** * (no documentation provided) */ - (void) setPublicDnsName: (NSString *) newPublicDnsName { [newPublicDnsName retain]; [_publicDnsName release]; _publicDnsName = newPublicDnsName; } /** * (no documentation provided) */ - (NSString *) stateTransitionReason { return _stateTransitionReason; } /** * (no documentation provided) */ - (void) setStateTransitionReason: (NSString *) newStateTransitionReason { [newStateTransitionReason retain]; [_stateTransitionReason release]; _stateTransitionReason = newStateTransitionReason; } /** * (no documentation provided) */ - (NSString *) keyName { return _keyName; } /** * (no documentation provided) */ - (void) setKeyName: (NSString *) newKeyName { [newKeyName retain]; [_keyName release]; _keyName = newKeyName; } /** * (no documentation provided) */ - (int *) amiLaunchIndex { return _amiLaunchIndex; } /** * (no documentation provided) */ - (void) setAmiLaunchIndex: (int *) newAmiLaunchIndex { if (_amiLaunchIndex != NULL) { free(_amiLaunchIndex); } _amiLaunchIndex = newAmiLaunchIndex; } /** * (no documentation provided) */ - (NSString *) instanceType { return _instanceType; } /** * (no documentation provided) */ - (void) setInstanceType: (NSString *) newInstanceType { [newInstanceType retain]; [_instanceType release]; _instanceType = newInstanceType; } /** * (no documentation provided) */ - (NSDate *) launchTime { return _launchTime; } /** * (no documentation provided) */ - (void) setLaunchTime: (NSDate *) newLaunchTime { [newLaunchTime retain]; [_launchTime release]; _launchTime = newLaunchTime; } /** * (no documentation provided) */ - (NSString *) kernelId { return _kernelId; } /** * (no documentation provided) */ - (void) setKernelId: (NSString *) newKernelId { [newKernelId retain]; [_kernelId release]; _kernelId = newKernelId; } /** * (no documentation provided) */ - (NSString *) ramdiskId { return _ramdiskId; } /** * (no documentation provided) */ - (void) setRamdiskId: (NSString *) newRamdiskId { [newRamdiskId retain]; [_ramdiskId release]; _ramdiskId = newRamdiskId; } /** * (no documentation provided) */ - (NSString *) platform { return _platform; } /** * (no documentation provided) */ - (void) setPlatform: (NSString *) newPlatform { [newPlatform retain]; [_platform release]; _platform = newPlatform; } /** * (no documentation provided) */ - (NSString *) subnetId { return _subnetId; } /** * (no documentation provided) */ - (void) setSubnetId: (NSString *) newSubnetId { [newSubnetId retain]; [_subnetId release]; _subnetId = newSubnetId; } /** * (no documentation provided) */ - (NSString *) vpcId { return _vpcId; } /** * (no documentation provided) */ - (void) setVpcId: (NSString *) newVpcId { [newVpcId retain]; [_vpcId release]; _vpcId = newVpcId; } /** * (no documentation provided) */ - (NSString *) privateIpAddress { return _privateIpAddress; } /** * (no documentation provided) */ - (void) setPrivateIpAddress: (NSString *) newPrivateIpAddress { [newPrivateIpAddress retain]; [_privateIpAddress release]; _privateIpAddress = newPrivateIpAddress; } /** * (no documentation provided) */ - (NSString *) publicIpAddress { return _publicIpAddress; } /** * (no documentation provided) */ - (void) setPublicIpAddress: (NSString *) newPublicIpAddress { [newPublicIpAddress retain]; [_publicIpAddress release]; _publicIpAddress = newPublicIpAddress; } /** * (no documentation provided) */ - (NSString *) architecture { return _architecture; } /** * (no documentation provided) */ - (void) setArchitecture: (NSString *) newArchitecture { [newArchitecture retain]; [_architecture release]; _architecture = newArchitecture; } /** * (no documentation provided) */ - (NSString *) rootDeviceType { return _rootDeviceType; } /** * (no documentation provided) */ - (void) setRootDeviceType: (NSString *) newRootDeviceType { [newRootDeviceType retain]; [_rootDeviceType release]; _rootDeviceType = newRootDeviceType; } /** * (no documentation provided) */ - (NSString *) rootDeviceName { return _rootDeviceName; } /** * (no documentation provided) */ - (void) setRootDeviceName: (NSString *) newRootDeviceName { [newRootDeviceName retain]; [_rootDeviceName release]; _rootDeviceName = newRootDeviceName; } /** * (no documentation provided) */ - (NSString *) virtualizationType { return _virtualizationType; } /** * (no documentation provided) */ - (void) setVirtualizationType: (NSString *) newVirtualizationType { [newVirtualizationType retain]; [_virtualizationType release]; _virtualizationType = newVirtualizationType; } /** * (no documentation provided) */ - (NSString *) instanceLifecycle { return _instanceLifecycle; } /** * (no documentation provided) */ - (void) setInstanceLifecycle: (NSString *) newInstanceLifecycle { [newInstanceLifecycle retain]; [_instanceLifecycle release]; _instanceLifecycle = newInstanceLifecycle; } /** * (no documentation provided) */ - (NSString *) spotInstanceRequestId { return _spotInstanceRequestId; } /** * (no documentation provided) */ - (void) setSpotInstanceRequestId: (NSString *) newSpotInstanceRequestId { [newSpotInstanceRequestId retain]; [_spotInstanceRequestId release]; _spotInstanceRequestId = newSpotInstanceRequestId; } /** * (no documentation provided) */ - (NSString *) clientToken { return _clientToken; } /** * (no documentation provided) */ - (void) setClientToken: (NSString *) newClientToken { [newClientToken retain]; [_clientToken release]; _clientToken = newClientToken; } - (void) dealloc { [self setTags: nil]; [self setInstanceId: nil]; [self setImageId: nil]; [self setState: nil]; [self setPrivateDnsName: nil]; [self setPublicDnsName: nil]; [self setStateTransitionReason: nil]; [self setKeyName: nil]; [self setAmiLaunchIndex: NULL]; [self setInstanceType: nil]; [self setLaunchTime: nil]; [self setKernelId: nil]; [self setRamdiskId: nil]; [self setPlatform: nil]; [self setSubnetId: nil]; [self setVpcId: nil]; [self setPrivateIpAddress: nil]; [self setPublicIpAddress: nil]; [self setArchitecture: nil]; [self setRootDeviceType: nil]; [self setRootDeviceName: nil]; [self setVirtualizationType: nil]; [self setInstanceLifecycle: nil]; [self setSpotInstanceRequestId: nil]; [self setClientToken: nil]; [super dealloc]; } @end /* implementation LEGATOAWSNS2Instance */ /** * Internal, private interface for JAXB reading and writing. */ @interface LEGATOAWSNS2Instance (JAXB) @end /*interface LEGATOAWSNS2Instance (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation LEGATOAWSNS2Instance (JAXB) /** * Read an instance of LEGATOAWSNS2Instance from an XML reader. * * @param reader The reader. * @return An instance of LEGATOAWSNS2Instance defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { LEGATOAWSNS2Instance *_lEGATOAWSNS2Instance = [[LEGATOAWSNS2Instance alloc] init]; NS_DURING { [_lEGATOAWSNS2Instance initWithReader: reader]; } NS_HANDLER { [_lEGATOAWSNS2Instance dealloc]; _lEGATOAWSNS2Instance = nil; [localException raise]; } NS_ENDHANDLER [_lEGATOAWSNS2Instance autorelease]; return _lEGATOAWSNS2Instance; } /** * Initialize this instance of LEGATOAWSNS2Instance 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 LEGATOAWSNS2Instance 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 "tags", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}tags of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}tags of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setTags: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "instanceId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}instanceId of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}instanceId of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setInstanceId: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "imageId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}imageId of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}imageId of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setImageId: __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 "privateDnsName", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}privateDnsName of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}privateDnsName of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setPrivateDnsName: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "publicDnsName", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}publicDnsName of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}publicDnsName of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setPublicDnsName: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "stateTransitionReason", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}stateTransitionReason of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}stateTransitionReason of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setStateTransitionReason: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "keyName", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}keyName of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}keyName of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setKeyName: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "amiLaunchIndex", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { _child_accessor = xmlTextReaderReadIntType(reader); if (_child_accessor == NULL) { //panic: unable to return the value for some reason. [self dealloc]; [NSException raise: @"XMLReadError" format: @"Error reading element value."]; } [self setAmiLaunchIndex: ((int*) _child_accessor)]; return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "instanceType", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}instanceType of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}instanceType of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setInstanceType: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "launchTime", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}launchTime of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif __child = [NSDate readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}launchTime of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif [self setLaunchTime: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "kernelId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}kernelId of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}kernelId of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setKernelId: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "ramdiskId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}ramdiskId of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}ramdiskId of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setRamdiskId: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "platform", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}platform of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}platform of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setPlatform: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "subnetId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}subnetId of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}subnetId of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setSubnetId: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "vpcId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}vpcId of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}vpcId of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setVpcId: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "privateIpAddress", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}privateIpAddress of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}privateIpAddress of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setPrivateIpAddress: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "publicIpAddress", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}publicIpAddress of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}publicIpAddress of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setPublicIpAddress: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "architecture", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}architecture of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}architecture of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setArchitecture: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "rootDeviceType", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}rootDeviceType of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}rootDeviceType of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setRootDeviceType: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "rootDeviceName", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}rootDeviceName of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}rootDeviceName of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setRootDeviceName: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "virtualizationType", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}virtualizationType of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}virtualizationType of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setVirtualizationType: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "instanceLifecycle", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}instanceLifecycle of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}instanceLifecycle of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setInstanceLifecycle: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "spotInstanceRequestId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}spotInstanceRequestId of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}spotInstanceRequestId of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setSpotInstanceRequestId: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "clientToken", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}clientToken of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}clientToken of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setClientToken: __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 tags]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "tags", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}tags."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}tags..."); #endif [[self tags] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}tags..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}tags."]; } } if ([self instanceId]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "instanceId", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}instanceId."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}instanceId..."); #endif [[self instanceId] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}instanceId..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}instanceId."]; } } if ([self imageId]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "imageId", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}imageId."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}imageId..."); #endif [[self imageId] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}imageId..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}imageId."]; } } 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 privateDnsName]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "privateDnsName", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}privateDnsName."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}privateDnsName..."); #endif [[self privateDnsName] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}privateDnsName..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}privateDnsName."]; } } if ([self publicDnsName]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "publicDnsName", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}publicDnsName."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}publicDnsName..."); #endif [[self publicDnsName] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}publicDnsName..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}publicDnsName."]; } } if ([self stateTransitionReason]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "stateTransitionReason", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}stateTransitionReason."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}stateTransitionReason..."); #endif [[self stateTransitionReason] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}stateTransitionReason..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}stateTransitionReason."]; } } if ([self keyName]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "keyName", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}keyName."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}keyName..."); #endif [[self keyName] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}keyName..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}keyName."]; } } if ([self amiLaunchIndex] != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "amiLaunchIndex", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}amiLaunchIndex."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}amiLaunchIndex..."); #endif status = xmlTextWriterWriteIntType(writer, [self amiLaunchIndex]); #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}amiLaunchIndex..."); #endif if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing child element {}amiLaunchIndex."]; } status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}amiLaunchIndex."]; } } if ([self instanceType]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "instanceType", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}instanceType."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}instanceType..."); #endif [[self instanceType] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}instanceType..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}instanceType."]; } } if ([self launchTime]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "launchTime", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}launchTime."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}launchTime..."); #endif [[self launchTime] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}launchTime..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}launchTime."]; } } if ([self kernelId]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "kernelId", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}kernelId."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}kernelId..."); #endif [[self kernelId] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}kernelId..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}kernelId."]; } } if ([self ramdiskId]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ramdiskId", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}ramdiskId."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}ramdiskId..."); #endif [[self ramdiskId] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}ramdiskId..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}ramdiskId."]; } } if ([self platform]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "platform", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}platform."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}platform..."); #endif [[self platform] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}platform..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}platform."]; } } if ([self subnetId]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "subnetId", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}subnetId."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}subnetId..."); #endif [[self subnetId] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}subnetId..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}subnetId."]; } } if ([self vpcId]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "vpcId", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}vpcId."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}vpcId..."); #endif [[self vpcId] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}vpcId..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}vpcId."]; } } if ([self privateIpAddress]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "privateIpAddress", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}privateIpAddress."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}privateIpAddress..."); #endif [[self privateIpAddress] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}privateIpAddress..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}privateIpAddress."]; } } if ([self publicIpAddress]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "publicIpAddress", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}publicIpAddress."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}publicIpAddress..."); #endif [[self publicIpAddress] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}publicIpAddress..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}publicIpAddress."]; } } if ([self architecture]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "architecture", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}architecture."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}architecture..."); #endif [[self architecture] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}architecture..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}architecture."]; } } if ([self rootDeviceType]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "rootDeviceType", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}rootDeviceType."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}rootDeviceType..."); #endif [[self rootDeviceType] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}rootDeviceType..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}rootDeviceType."]; } } if ([self rootDeviceName]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "rootDeviceName", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}rootDeviceName."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}rootDeviceName..."); #endif [[self rootDeviceName] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}rootDeviceName..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}rootDeviceName."]; } } if ([self virtualizationType]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "virtualizationType", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}virtualizationType."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}virtualizationType..."); #endif [[self virtualizationType] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}virtualizationType..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}virtualizationType."]; } } if ([self instanceLifecycle]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "instanceLifecycle", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}instanceLifecycle."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}instanceLifecycle..."); #endif [[self instanceLifecycle] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}instanceLifecycle..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}instanceLifecycle."]; } } if ([self spotInstanceRequestId]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "spotInstanceRequestId", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}spotInstanceRequestId."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}spotInstanceRequestId..."); #endif [[self spotInstanceRequestId] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}spotInstanceRequestId..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}spotInstanceRequestId."]; } } if ([self clientToken]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "clientToken", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}clientToken."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}clientToken..."); #endif [[self clientToken] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}clientToken..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}clientToken."]; } } } @end /* implementation LEGATOAWSNS2Instance (JAXB) */ #endif /* DEF_LEGATOAWSNS2Instance_M */ #ifndef DEF_LEGATOAWSNS2Event_M #define DEF_LEGATOAWSNS2Event_M /** * (no documentation provided) */ @implementation LEGATOAWSNS2Event /** * (no documentation provided) */ - (NSString *) title { return _title; } /** * (no documentation provided) */ - (void) setTitle: (NSString *) newTitle { [newTitle retain]; [_title release]; _title = newTitle; } /** * (no documentation provided) */ - (NSString *) instanceId { return _instanceId; } /** * (no documentation provided) */ - (void) setInstanceId: (NSString *) newInstanceId { [newInstanceId retain]; [_instanceId release]; _instanceId = newInstanceId; } /** * (no documentation provided) */ - (int *) id { return _id; } /** * (no documentation provided) */ - (void) setId: (int *) newId { if (_id != NULL) { free(_id); } _id = newId; } /** * (no documentation provided) */ - (NSDate *) startDate { return _startDate; } /** * (no documentation provided) */ - (void) setStartDate: (NSDate *) newStartDate { [newStartDate retain]; [_startDate release]; _startDate = newStartDate; } /** * (no documentation provided) */ - (NSDate *) endDate { return _endDate; } /** * (no documentation provided) */ - (void) setEndDate: (NSDate *) newEndDate { [newEndDate retain]; [_endDate release]; _endDate = newEndDate; } /** * (no documentation provided) */ - (int *) actionId { return _actionId; } /** * (no documentation provided) */ - (void) setActionId: (int *) newActionId { if (_actionId != NULL) { free(_actionId); } _actionId = newActionId; } /** * (no documentation provided) */ - (int *) calendarId { return _calendarId; } /** * (no documentation provided) */ - (void) setCalendarId: (int *) newCalendarId { if (_calendarId != NULL) { free(_calendarId); } _calendarId = newCalendarId; } /** * (no documentation provided) */ - (NSString *) recurRule { return _recurRule; } /** * (no documentation provided) */ - (void) setRecurRule: (NSString *) newRecurRule { [newRecurRule retain]; [_recurRule release]; _recurRule = newRecurRule; } /** * (no documentation provided) */ - (NSString *) location { return _location; } /** * (no documentation provided) */ - (void) setLocation: (NSString *) newLocation { [newLocation retain]; [_location release]; _location = newLocation; } /** * (no documentation provided) */ - (NSString *) notes { return _notes; } /** * (no documentation provided) */ - (void) setNotes: (NSString *) newNotes { [newNotes retain]; [_notes release]; _notes = newNotes; } /** * (no documentation provided) */ - (NSString *) linkUrl { return _linkUrl; } /** * (no documentation provided) */ - (void) setLinkUrl: (NSString *) newLinkUrl { [newLinkUrl retain]; [_linkUrl release]; _linkUrl = newLinkUrl; } /** * (no documentation provided) */ - (NSString *) reminder { return _reminder; } /** * (no documentation provided) */ - (void) setReminder: (NSString *) newReminder { [newReminder retain]; [_reminder release]; _reminder = newReminder; } /** * (no documentation provided) */ - (BOOL) allDay { return _allDay; } /** * (no documentation provided) */ - (void) setAllDay: (BOOL) newAllDay { _allDay = newAllDay; } - (void) dealloc { [self setTitle: nil]; [self setInstanceId: nil]; [self setId: NULL]; [self setStartDate: nil]; [self setEndDate: nil]; [self setActionId: NULL]; [self setCalendarId: NULL]; [self setRecurRule: nil]; [self setLocation: nil]; [self setNotes: nil]; [self setLinkUrl: nil]; [self setReminder: nil]; [super dealloc]; } @end /* implementation LEGATOAWSNS2Event */ /** * Internal, private interface for JAXB reading and writing. */ @interface LEGATOAWSNS2Event (JAXB) @end /*interface LEGATOAWSNS2Event (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation LEGATOAWSNS2Event (JAXB) /** * Read an instance of LEGATOAWSNS2Event from an XML reader. * * @param reader The reader. * @return An instance of LEGATOAWSNS2Event defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { LEGATOAWSNS2Event *_lEGATOAWSNS2Event = [[LEGATOAWSNS2Event alloc] init]; NS_DURING { [_lEGATOAWSNS2Event initWithReader: reader]; } NS_HANDLER { [_lEGATOAWSNS2Event dealloc]; _lEGATOAWSNS2Event = nil; [localException raise]; } NS_ENDHANDLER [_lEGATOAWSNS2Event autorelease]; return _lEGATOAWSNS2Event; } /** * Initialize this instance of LEGATOAWSNS2Event 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 LEGATOAWSNS2Event 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 "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 "instanceId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}instanceId of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}instanceId of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setInstanceId: __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. [self dealloc]; [NSException raise: @"XMLReadError" format: @"Error reading element value."]; } [self setId: ((int*) _child_accessor)]; return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "startDate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}startDate of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif __child = [NSDate readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}startDate of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif [self setStartDate: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "endDate", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}endDate of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif __child = [NSDate readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}endDate of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif [self setEndDate: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "actionId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { _child_accessor = xmlTextReaderReadIntType(reader); if (_child_accessor == NULL) { //panic: unable to return the value for some reason. [self dealloc]; [NSException raise: @"XMLReadError" format: @"Error reading element value."]; } [self setActionId: ((int*) _child_accessor)]; return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "calendarId", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { _child_accessor = xmlTextReaderReadIntType(reader); if (_child_accessor == NULL) { //panic: unable to return the value for some reason. [self dealloc]; [NSException raise: @"XMLReadError" format: @"Error reading element value."]; } [self setCalendarId: ((int*) _child_accessor)]; return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "recurRule", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}recurRule of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}recurRule of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setRecurRule: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "location", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}location of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}location of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setLocation: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "notes", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}notes of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}notes of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setNotes: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "linkUrl", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}linkUrl of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}linkUrl of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setLinkUrl: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "reminder", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}reminder of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}reminder of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setReminder: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "allDay", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { _child_accessor = xmlTextReaderReadBooleanType(reader); if (_child_accessor == NULL) { //panic: unable to return the value for some reason. [self dealloc]; [NSException raise: @"XMLReadError" format: @"Error reading element value."]; } [self setAllDay: *((BOOL*) _child_accessor)]; free(_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 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 instanceId]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "instanceId", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}instanceId."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}instanceId..."); #endif [[self instanceId] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}instanceId..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}instanceId."]; } } if ([self id] != 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 id]); #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}id..."); #endif if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing child element {}id."]; } status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}id."]; } } if ([self startDate]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "startDate", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}startDate."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}startDate..."); #endif [[self startDate] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}startDate..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}startDate."]; } } if ([self endDate]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "endDate", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}endDate."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}endDate..."); #endif [[self endDate] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}endDate..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}endDate."]; } } if ([self actionId] != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "actionId", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}actionId."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}actionId..."); #endif status = xmlTextWriterWriteIntType(writer, [self actionId]); #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}actionId..."); #endif if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing child element {}actionId."]; } status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}actionId."]; } } if ([self calendarId] != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "calendarId", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}calendarId."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}calendarId..."); #endif status = xmlTextWriterWriteIntType(writer, [self calendarId]); #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}calendarId..."); #endif if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing child element {}calendarId."]; } status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}calendarId."]; } } if ([self recurRule]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "recurRule", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}recurRule."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}recurRule..."); #endif [[self recurRule] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}recurRule..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}recurRule."]; } } if ([self location]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "location", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}location."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}location..."); #endif [[self location] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}location..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}location."]; } } if ([self notes]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "notes", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}notes."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}notes..."); #endif [[self notes] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}notes..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}notes."]; } } if ([self linkUrl]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "linkUrl", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}linkUrl."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}linkUrl..."); #endif [[self linkUrl] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}linkUrl..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}linkUrl."]; } } if ([self reminder]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "reminder", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}reminder."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}reminder..."); #endif [[self reminder] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}reminder..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}reminder."]; } } if (YES) { //always write the primitive element... status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "allDay", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}allDay."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}allDay..."); #endif status = xmlTextWriterWriteBooleanType(writer, &_allDay); #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}allDay..."); #endif if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing child element {}allDay."]; } status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}allDay."]; } } } @end /* implementation LEGATOAWSNS2Event (JAXB) */ #endif /* DEF_LEGATOAWSNS2Event_M */