PageRenderTime 12ms CodeModel.GetById 1ms app.highlight 7ms RepoModel.GetById 0ms app.codeStats 0ms

/examples/KMLParser/bin-release/srcview/source/com/adobe/xml/syndication/rss/RSS10.as.html

http://gmaps-utility-library-flash.googlecode.com/
HTML | 142 lines | 128 code | 13 blank | 1 comment | 0 complexity | 49d49db6d723c077bfc0b2d8d17fa948 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>RSS10.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">rss</span>
 46<span class="ActionScriptBracket/Brace">{</span>
 47    <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">Namespaces</span>;
 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">XmlParser</span>;
 49    <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">ParsingTools</span>;
 50
 51    <span class="ActionScriptASDoc">/**
 52     * Class for parsing RSS 1.0 feeds. Note: the RSS10 class cannot be use
 53     * to parse RSS versions 0.91, 0.92, or 2.0.  Use the RSS20 class for all
 54     * other versions of RSS other than 1.0.
 55     * 
 56     * @langversion ActionScript 3.0
 57     * @playerversion Flash 8.5
 58     * @tiptext
 59     * 
 60     * @see http://web.resource.org/rss/1.0/
 61     */</span>    
 62    <span class="ActionScriptReserved">public</span> <span class="ActionScriptclass">class</span> <span class="ActionScriptDefault_Text">RSS10</span>
 63        <span class="ActionScriptReserved">extends</span> <span class="ActionScriptDefault_Text">XmlParser</span>
 64            <span class="ActionScriptReserved">implements</span> <span class="ActionScriptDefault_Text">IRSS</span>
 65    <span class="ActionScriptBracket/Brace">{</span>
 66        <span class="ActionScriptReserved">private</span> <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">_channel</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Channel10</span>;
 67        <span class="ActionScriptReserved">private</span> <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">_image</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Image10</span>;
 68        <span class="ActionScriptReserved">private</span> <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">_items</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Array</span>;
 69        <span class="ActionScriptReserved">private</span> <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">rss</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Namespace</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">Namespaces</span>.<span class="ActionScriptDefault_Text">RSS_NS</span>;
 70
 71        <span class="ActionScriptASDoc">/**
 72         * Create a new RSS10 instance.
 73         *
 74         * @langversion ActionScript 3.0
 75         * @playerversion Flash 8.5
 76         * @tiptext
 77         */</span>
 78        <span class="ActionScriptReserved">public</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">RSS10</span><span class="ActionScriptBracket/Brace">()</span>
 79        <span class="ActionScriptBracket/Brace">{</span>
 80            <span class="ActionScriptReserved">super</span><span class="ActionScriptBracket/Brace">()</span>;
 81        <span class="ActionScriptBracket/Brace">}</span>
 82
 83        <span class="ActionScriptASDoc">/**
 84         * The Channel10 object associated with this feed.
 85         * 
 86         * @langversion ActionScript 3.0
 87         * @playerversion Flash 8.5
 88         * @tiptext
 89         */</span>
 90        <span class="ActionScriptReserved">public</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptReserved">get</span> <span class="ActionScriptDefault_Text">channel</span><span class="ActionScriptBracket/Brace">()</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">IChannel</span>
 91        <span class="ActionScriptBracket/Brace">{</span>
 92            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptReserved">this</span>.<span class="ActionScriptDefault_Text">_channel</span> <span class="ActionScriptOperator">==</span> <span class="ActionScriptReserved">null</span><span class="ActionScriptBracket/Brace">)</span>
 93            <span class="ActionScriptBracket/Brace">{</span>
 94                <span class="ActionScriptReserved">this</span>.<span class="ActionScriptDefault_Text">_channel</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">Channel10</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptReserved">this</span>.<span class="ActionScriptDefault_Text">x</span>.<span class="ActionScriptDefault_Text">rss</span><span class="ActionScriptOperator">::</span><span class="ActionScriptDefault_Text">channel</span><span class="ActionScriptBracket/Brace">)</span>;
 95            <span class="ActionScriptBracket/Brace">}</span>
 96            <span class="ActionScriptReserved">return</span> <span class="ActionScriptReserved">this</span>.<span class="ActionScriptDefault_Text">_channel</span>;
 97        <span class="ActionScriptBracket/Brace">}</span>
 98
 99        <span class="ActionScriptASDoc">/**
100         * The Image10 object associated with this feed.
101         * 
102         * @langversion ActionScript 3.0
103         * @playerversion Flash 8.5
104         * @tiptext
105         */</span>
106        <span class="ActionScriptReserved">public</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptReserved">get</span> <span class="ActionScriptDefault_Text">image</span><span class="ActionScriptBracket/Brace">()</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">IImage</span>
107        <span class="ActionScriptBracket/Brace">{</span>
108            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptReserved">this</span>.<span class="ActionScriptDefault_Text">_image</span> <span class="ActionScriptOperator">==</span> <span class="ActionScriptReserved">null</span><span class="ActionScriptBracket/Brace">)</span>
109            <span class="ActionScriptBracket/Brace">{</span>
110                <span class="ActionScriptReserved">this</span>.<span class="ActionScriptDefault_Text">_image</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">Image10</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptReserved">this</span>.<span class="ActionScriptDefault_Text">x</span>.<span class="ActionScriptDefault_Text">rss</span><span class="ActionScriptOperator">::</span><span class="ActionScriptDefault_Text">image</span><span class="ActionScriptBracket/Brace">)</span>;
111            <span class="ActionScriptBracket/Brace">}</span>
112            <span class="ActionScriptReserved">return</span> <span class="ActionScriptReserved">this</span>.<span class="ActionScriptDefault_Text">_image</span>;
113        <span class="ActionScriptBracket/Brace">}</span>
114
115        <span class="ActionScriptASDoc">/**
116         * An array of Item10 objects associated with this feed.
117         * 
118         * @langversion ActionScript 3.0
119         * @playerversion Flash 8.5
120         * @tiptext
121         */</span>
122        <span class="ActionScriptReserved">public</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptReserved">get</span> <span class="ActionScriptDefault_Text">items</span><span class="ActionScriptBracket/Brace">()</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Array</span>
123        <span class="ActionScriptBracket/Brace">{</span>
124            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">ParsingTools</span>.<span class="ActionScriptDefault_Text">nullCheck</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptReserved">this</span>.<span class="ActionScriptDefault_Text">x</span>.<span class="ActionScriptDefault_Text">rss</span><span class="ActionScriptOperator">::</span><span class="ActionScriptDefault_Text">item</span><span class="ActionScriptBracket/Brace">)</span> <span class="ActionScriptOperator">==</span> <span class="ActionScriptReserved">null</span><span class="ActionScriptBracket/Brace">)</span>
125            <span class="ActionScriptBracket/Brace">{</span>
126                <span class="ActionScriptReserved">return</span> <span class="ActionScriptReserved">null</span>;
127            <span class="ActionScriptBracket/Brace">}</span>
128
129            <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptReserved">this</span>.<span class="ActionScriptDefault_Text">_items</span> <span class="ActionScriptOperator">==</span> <span class="ActionScriptReserved">null</span><span class="ActionScriptBracket/Brace">)</span>
130            <span class="ActionScriptBracket/Brace">{</span>
131                <span class="ActionScriptReserved">this</span>.<span class="ActionScriptDefault_Text">_items</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">Array</span><span class="ActionScriptBracket/Brace">()</span>;
132                <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">XML</span>;
133                <span class="ActionScriptReserved">for</span> <span class="ActionScriptReserved">each</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">i</span> <span class="ActionScriptReserved">in</span> <span class="ActionScriptReserved">this</span>.<span class="ActionScriptDefault_Text">x</span>.<span class="ActionScriptDefault_Text">rss</span><span class="ActionScriptOperator">::</span><span class="ActionScriptDefault_Text">item</span><span class="ActionScriptBracket/Brace">)</span>
134                <span class="ActionScriptBracket/Brace">{</span>
135                    <span class="ActionScriptReserved">this</span>.<span class="ActionScriptDefault_Text">_items</span>.<span class="ActionScriptDefault_Text">push</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">Item10</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">XMLList</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">)))</span>;
136                <span class="ActionScriptBracket/Brace">}</span>
137            <span class="ActionScriptBracket/Brace">}</span>
138            <span class="ActionScriptReserved">return</span> <span class="ActionScriptReserved">this</span>.<span class="ActionScriptDefault_Text">_items</span>;
139        <span class="ActionScriptBracket/Brace">}</span>
140    <span class="ActionScriptBracket/Brace">}</span>
141<span class="ActionScriptBracket/Brace">}</span></pre></body>
142</html>