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