| 602 | |
| 603 | |
| 604 | void ExportData::writeResource(Resource r) { |
| 605 | writer->writeStartElement("NoteResource"); |
| 606 | if (r.guid.isSet()) |
| 607 | createNode("Guid", r.guid); |
| 608 | if (r.noteGuid.isSet()) |
| 609 | createNode("NoteGuid", r.noteGuid); |
| 610 | if (r.data.isSet()) |
| 611 | writeData("Data", r.data); |
| 612 | if (r.mime.isSet()) |
| 613 | createNode("Mime", r.mime); |
| 614 | if (r.width.isSet()) |
| 615 | createNode("Width", r.width); |
| 616 | if (r.height.isSet()) |
| 617 | createNode("Height",r.height); |
| 618 | if (r.duration.isSet()) |
| 619 | createNode("Duration", r.duration); |
| 620 | if (r.active.isSet()) |
| 621 | createNode("Active", r.active); |
| 622 | if (r.recognition.isSet()) { |
| 623 | writeData("Recognition", r.recognition); |
| 624 | } |
| 625 | if (r.attributes.isSet()) { |
| 626 | writer->writeStartElement("ResourceAttributes"); |
| 627 | if (r.attributes.value().sourceURL.isSet()) |
| 628 | createNode("SourceUrl", r.attributes.value().sourceURL); |
| 629 | if (r.attributes.value().timestamp.isSet()) |
| 630 | createNode("Timestamp", QString::number(r.attributes.value().timestamp)); |
| 631 | if (r.attributes.value().latitude.isSet()) |
| 632 | createNode("Latitude", r.attributes.value().latitude); |
| 633 | if (r.attributes.value().longitude.isSet()) |
| 634 | createNode("Longitude", r.attributes.value().longitude); |
| 635 | if (r.attributes.value().altitude.isSet()) |
| 636 | createNode("Altitude", r.attributes.value().altitude); |
| 637 | if (r.attributes.value().cameraMake.isSet()) |
| 638 | createNode("CameraMake", r.attributes.value().cameraMake); |
| 639 | if (r.attributes.value().cameraModel.isSet()) |
| 640 | createNode("CameraModel", r.attributes.value().cameraModel); |
| 641 | if (r.attributes.value().recoType.isSet()) |
| 642 | createNode("RecoType", r.attributes.value().recoType); |
| 643 | if (r.attributes.value().fileName.isSet()) |
| 644 | createNode("FileName", r.attributes.value().fileName); |
| 645 | if (r.attributes.value().attachment.isSet()) |
| 646 | createNode("Attachment", r.attributes.value().attachment); |
| 647 | writer->writeEndElement(); |
| 648 | } |
| 649 | if (r.updateSequenceNum.isSet()) |
| 650 | createNode("UpdateSequenceNumber", r.updateSequenceNum); |
| 651 | if (r.alternateData.isSet()) |
| 652 | writeData("AlternateData", r.alternateData); |
| 653 | writer->writeEndElement(); |
| 654 | } |
| 655 | |
| 656 | |
| 657 | void ExportData::createNode(QString nodeName, QString value) { |