PageRenderTime 38ms CodeModel.GetById 23ms RepoModel.GetById 1ms app.codeStats 0ms

/src/com/google/maps/extras/xmlparsers/atom/Author.as

http://gmaps-utility-library-flash.googlecode.com/
ActionScript | 75 lines | 28 code | 9 blank | 38 comment | 0 complexity | 3e43e79dbc485879b0743f17717d6cf9 MD5 | raw file
  1. /*
  2. Copyright (c) 2008, Adobe Systems Incorporated
  3. All rights reserved.
  4. Redistribution and use in source and binary forms, with or without
  5. modification, are permitted provided that the following conditions are
  6. met:
  7. * Redistributions of source code must retain the above copyright notice,
  8. this list of conditions and the following disclaimer.
  9. * Redistributions in binary form must reproduce the above copyright
  10. notice, this list of conditions and the following disclaimer in the
  11. documentation and/or other materials provided with the distribution.
  12. * Neither the name of Adobe Systems Incorporated nor the names of its
  13. contributors may be used to endorse or promote products derived from
  14. this software without specific prior written permission.
  15. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
  16. IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
  17. THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  18. PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  19. CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  20. EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  21. PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  22. PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  23. LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  24. NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  25. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  26. */
  27. package com.google.maps.extras.xmlparsers.atom
  28. {
  29. import com.google.maps.extras.xmlparsers.XmlElement;
  30. import com.google.maps.extras.xmlparsers.XmlParser;
  31. import com.google.maps.extras.xmlparsers.ParsingTools;
  32. import com.google.maps.extras.xmlparsers.Namespaces;
  33. public class Author extends XmlElement {
  34. private var atom:Namespace = Namespaces.ATOM_NS;
  35. private var _name:String;
  36. private var _email:String;
  37. private var _uri:String;
  38. /**
  39. * Class that represents an author element within an Atom feed.
  40. *
  41. * @langversion ActionScript 3.0
  42. * @playerversion Flash 8.5
  43. * @tiptext
  44. *
  45. * @see http://www.atomenabled.org/developers/syndication/atom-format-spec.php#rfc.section.4.2.1
  46. */
  47. public function Author(x:XMLList) {
  48. super(x);
  49. this._name = ParsingTools.nullCheck(this.x.atom::author.@["name"]);
  50. this._email = ParsingTools.nullCheck(this.x.atom::author.email);
  51. this._uri = ParsingTools.nullCheck(this.x.atom::author.uri);
  52. }
  53. public function get name():String {
  54. return this._name;
  55. }
  56. public function get email():String {
  57. return this._email;
  58. }
  59. public function get uri():String {
  60. return this._uri;
  61. }
  62. }
  63. }