PageRenderTime 42ms CodeModel.GetById 25ms app.highlight 14ms RepoModel.GetById 1ms app.codeStats 1ms

/core/externals/update-engine/externals/gdata-objectivec-client/Source/Clients/WebmasterTools/GDataFeedSitemap.m

http://macfuse.googlecode.com/
Objective C | 100 lines | 55 code | 28 blank | 17 comment | 1 complexity | cb4609f819938786b67614d7cdc6fb59 MD5 | raw file
  1/* Copyright (c) 2008 Google Inc.
  2*
  3* Licensed under the Apache License, Version 2.0 (the "License");
  4* you may not use this file except in compliance with the License.
  5* You may obtain a copy of the License at
  6*
  7*     http://www.apache.org/licenses/LICENSE-2.0
  8*
  9* Unless required by applicable law or agreed to in writing, software
 10* distributed under the License is distributed on an "AS IS" BASIS,
 11* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 12* See the License for the specific language governing permissions and
 13* limitations under the License.
 14*/
 15
 16//
 17//  GDataFeedSite.m
 18//
 19
 20#if !GDATA_REQUIRE_SERVICE_INCLUDES || GDATA_INCLUDE_WEBMASTERTOOLS_SERVICE
 21
 22#import "GDataFeedSitemap.h"
 23#import "GDataWebmasterToolsConstants.h"
 24
 25#import "GDataSitemapMobile.h"
 26#import "GDataSitemapNews.h"
 27
 28@implementation GDataFeedSitemap
 29
 30+ (GDataFeedSitemap *)sitemapFeed {
 31  
 32  GDataFeedSitemap *feed = [self object];
 33  
 34  [feed setNamespaces:[GDataWebmasterToolsConstants webmasterToolsNamespaces]];
 35  
 36  return feed;
 37}
 38
 39+ (NSString *)standardFeedKind {
 40  return kGDataCategorySitemapsFeed;
 41}
 42
 43+ (void)load {
 44  [self registerFeedClass];
 45}
 46
 47- (void)addExtensionDeclarations {
 48  
 49  [super addExtensionDeclarations];
 50  
 51  Class feedClass = [self class];
 52  
 53  [self addExtensionDeclarationForParentClass:feedClass
 54                                 childClasses:
 55   [GDataSitemapMobile class],
 56   [GDataSitemapNews class],
 57   nil];
 58}
 59
 60#if !GDATA_SIMPLE_DESCRIPTIONS
 61- (NSMutableArray *)itemsForDescription {
 62  
 63  NSMutableArray *items = [super itemsForDescription];
 64  
 65  [self addToArray:items objectDescriptionIfNonNil:[self sitemapMobile] withName:@"mobile"];
 66  [self addToArray:items objectDescriptionIfNonNil:[self sitemapNews] withName:@"news"];
 67  
 68  return items;
 69}
 70#endif
 71
 72- (Class)classForEntries {
 73  return kUseRegisteredEntryClass;
 74}
 75
 76+ (NSString *)defaultServiceVersion {
 77  return kGDataWebmasterToolsDefaultServiceVersion;
 78}
 79
 80#pragma mark -
 81
 82- (GDataSitemapMobile *)sitemapMobile {
 83  return [self objectForExtensionClass:[GDataSitemapMobile class]];  
 84}
 85
 86- (void)setSitemapMobile:(GDataSitemapMobile *)obj {
 87  [self setObject:obj forExtensionClass:[GDataSitemapMobile class]];
 88}
 89
 90- (GDataSitemapNews *)sitemapNews {
 91  return [self objectForExtensionClass:[GDataSitemapNews class]];  
 92}
 93
 94- (void)setSitemapNews:(GDataSitemapNews *)obj {
 95  [self setObject:obj forExtensionClass:[GDataSitemapNews class]];
 96}
 97
 98@end
 99
100#endif // !GDATA_REQUIRE_SERVICE_INCLUDES || GDATA_INCLUDE_WEBMASTERTOOLS_SERVICE