PageRenderTime 31ms CodeModel.GetById 16ms app.highlight 12ms RepoModel.GetById 1ms app.codeStats 1ms

/Source/externals/GData/Source/Clients/WebmasterTools/GDataSitemapNews.m

http://google-email-uploader-mac.googlecode.com/
Objective C | 80 lines | 35 code | 19 blank | 26 comment | 1 complexity | e856d47734bc1627bf8c1055d68080f3 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//  GDataSitemapNews.m
18//
19
20#if !GDATA_REQUIRE_SERVICE_INCLUDES || GDATA_INCLUDE_WEBMASTERTOOLS_SERVICE
21
22#import "GDataSitemapNews.h"
23
24#import "GDataWebmasterToolsConstants.h"
25#import "GDataEntrySitemap.h" // for GDataSitemapPublicationLabel
26
27// News elements, like
28//
29//      <wt:sitemap-news>
30//        <wt:publication-label>Value1</wt:publication-label>
31//        <wt:publication-label>Value2</wt:publication-label>
32//        <wt:publication-label>Value3</wt:publication-label>
33//      </wt:sitemap-news>
34//
35// http://code.google.com/apis/webmastertools/docs/reference.html
36
37@implementation GDataSitemapPublicationLabel
38+ (NSString *)extensionElementPrefix { return kGDataNamespaceWebmasterToolsPrefix; }
39+ (NSString *)extensionElementURI { return kGDataNamespaceWebmasterTools; }
40+ (NSString *)extensionElementLocalName { return @"publication-label"; }
41@end
42
43@implementation GDataSitemapNews
44
45+ (NSString *)extensionElementPrefix { return kGDataNamespaceWebmasterToolsPrefix; }
46+ (NSString *)extensionElementURI { return kGDataNamespaceWebmasterTools; }
47+ (NSString *)extensionElementLocalName { return @"sitemap-news"; }
48
49+ (id)sitemapNews {
50  
51  GDataSitemapNews *obj;
52  obj = [self object];
53  return obj;
54}
55
56- (void)addExtensionDeclarations {
57  
58  [super addExtensionDeclarations];
59  
60  [self addExtensionDeclarationForParentClass:[self class]
61                                   childClass:[GDataSitemapPublicationLabel class]];  
62}
63
64#pragma mark -
65
66- (NSArray *)publicationLabels {
67  return [self objectsForExtensionClass:[GDataSitemapPublicationLabel class]];  
68}
69
70- (void)setPublicationLabels:(NSArray *)arr {
71  [self setObjects:arr forExtensionClass:[GDataSitemapPublicationLabel class]];
72}
73
74- (void)addPublicationLabel:(GDataSitemapPublicationLabel *)obj {
75  [self addObject:obj forExtensionClass:[GDataSitemapPublicationLabel class]]; 
76}
77
78@end
79
80#endif // !GDATA_REQUIRE_SERVICE_INCLUDES || GDATA_INCLUDE_WEBMASTERTOOLS_SERVICE