PageRenderTime 212ms CodeModel.GetById 187ms app.highlight 20ms RepoModel.GetById 1ms app.codeStats 0ms

/examples/KMLParser/bin-release/srcview/source/com/adobe/xml/syndication/generic/RSS20Item.as.html

http://gmaps-utility-library-flash.googlecode.com/
HTML | 201 lines | 182 code | 18 blank | 1 comment | 0 complexity | fa6235aceda222d10a227a7243f0620d MD5 | raw file
  1<!-- saved from url=(0014)about:internet -->
  2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3<html xmlns="http://www.w3.org/1999/xhtml">
  4<head>
  5<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  6<title>RSS20Item.as</title>
  7<link rel="stylesheet" type="text/css" href="../../../../../../SourceStyles.css"/>
  8</head>
  9
 10<body><pre><span class="ActionScriptComment">/*
 11    Adobe Systems Incorporated(r) Source Code License Agreement
 12    Copyright(c) 2005 Adobe Systems Incorporated. All rights reserved.
 13    
 14    Please read this Source Code License Agreement carefully before using
 15    the source code.
 16    
 17    Adobe Systems Incorporated grants to you a perpetual, worldwide, non-exclusive, 
 18    no-charge, royalty-free, irrevocable copyright license, to reproduce,
 19    prepare derivative works of, publicly display, publicly perform, and
 20    distribute this source code and such derivative works in source or 
 21    object code form without any attribution requirements.  
 22    
 23    The name &quot;Adobe Systems Incorporated&quot; must not be used to endorse or promote products
 24    derived from the source code without prior written permission.
 25    
 26    You agree to indemnify, hold harmless and defend Adobe Systems Incorporated from and
 27    against any loss, damage, claims or lawsuits, including attorney&apos;s 
 28    fees that arise or result from your use or distribution of the source 
 29    code.
 30    
 31    THIS SOURCE CODE IS PROVIDED &quot;AS IS&quot; AND &quot;WITH ALL FAULTS&quot;, WITHOUT 
 32    ANY TECHNICAL SUPPORT OR ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING,
 33    BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
 34    FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  ALSO, THERE IS NO WARRANTY OF 
 35    NON-INFRINGEMENT, TITLE OR QUIET ENJOYMENT.  IN NO EVENT SHALL MACROMEDIA
 36    OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 37    EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 
 38    PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
 39    OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
 40    WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 
 41    OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOURCE CODE, EVEN IF
 42    ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 43*/</span>
 44
 45<span class="ActionScriptpackage">package</span> <span class="ActionScriptDefault_Text">com</span>.<span class="ActionScriptDefault_Text">adobe</span>.<span class="ActionScriptDefault_Text">xml</span>.<span class="ActionScriptDefault_Text">syndication</span>.<span class="ActionScriptDefault_Text">generic</span>
 46<span class="ActionScriptBracket/Brace">{</span>
 47
 48    <span class="ActionScriptReserved">import</span> <span class="ActionScriptDefault_Text">com</span>.<span class="ActionScriptDefault_Text">adobe</span>.<span class="ActionScriptDefault_Text">xml</span>.<span class="ActionScriptDefault_Text">syndication</span>.<span class="ActionScriptDefault_Text">rss</span>.<span class="ActionScriptDefault_Text">Item20</span>;
 49
 50    <span class="ActionScriptASDoc">/**
 51     * Class that abstracts out the specific characteristics of an RSS 2.0 item
 52     * into a generic Item. You create an instance using an Item20 object,
 53     * then you can access it in a generic way.
 54     * 
 55     * @langversion ActionScript 3.0
 56     * @playerversion Flash 8.5
 57     * @tiptext
 58     */</span>    
 59    <span class="ActionScriptReserved">public</span> <span class="ActionScriptclass">class</span> <span class="ActionScriptDefault_Text">RSS20Item</span>
 60        <span class="ActionScriptReserved">implements</span> <span class="ActionScriptDefault_Text">IItem</span>
 61    <span class="ActionScriptBracket/Brace">{</span>
 62        <span class="ActionScriptReserved">private</span> <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">item</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Item20</span>;
 63
 64        <span class="ActionScriptASDoc">/**
 65         * Create a new RSS20Item instance.
 66         *
 67         * @param item An Item20 object that you want abstracted.
 68         * 
 69         * @langversion ActionScript 3.0
 70         * @playerversion Flash 8.5
 71         * @tiptext
 72         */</span>
 73        <span class="ActionScriptReserved">public</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">RSS20Item</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">item</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Item20</span><span class="ActionScriptBracket/Brace">)</span>
 74        <span class="ActionScriptBracket/Brace">{</span>
 75            <span class="ActionScriptReserved">this</span>.<span class="ActionScriptDefault_Text">item</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">item</span>;
 76        <span class="ActionScriptBracket/Brace">}</span>
 77
 78        <span class="ActionScriptASDoc">/**
 79          * This item&apos;s title.
 80         * 
 81         * @langversion ActionScript 3.0
 82         * @playerversion Flash 8.5
 83         * @tiptext
 84         */</span>
 85        <span class="ActionScriptReserved">public</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptReserved">get</span> <span class="ActionScriptDefault_Text">title</span><span class="ActionScriptBracket/Brace">()</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">String</span>
 86        <span class="ActionScriptBracket/Brace">{</span>
 87            <span class="ActionScriptReserved">return</span> <span class="ActionScriptReserved">this</span>.<span class="ActionScriptDefault_Text">item</span>.<span class="ActionScriptDefault_Text">title</span>;
 88        <span class="ActionScriptBracket/Brace">}</span>
 89
 90        <span class="ActionScriptASDoc">/**
 91          * This item&apos;s link.
 92         * 
 93         * @langversion ActionScript 3.0
 94         * @playerversion Flash 8.5
 95         * @tiptext
 96         */</span>
 97        <span class="ActionScriptReserved">public</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptReserved">get</span> <span class="ActionScriptDefault_Text">link</span><span class="ActionScriptBracket/Brace">()</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">String</span>
 98        <span class="ActionScriptBracket/Brace">{</span>
 99            <span class="ActionScriptReserved">return</span> <span class="ActionScriptReserved">this</span>.<span class="ActionScriptDefault_Text">item</span>.<span class="ActionScriptDefault_Text">link</span>;
100        <span class="ActionScriptBracket/Brace">}</span>
101
102        <span class="ActionScriptASDoc">/**
103          * This item&apos;s unique ID.
104         * 
105         * @langversion ActionScript 3.0
106         * @playerversion Flash 8.5
107         * @tiptext
108         */</span>
109        <span class="ActionScriptReserved">public</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptReserved">get</span> <span class="ActionScriptDefault_Text">id</span><span class="ActionScriptBracket/Brace">()</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">String</span>
110        <span class="ActionScriptBracket/Brace">{</span>
111            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptReserved">this</span>.<span class="ActionScriptDefault_Text">item</span>.<span class="ActionScriptDefault_Text">guid</span> <span class="ActionScriptOperator">==</span> <span class="ActionScriptReserved">null</span><span class="ActionScriptBracket/Brace">)</span>
112            <span class="ActionScriptBracket/Brace">{</span>
113                <span class="ActionScriptReserved">return</span> <span class="ActionScriptReserved">null</span>;
114            <span class="ActionScriptBracket/Brace">}</span>
115            <span class="ActionScriptReserved">return</span> <span class="ActionScriptReserved">this</span>.<span class="ActionScriptDefault_Text">item</span>.<span class="ActionScriptDefault_Text">guid</span>.<span class="ActionScriptDefault_Text">id</span>;
116        <span class="ActionScriptBracket/Brace">}</span>
117
118        <span class="ActionScriptASDoc">/**
119          * The date this item was published.
120         * 
121         * @langversion ActionScript 3.0
122         * @playerversion Flash 8.5
123         * @tiptext
124         */</span>
125        <span class="ActionScriptReserved">public</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptReserved">get</span> <span class="ActionScriptDefault_Text">date</span><span class="ActionScriptBracket/Brace">()</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Date</span>
126        <span class="ActionScriptBracket/Brace">{</span>
127            <span class="ActionScriptReserved">return</span> <span class="ActionScriptReserved">this</span>.<span class="ActionScriptDefault_Text">item</span>.<span class="ActionScriptDefault_Text">pubDate</span>;
128        <span class="ActionScriptBracket/Brace">}</span>
129
130        <span class="ActionScriptASDoc">/**
131          * One or more authors of this item.
132         * 
133         * @langversion ActionScript 3.0
134         * @playerversion Flash 8.5
135         * @tiptext
136         */</span>
137        <span class="ActionScriptReserved">public</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptReserved">get</span> <span class="ActionScriptDefault_Text">authors</span><span class="ActionScriptBracket/Brace">()</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Array</span>
138        <span class="ActionScriptBracket/Brace">{</span>
139            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptReserved">this</span>.<span class="ActionScriptDefault_Text">item</span>.<span class="ActionScriptDefault_Text">creators</span> <span class="ActionScriptOperator">==</span> <span class="ActionScriptReserved">null</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptReserved">return</span> <span class="ActionScriptReserved">null</span>;
140            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">authors</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Array</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">Array</span><span class="ActionScriptBracket/Brace">()</span>;
141            <span class="ActionScriptReserved">for</span> <span class="ActionScriptReserved">each</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">author</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">String</span> <span class="ActionScriptReserved">in</span> <span class="ActionScriptReserved">this</span>.<span class="ActionScriptDefault_Text">item</span>.<span class="ActionScriptDefault_Text">creators</span><span class="ActionScriptBracket/Brace">)</span>
142            <span class="ActionScriptBracket/Brace">{</span>
143                <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">author</span> <span class="ActionScriptOperator">==</span> <span class="ActionScriptReserved">null</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptReserved">continue</span>;
144                <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">a</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Author</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">Author</span><span class="ActionScriptBracket/Brace">()</span>;
145                <span class="ActionScriptDefault_Text">a</span>.<span class="ActionScriptDefault_Text">name</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">author</span>;
146                <span class="ActionScriptDefault_Text">authors</span>.<span class="ActionScriptDefault_Text">push</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">a</span><span class="ActionScriptBracket/Brace">)</span>;
147            <span class="ActionScriptBracket/Brace">}</span>
148            <span class="ActionScriptReserved">return</span> <span class="ActionScriptDefault_Text">authors</span>;
149        <span class="ActionScriptBracket/Brace">}</span>
150
151        <span class="ActionScriptASDoc">/**
152          * One or more categories of this item.
153         * 
154         * @langversion ActionScript 3.0
155         * @playerversion Flash 8.5
156         * @tiptext
157         */</span>
158        <span class="ActionScriptReserved">public</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptReserved">get</span> <span class="ActionScriptDefault_Text">topics</span><span class="ActionScriptBracket/Brace">()</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Array</span>
159        <span class="ActionScriptBracket/Brace">{</span>
160            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptReserved">this</span>.<span class="ActionScriptDefault_Text">item</span>.<span class="ActionScriptDefault_Text">categories</span> <span class="ActionScriptOperator">==</span> <span class="ActionScriptReserved">null</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptReserved">return</span> <span class="ActionScriptReserved">null</span>;
161            <span class="ActionScriptReserved">return</span> <span class="ActionScriptReserved">this</span>.<span class="ActionScriptDefault_Text">item</span>.<span class="ActionScriptDefault_Text">categories</span>;
162        <span class="ActionScriptBracket/Brace">}</span>
163
164        <span class="ActionScriptASDoc">/**
165          * An excerpt or description of this item.
166         * 
167         * @langversion ActionScript 3.0
168         * @playerversion Flash 8.5
169         * @tiptext
170         */</span>
171        <span class="ActionScriptReserved">public</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptReserved">get</span> <span class="ActionScriptDefault_Text">excerpt</span><span class="ActionScriptBracket/Brace">()</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Excerpt</span>
172        <span class="ActionScriptBracket/Brace">{</span>
173            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">excerpt</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Excerpt</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">Excerpt</span>;
174            <span class="ActionScriptDefault_Text">excerpt</span>.<span class="ActionScriptDefault_Text">src</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">null</span>;
175            <span class="ActionScriptDefault_Text">excerpt</span>.<span class="ActionScriptDefault_Text">type</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptString">&quot;text&quot;</span>;
176            <span class="ActionScriptDefault_Text">excerpt</span>.<span class="ActionScriptDefault_Text">value</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">this</span>.<span class="ActionScriptDefault_Text">item</span>.<span class="ActionScriptDefault_Text">description</span>;
177            <span class="ActionScriptReserved">return</span> <span class="ActionScriptDefault_Text">excerpt</span>;
178        <span class="ActionScriptBracket/Brace">}</span>
179
180        <span class="ActionScriptASDoc">/**
181          * Any media associated with this item.
182         * 
183         * @langversion ActionScript 3.0
184         * @playerversion Flash 8.5
185         * @tiptext
186         */</span>
187        <span class="ActionScriptReserved">public</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptReserved">get</span> <span class="ActionScriptDefault_Text">media</span><span class="ActionScriptBracket/Brace">()</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Media</span>
188        <span class="ActionScriptBracket/Brace">{</span>
189            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptReserved">this</span>.<span class="ActionScriptDefault_Text">item</span>.<span class="ActionScriptDefault_Text">enclosure</span> <span class="ActionScriptOperator">==</span> <span class="ActionScriptReserved">null</span><span class="ActionScriptBracket/Brace">)</span>
190            <span class="ActionScriptBracket/Brace">{</span>
191                <span class="ActionScriptReserved">return</span> <span class="ActionScriptReserved">null</span>;
192            <span class="ActionScriptBracket/Brace">}</span>
193            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">media</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Media</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">Media</span><span class="ActionScriptBracket/Brace">()</span>;
194            <span class="ActionScriptDefault_Text">media</span>.<span class="ActionScriptDefault_Text">url</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">item</span>.<span class="ActionScriptDefault_Text">enclosure</span>.<span class="ActionScriptDefault_Text">url</span>;
195            <span class="ActionScriptDefault_Text">media</span>.<span class="ActionScriptDefault_Text">length</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">item</span>.<span class="ActionScriptDefault_Text">enclosure</span>.<span class="ActionScriptDefault_Text">length</span>;
196            <span class="ActionScriptDefault_Text">media</span>.<span class="ActionScriptDefault_Text">type</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">item</span>.<span class="ActionScriptDefault_Text">enclosure</span>.<span class="ActionScriptDefault_Text">type</span>;
197            <span class="ActionScriptReserved">return</span> <span class="ActionScriptDefault_Text">media</span>;
198        <span class="ActionScriptBracket/Brace">}</span>
199    <span class="ActionScriptBracket/Brace">}</span>
200<span class="ActionScriptBracket/Brace">}</span></pre></body>
201</html>