Logo Search packages:      
Sourcecode: gdata-sharp version File versions  Download package

atomnametable.cs

/* Copyright (c) 2006 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
*/
#region Using directives

#define USE_TRACING

using System;
using System.Xml;
using System.IO; 
#endregion

//////////////////////////////////////////////////////////////////////
// <summary>Contains AtomParserNameTable.</summary> 
//////////////////////////////////////////////////////////////////////
namespace Google.GData.Client
{

    //////////////////////////////////////////////////////////////////////
    /// <summary>AtomParserNameTable. An initialized nametable for faster XML processing
    /// parses:  4  Element Definitions
    ///         4.1  The "atom:feed" Element
    ///         4.1.1  The "version" Attribute
    ///         4.2  The "atom:head" Element
    ///         4.2.1  Usage of "atom:head" within "atom:entry"
    ///         4.3  The "atom:entry" Element
    ///         4.4  The "atom:title" Element
    ///         4.5  The "atom:id" Element
    ///         4.6  The "atom:link" Element
    ///         4.6.1  The "href" Attribute
    ///         4.6.2  The "rel" Attribute
    ///         4.6.3  The "type" Attribute
    ///         4.6.4  The "hreflang" Attribute
    ///         4.6.5  The "title" Attribute
    ///         4.6.6  The "length" Attribute
    ///         4.7  The "atom:updated" Element
    ///         4.8  The "atom:published" Element
    ///         4.9  The "atom:author" Element
    ///         4.10  The "atom:contributor" Element
    ///         4.12  The "atom:copyright" Element
    ///         4.13  The "atom:category" Element
    ///         4.13.1  The "term" Attribute
    ///         4.13.2  The "scheme" Attribute
    ///         4.13.3  The "label" attribute
    ///         4.14  The "atom:summary" Element
    ///         4.15  The "atom:content" Element
    ///         4.15.1  The "type" attribute
    ///         4.15.2  The "src" attribute
    ///         4.15.3  Processing Model
    ///         4.16  The "atom:introspection" Element
    ///         4.17  The "atom:post" Element
    ///         4.18  The "atom:edit" Element
    ///         4.20  The "atom:generator" Element
    ///         the atom:icon element
    ///         the atom:logo element
    ///  </summary>
    //////////////////////////////////////////////////////////////////////
00069     public class AtomParserNameTable : BaseNameTable
    {
        /// <summary>atom:feed</summary> 
00072         private object feed;
        /// <summary>atom:version</summary> 
00074         private object version;
        /// <summary>atom:title</summary> 
00076         private object title;
        /// <summary>atom:id</summary> 
00078         private object id;
        /// <summary>atom:link</summary> 
00080         private object link;
        /// <summary>link attributes: href, rel, type, hreflang, title (use the defined string), length</summary> 
00082         private object href;
        /// <summary>property holder exposed over get/set</summary> 
00084         private object rel;
        /// <summary>property holder exposed over get/set</summary> 
00086         private object hreflang;
        /// <summary>property holder exposed over get/set</summary> 
00088         private object length;

        /// <summary>atom:updated</summary> 
00091         private object updated;
        /// <summary>atom:published</summary> 
00093         private object published;
        /// <summary>atom:author</summary> 
00095         private object author;
        /// <summary>atom:contributor</summary> 
00097         private object contributor;
        /// <summary>atom:rights</summary> 
00099         private object rights;
        /// <summary>atom:category</summary> 
00101         private object category;
        /// <summary>attributes term, scheme, label</summary> 
00103         private object term;
        /// <summary>property holder exposed over get/set</summary> 
00105         private object scheme;
        /// <summary>property holder exposed over get/set</summary> 
00107         private object label;
        /// <summary>atom:summary</summary> 
00109         private object summary;
        /// <summary>atom:content</summary> 
00111         private object content;
        /// <summary>attributes type (use the defined string), src</summary> 
00113         private object src; 

        /// <summary>atom:subtitle</summary> 
00116         private object subTitle; 
        /// <summary>atom:generator</summary> 
00118         private object generator;
        /// <summary>atom:source</summary> 
00120         private object source;

        // <summary>generic atom entry elements/attributes - only additional ones
        //
        //         atomEntry =
        //       element atom:entry {
        //       atomCommonAttributes,
        //       atomVersionAttribute?,
        //       (atomTitle
        //        & atomId
        //        & atomLink*
        //        & atomUpdated
        //        & atomPublished?
        //        & atomAuthor?
        //        & atomContributor*
        //        & atomRights?
        //        & atomCategory*
        //        & atomEdit?
        //        & atomSummary?
        //        & atomContent?
        //        & atomHead?
        //        & anyElement*) }
        //    </summary>

        /// <summary>atom:entry</summary> 
00145         private object entry;

        // 3.2  AtomPerson Constructs
        // 3.2.1  The "atom:name" Element
        // 3.2.2  The "atom:uri" Element
        // 3.2.3  The "atom:email" Element

        /// <summary>property holder exposed over get/set</summary> 
00153         private object uri;
        /// <summary>property holder exposed over get/set</summary> 
00155         private object email;
    
        /// <summary>holds the icon </summary> 
00158         private object icon;
        /// <summary>holds the logo</summary> 
00160         private object logo;

        private object categories; 

        /// <summary>static string for parsing</summary> 
00165         public const string XmlCategoryElement = "category"; 
        /// <summary>static string for parsing</summary> 
00167         public const string XmlContentElement = "content";
        /// <summary>static string for parsing</summary> 
00169         public const string XmlAtomEntryElement = "entry";
        /// <summary>static string for parsing</summary> 
00171         public const string XmlGeneratorElement = "generator";
        /// <summary>static string for parsing</summary> 
00173         public const string XmlIconElement = "icon";
        /// <summary>static string for parsing</summary> 
00175         public const string XmlLogoElement = "logo";
        /// <summary>static string for parsing</summary> 
00177         public const string XmlIdElement = "id"; 
        /// <summary>static string for parsing</summary> 
00179         public const string XmlLinkElement = "link"; 
        /// <summary>static string for parsing</summary>    
00181         public const string XmlFeedElement = "feed";
        /// <summary>static string for parsing</summary>    
00183         public const string XmlAuthorElement = "author";
        /// <summary>static string for parsing</summary>    
00185         public const string XmlContributorElement = "contributor";
        /// <summary>static string for parsing</summary>    
00187         public const string XmlSourceElement = "source";

        /// <summary>static string for parsing</summary>    
00190         public const string XmlRightsElement = "rights";
        /// <summary>static string for parsing</summary>    
00192         public const string XmlSubtitleElement = "subtitle";
        /// <summary>static string for parsing</summary>    
00194         public const string XmlTitleElement = "title";
        /// <summary>static string for parsing</summary>    
00196         public const string XmlSummaryElement = "summary";
        /// <summary>static string for parsing</summary>    
00198         public const string XmlUpdatedElement = "updated";
        
        /// <summary>static string for parsing</summary>    
00201         public const string XmlEmailElement = "email";
        /// <summary>static string for parsing - same for attribute</summary>    
00203         public const string XmlUriElement = "uri";

        /// <summary>static string for parsing - same for attribute</summary>    
00206         public const string XmlPublishedElement = "published";

        // attribute strings

        /// <summary>static string for parsing</summary>    
00211         public const string XmlAttributeTerm = "term";
        /// <summary>static string for parsing</summary>    
00213         public const string XmlAttributeScheme = "scheme";
        /// <summary>static string for parsing</summary>    
00215         public const string XmlAttributeLabel = "label";
        /// <summary>static string for parsing</summary>    
00217         public const string XmlAttributeVersion = "version";
        /// <summary>static string for parsing</summary>    
00219         public const string XmlAttributeLength = "length";
        /// <summary>static string for parsing</summary>    
00221         public const string XmlAttributeRel = "rel";
        /// <summary>static string for parsing</summary>    
00223         public const string XmlAttributeHRefLang = "hreflang";
        /// <summary>static string for parsing</summary>    
00225         public const string XmlAttributeHRef = "href";

        /// <summary>static string for parsing</summary>    
00228         public const string XmlAttributeSrc = "src";


        /// <summary>static string for parsing the App:categories element</summary>    
00232         public const string XmlCategoriesElement = "categories"; 

        


        //////////////////////////////////////////////////////////////////////
        /// <summary>initializes the name table for use with atom parsing. This is the
        /// only place where strings are defined for parsing</summary> 
        //////////////////////////////////////////////////////////////////////
00241         public override void InitAtomParserNameTable()
        {
            // create the nametable object by calling the base
            base.InitAtomParserNameTable();

            Tracing.TraceCall("Initializing atom nametable support");
            // <summary>add the keywords for the Feed</summary>
            this.feed = this.Nametable.Add(AtomParserNameTable.XmlFeedElement);
            this.version = this.Nametable.Add(AtomParserNameTable.XmlAttributeVersion);
            this.source = this.Nametable.Add(AtomParserNameTable.XmlSourceElement);
            this.entry = this.Nametable.Add(AtomParserNameTable.XmlAtomEntryElement);
            this.title = this.Nametable.Add(AtomParserNameTable.XmlTitleElement);
            this.link = this.Nametable.Add(AtomParserNameTable.XmlLinkElement);
            this.id = this.Nametable.Add(AtomParserNameTable.XmlIdElement);
            this.href = this.Nametable.Add(AtomParserNameTable.XmlAttributeHRef);

            this.rel = this.Nametable.Add(AtomParserNameTable.XmlAttributeRel);
            this.hreflang = this.Nametable.Add(AtomParserNameTable.XmlAttributeHRefLang);
            this.length = this.Nametable.Add(AtomParserNameTable.XmlAttributeLength);
            this.updated = this.Nametable.Add(AtomParserNameTable.XmlUpdatedElement);
            this.published = this.Nametable.Add(AtomParserNameTable.XmlPublishedElement);
            this.author = this.Nametable.Add(AtomParserNameTable.XmlAuthorElement);
            this.contributor = this.Nametable.Add(AtomParserNameTable.XmlContributorElement);
            this.rights = this.Nametable.Add(AtomParserNameTable.XmlRightsElement);
            this.category = this.Nametable.Add(AtomParserNameTable.XmlCategoryElement);
            this.term = this.Nametable.Add(AtomParserNameTable.XmlAttributeTerm);
            this.scheme = this.Nametable.Add(AtomParserNameTable.XmlAttributeScheme);
            this.label = this.Nametable.Add(AtomParserNameTable.XmlAttributeLabel);
            this.summary = this.Nametable.Add(AtomParserNameTable.XmlSummaryElement);
            this.content = this.Nametable.Add(AtomParserNameTable.XmlContentElement);
            this.src = this.Nametable.Add(AtomParserNameTable.XmlAttributeSrc);

            this.uri = this.Nametable.Add(AtomParserNameTable.XmlUriElement);
            this.generator = this.Nametable.Add(AtomParserNameTable.XmlGeneratorElement);
            this.email = this.Nametable.Add(AtomParserNameTable.XmlEmailElement);
            this.icon = this.Nametable.Add(AtomParserNameTable.XmlIconElement);
            this.logo = this.Nametable.Add(AtomParserNameTable.XmlLogoElement);
            this.subTitle = this.Nametable.Add(AtomParserNameTable.XmlSubtitleElement);

            this.categories = this.Nametable.Add(AtomParserNameTable.XmlCategoriesElement);
        }
        /////////////////////////////////////////////////////////////////////////////

        #region Read only accessors 7/7/2005
        //////////////////////////////////////////////////////////////////////
        /// <summary>Read only accessor for feed</summary> 
        //////////////////////////////////////////////////////////////////////
        public object Feed
00289         {
            get {return this.feed;}
        }
        /////////////////////////////////////////////////////////////////////////////

        //////////////////////////////////////////////////////////////////////
        /// <summary>Read only accessor for Categories</summary> 
        //////////////////////////////////////////////////////////////////////
        public object Categories
00298         {
            get {return this.categories;}
        }
        /////////////////////////////////////////////////////////////////////////////

        //////////////////////////////////////////////////////////////////////
        /// <summary>Read only accessor for version</summary> 
        //////////////////////////////////////////////////////////////////////
        public object Version
00307         {
            get {return this.version;}
        }
        /////////////////////////////////////////////////////////////////////////////
        //////////////////////////////////////////////////////////////////////
        /// <summary>Read only accessor for source</summary> 
        //////////////////////////////////////////////////////////////////////
        public object Source
00315         {
            get {return this.source;}
        }
        /////////////////////////////////////////////////////////////////////////////
        //////////////////////////////////////////////////////////////////////
        /// <summary>Read only accessor for entry</summary> 
        //////////////////////////////////////////////////////////////////////
        public object Entry
00323         {
            get {return this.entry;}
        }
        /////////////////////////////////////////////////////////////////////////////
        //////////////////////////////////////////////////////////////////////
        /// <summary>Read only accessor for title</summary> 
        //////////////////////////////////////////////////////////////////////
        public object Title
00331         {
            get {return this.title;}
        }
        /////////////////////////////////////////////////////////////////////////////
        //////////////////////////////////////////////////////////////////////
        /// <summary>Read only accessor for link</summary> 
        //////////////////////////////////////////////////////////////////////
        public object Link
00339         {
            get {return this.link;}
        }
        /////////////////////////////////////////////////////////////////////////////
        //////////////////////////////////////////////////////////////////////
        /// <summary>Read only accessor for id</summary> 
        //////////////////////////////////////////////////////////////////////
        public object Id
00347         {
            get {return this.id;}
        }
        /////////////////////////////////////////////////////////////////////////////
        //////////////////////////////////////////////////////////////////////
        /// <summary>Read only accessor for href</summary> 
        //////////////////////////////////////////////////////////////////////
        public object HRef
00355         {
            get {return this.href;}
        }
        /////////////////////////////////////////////////////////////////////////////
        //////////////////////////////////////////////////////////////////////
        /// <summary>Read only accessor for rel</summary> 
        //////////////////////////////////////////////////////////////////////
        public object Rel
00363         {
            get {return this.rel;}
        }
        /////////////////////////////////////////////////////////////////////////////
        //////////////////////////////////////////////////////////////////////
        /// <summary>Read only accessor for hreflang</summary> 
        //////////////////////////////////////////////////////////////////////
        public object HRefLang
00371         {
            get {return this.hreflang;}
        }
        /////////////////////////////////////////////////////////////////////////////
        //////////////////////////////////////////////////////////////////////
        /// <summary>Read only accessor for length</summary> 
        //////////////////////////////////////////////////////////////////////
        public object Length
00379         {
            get {return this.length;}
        }
        /////////////////////////////////////////////////////////////////////////////
        //////////////////////////////////////////////////////////////////////
        /// <summary>Read only accessor for category</summary> 
        //////////////////////////////////////////////////////////////////////
        public object Category
00387         {
            get {return this.category;}
        }
        /////////////////////////////////////////////////////////////////////////////
        
        
        //////////////////////////////////////////////////////////////////////
        /// <summary>Read only accessor for updated</summary> 
        //////////////////////////////////////////////////////////////////////
        public object Updated
00397         {
            get {return this.updated;}
        }
        /////////////////////////////////////////////////////////////////////////////
        //////////////////////////////////////////////////////////////////////
        /// <summary>Read only accessor for published</summary> 
        //////////////////////////////////////////////////////////////////////
        public object Published
00405         {
            get {return this.published;}
        }
        /////////////////////////////////////////////////////////////////////////////
        //////////////////////////////////////////////////////////////////////
        /// <summary>Read only accessor for author</summary> 
        //////////////////////////////////////////////////////////////////////
        public object Author
00413         {
            get {return this.author;}
        }
        /////////////////////////////////////////////////////////////////////////////
        //////////////////////////////////////////////////////////////////////
        /// <summary>Read only accessor for contributor</summary> 
        //////////////////////////////////////////////////////////////////////
        public object Contributor
00421         {
            get {return this.contributor;}
        }
        /////////////////////////////////////////////////////////////////////////////
        //////////////////////////////////////////////////////////////////////
        /// <summary>Read only accessor for rights</summary> 
        //////////////////////////////////////////////////////////////////////
        public object Rights
00429         {
            get {return this.rights;}
        }
        /////////////////////////////////////////////////////////////////////////////
        //////////////////////////////////////////////////////////////////////
        /// <summary>Read only accessor for term</summary> 
        //////////////////////////////////////////////////////////////////////
        public object Term
00437         {
            get {return this.term;}
        }
        /////////////////////////////////////////////////////////////////////////////
        //////////////////////////////////////////////////////////////////////
        /// <summary>Read only accessor for scheme</summary> 
        //////////////////////////////////////////////////////////////////////
        public object Scheme
00445         {
            get {return this.scheme;}
        }
        /////////////////////////////////////////////////////////////////////////////
        //////////////////////////////////////////////////////////////////////
        /// <summary>Read only accessor for label</summary> 
        //////////////////////////////////////////////////////////////////////
        public object Label
00453         {
            get {return this.label;}
        }
        /////////////////////////////////////////////////////////////////////////////
        //////////////////////////////////////////////////////////////////////
        /// <summary>Read only accessor for summary</summary> 
        //////////////////////////////////////////////////////////////////////
        public object Summary
00461         {
            get {return this.summary;}
        }
        /////////////////////////////////////////////////////////////////////////////
        //////////////////////////////////////////////////////////////////////
        /// <summary>Read only accessor for content</summary> 
        //////////////////////////////////////////////////////////////////////
        public object Content
00469         {
            get {return this.content;}
        }
        /////////////////////////////////////////////////////////////////////////////
        //////////////////////////////////////////////////////////////////////
        /// <summary>Read only accessor for src</summary> 
        //////////////////////////////////////////////////////////////////////
        public object Src
00477         {
            get {return this.src;}
        }
        /////////////////////////////////////////////////////////////////////////////

        //////////////////////////////////////////////////////////////////////
        /// <summary>Read only accessor for subtitle</summary> 
        //////////////////////////////////////////////////////////////////////
        public object Subtitle
00486         {
            get {return this.subTitle;}
        }
        /////////////////////////////////////////////////////////////////////////////
        
        //////////////////////////////////////////////////////////////////////
        /// <summary>Read only accessor for uri</summary> 
        //////////////////////////////////////////////////////////////////////
        public object Uri
00495         {
            get {return this.uri;}
        }
        /////////////////////////////////////////////////////////////////////////////
        //////////////////////////////////////////////////////////////////////
        /// <summary>Read only accessor for generator</summary> 
        //////////////////////////////////////////////////////////////////////
        public object Generator
00503         {
            get {return this.generator;}
        }
        /////////////////////////////////////////////////////////////////////////////


          //////////////////////////////////////////////////////////////////////
        /// <summary>Read only accessor for email</summary> 
        //////////////////////////////////////////////////////////////////////
        public object Email
00513         {
            get {return this.email;}
        }
        /////////////////////////////////////////////////////////////////////////////




        //////////////////////////////////////////////////////////////////////
        /// <summary>Read only accessor for icon</summary> 
        //////////////////////////////////////////////////////////////////////
        public object Icon
00525         {
            get {return this.icon;}
        }
        /////////////////////////////////////////////////////////////////////////////

        //////////////////////////////////////////////////////////////////////
        /// <summary>Read only accessor for logo</summary> 
        //////////////////////////////////////////////////////////////////////
        public object Logo
00534         {
            get {return this.logo;}
        }
        /////////////////////////////////////////////////////////////////////////////
        
        
        

        #endregion end of Read only accessors

    }
    /////////////////////////////////////////////////////////////////////////////

}
/////////////////////////////////////////////////////////////////////////////


Generated by  Doxygen 1.6.0   Back to index