/src/com/google/maps/extras/xmlparsers/kml/Data.as
ActionScript | 61 lines | 31 code | 6 blank | 24 comment | 0 complexity | f39c04d44cf4c18b2101ed491966a039 MD5 | raw file
- /*
- * Copyright 2008 Google Inc.
- * Licensed under the Apache License, Version 2.0:
- * http://www.apache.org/licenses/LICENSE-2.0
- */
- package com.google.maps.extras.xmlparsers.kml
- {
- import com.google.maps.extras.xmlparsers.Namespaces;
- import com.google.maps.extras.xmlparsers.ParsingTools;
- import com.google.maps.extras.xmlparsers.XmlElement;
-
- /**
- * Class that represents a <Data> element.
- *
- * @see http://code.google.com/apis/kml/documentation/kmlreference.html#data
- */
- public class Data extends Feature
- {
- private var _name:String;
- private var _displayName:String;
- private var _value:String;
-
- /**
- * Constructor for class.
- *
- * @param x
- */
- public function Data(x:XMLList)
- {
- super(x);
- this._name = ParsingTools.nullCheck(this.x.attribute(new QName(kml, "name")));
- this._displayName = ParsingTools.nullCheck(this.x.kml::displayName);
- this._value = ParsingTools.nullCheck(this.x.kml::value);
- }
-
- /**
- * Represents the <name> child element.
- */
- public override function get name():String {
- return this._name;
- }
-
- /**
- * Represents the <displayName> child element.
- */
- public function get displayName():String {
- return this._displayName;
- }
-
- /**
- * Represents the <value> child element.
- */
- public function get value():String {
- return this._value;
- }
-
- public override function toString():String {
- return "Data: " + " name: " + this._name + ", value: " + this._value;
- }
- }
- }