1
/* Copyright (c) 2006 Google Inc.
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
7
* http://www.apache.org/licenses/LICENSE-2.0
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.
18
//using System.Collections;
20
using Google.GData.Client;
21
using Google.GData.Extensions;
23
namespace Google.GData.Photos {
26
/// helper to instantiate all factories defined in here and attach
27
/// them to a base object
29
public static class GPhotoExtensions
32
/// helper to add all picasa photo extensions to the base object
34
/// <param name="baseObject"></param>
35
public static void AddExtension(AtomBase baseObject)
37
baseObject.AddExtension(new GPhotoAlbumId());
38
baseObject.AddExtension(new GPhotoCommentCount());
39
baseObject.AddExtension(new GPhotoCommentingEnabled());
40
baseObject.AddExtension(new GPhotoId());
41
baseObject.AddExtension(new GPhotoMaxPhotosPerAlbum());
42
baseObject.AddExtension(new GPhotoNickName());
43
baseObject.AddExtension(new GPhotoQuotaCurrent());
44
baseObject.AddExtension(new GPhotoQuotaLimit());
45
baseObject.AddExtension(new GPhotoThumbnail());
46
baseObject.AddExtension(new GPhotoUser());
47
baseObject.AddExtension(new GPhotoAccess());
48
baseObject.AddExtension(new GPhotoBytesUsed());
49
baseObject.AddExtension(new GPhotoLocation());
50
baseObject.AddExtension(new GPhotoNumPhotos());
51
baseObject.AddExtension(new GPhotoNumPhotosRemaining());
52
baseObject.AddExtension(new GPhotoChecksum());
53
baseObject.AddExtension(new GPhotoClient());
54
baseObject.AddExtension(new GPhotoHeight());
55
baseObject.AddExtension(new GPhotoPosition());
56
baseObject.AddExtension(new GPhotoRotation());
57
baseObject.AddExtension(new GPhotoSize());
58
baseObject.AddExtension(new GPhotoTimestamp());
59
baseObject.AddExtension(new GPhotoVersion());
60
baseObject.AddExtension(new GPhotoWidth());
61
baseObject.AddExtension(new GPhotoPhotoId());
62
baseObject.AddExtension(new GPhotoWeight());
63
baseObject.AddExtension(new GPhotoName());
68
/// short table to hold the namespace and the prefix
70
public static class GPhotoNameTable
72
/// <summary>static string to specify the GeoRSS namespace supported</summary>
73
public const string NSGPhotos = "http://schemas.google.com/photos/2007";
74
/// <summary>static string to specify the Google Picasa prefix used</summary>
75
public const string gPhotoPrefix = "gphoto";
78
/// Comment Kind definition
79
/// this is the term value for a category
81
public const string CommentKind = NSGPhotos + "#comment";
83
/// Photo Kind definition
84
/// this is the term value for a category
86
public const string PhotoKind = NSGPhotos + "#photo";
88
/// Album Kind definition
89
/// this is the term value for a category
91
public const string AlbumKind = NSGPhotos + "#album";
93
/// Tag Kind definition
94
/// this is the term value for a category
96
public const string TagKind = NSGPhotos + "#tag";
101
public const string Id = "id";
104
/// album id element string
106
public const string AlbumId = "albumid";
109
/// comment count element string
111
public const string CommentCount = "commentCount";
114
/// commenting enabled element string
116
public const string CommentingEnabled = "commentingEnabled";
119
/// maximal photos per album element string
121
public const string MaxPhotosPerAlbum = "maxPhotosPerAlbum";
124
/// nickname element string
126
public const string Nickname = "nickname";
129
/// current Quota element string
131
public const string QuotaCurrent = "quotacurrent";
134
/// Quota Limit element string
136
public const string QuotaLimit = "quotalimit";
139
/// Thumbnail element string
141
public const string Thumbnail = "thumbnail";
144
/// User element string
146
public const string User = "user";
149
/// access element string
151
public const string Access = "access";
154
/// bytesUsed element string
156
public const string BytesUsed = "bytesUsed";
159
/// location element string
161
public const string Location = "location";
164
/// name element string
166
public const string Name = "name";
169
/// numphotos element string
171
public const string NumPhotos = "numphotos";
174
/// numphotosremaining element string
176
public const string NumPhotosRemaining = "numphotosremaining";
179
/// numphotos element string
181
public const string Checksum = "checksum";
184
/// client element string
186
public const string Client = "client";
189
/// height element string
191
public const string Height = "height";
194
/// position element string
196
public const string Position = "position";
199
/// rotation element string
201
public const string Rotation = "rotation";
204
/// size element string
206
public const string Size = "size";
209
/// timestamp element string
211
public const string Timestamp = "timestamp";
214
/// version element string
216
public const string Version = "version";
219
/// photoid element string
221
public const string Photoid = "photoid";
224
/// width element string
226
public const string Width = "width";
229
/// weight element string
231
public const string Weight = "weight";
237
/// id schema extension describing an ID.
239
public class GPhotoId : SimpleElement
242
/// default constructor
245
: base(GPhotoNameTable.Id, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos)
249
/// default constructor with an initial value as a string
251
public GPhotoId(string initValue)
252
: base(GPhotoNameTable.Id, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos, initValue)
257
/// GPhotoAlbumId schema extension describing an albumid
259
public class GPhotoAlbumId : SimpleElement
262
/// default constructor
264
public GPhotoAlbumId()
265
: base(GPhotoNameTable.AlbumId, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos)
268
/// default constructor with an initial value as a string
270
public GPhotoAlbumId(string initValue)
271
: base(GPhotoNameTable.AlbumId, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos, initValue)
276
/// GPhotoCommentCount schema extension describing an commentCount
278
public class GPhotoCommentCount : SimpleElement
281
/// default constructor
283
public GPhotoCommentCount()
284
: base(GPhotoNameTable.CommentCount, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos)
287
/// default constructor with an initial value as a string
289
public GPhotoCommentCount(string initValue)
290
: base(GPhotoNameTable.CommentCount, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos, initValue)
295
/// GPhotoCommentingEnabled schema extension describing an commentingEnabled
297
public class GPhotoCommentingEnabled : SimpleElement
300
/// default constructor
302
public GPhotoCommentingEnabled()
303
: base(GPhotoNameTable.CommentingEnabled, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos)
306
/// default constructor with an initial value as a string
308
public GPhotoCommentingEnabled(string initValue)
309
: base(GPhotoNameTable.CommentingEnabled, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos, initValue)
314
/// GPhotoMaxPhotosPerAlbum schema extension describing an maxPhotosPerAlbum
316
public class GPhotoMaxPhotosPerAlbum : SimpleElement
319
/// default constructor
321
public GPhotoMaxPhotosPerAlbum()
322
: base(GPhotoNameTable.MaxPhotosPerAlbum, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos)
325
/// default constructor with an initial value as a string
327
public GPhotoMaxPhotosPerAlbum(string initValue)
328
: base(GPhotoNameTable.MaxPhotosPerAlbum, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos, initValue)
333
/// GPhotoNickName schema extension describing an nickname
335
public class GPhotoNickName : SimpleElement
338
/// default constructor
340
public GPhotoNickName()
341
: base(GPhotoNameTable.Nickname, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos)
344
/// default constructor with an initial value as a string
346
public GPhotoNickName(string initValue)
347
: base(GPhotoNameTable.Nickname, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos, initValue)
352
/// GPhotoQuotaCurrent schema extension describing an quotacurrent
354
public class GPhotoQuotaCurrent : SimpleElement
357
/// default constructor
359
public GPhotoQuotaCurrent()
360
: base(GPhotoNameTable.QuotaCurrent, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos)
363
/// default constructor with an initial value as a string
365
public GPhotoQuotaCurrent(string initValue)
366
: base(GPhotoNameTable.QuotaCurrent, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos, initValue)
371
/// GPhotoQuotaLimit schema extension describing an quotalimit
373
public class GPhotoQuotaLimit : SimpleElement
376
/// default constructor
378
public GPhotoQuotaLimit()
379
: base(GPhotoNameTable.QuotaLimit, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos)
382
/// default constructor with an initial value as a string
384
public GPhotoQuotaLimit(string initValue)
385
: base(GPhotoNameTable.QuotaLimit, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos, initValue)
390
/// GPhotoThumbnail schema extension describing an thumbnail
392
public class GPhotoThumbnail : SimpleElement
395
/// default constructor
397
public GPhotoThumbnail()
398
: base(GPhotoNameTable.Thumbnail, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos)
401
/// default constructor with an initial value as a string
403
public GPhotoThumbnail(string initValue)
404
: base(GPhotoNameTable.Thumbnail, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos, initValue)
409
/// GPhotoUser schema extension describing an user
411
public class GPhotoUser : SimpleElement
414
/// default constructor
417
: base(GPhotoNameTable.User, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos)
420
/// default constructor with an initial value as a string
422
public GPhotoUser(string initValue)
423
: base(GPhotoNameTable.User, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos, initValue)
428
/// GPhotoAccess schema extension describing an access
430
public class GPhotoAccess : SimpleElement
433
/// default constructor
435
public GPhotoAccess()
436
: base(GPhotoNameTable.Access, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos)
439
/// default constructor with an initial value as a string
441
public GPhotoAccess(string initValue)
442
: base(GPhotoNameTable.Access, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos, initValue)
447
/// GPhotoBytesUsed schema extension describing an bytesUsed
449
public class GPhotoBytesUsed : SimpleElement
452
/// default constructor
454
public GPhotoBytesUsed()
455
: base(GPhotoNameTable.BytesUsed, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos)
458
/// default constructor with an initial value as a string
460
public GPhotoBytesUsed(string initValue)
461
: base(GPhotoNameTable.BytesUsed, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos, initValue)
466
/// GPhotoLocation schema extension describing an location
468
public class GPhotoLocation : SimpleElement
471
/// default constructor
473
public GPhotoLocation()
474
: base(GPhotoNameTable.Location, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos)
477
/// default constructor with an initial value as a string
479
public GPhotoLocation(string initValue)
480
: base(GPhotoNameTable.Location, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos, initValue)
485
/// GPhotoName schema extension describing an name
487
public class GPhotoName : SimpleElement
490
/// default constructor
493
: base(GPhotoNameTable.Name, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos)
496
/// default constructor with an initial value as a string
498
public GPhotoName(string initValue)
499
: base(GPhotoNameTable.Name, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos, initValue)
504
/// GPhotoNumPhotos schema extension describing an numphotos
506
public class GPhotoNumPhotos : SimpleElement
509
/// default constructor
511
public GPhotoNumPhotos()
512
: base(GPhotoNameTable.NumPhotos, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos)
515
/// default constructor with an initial value as a string
517
public GPhotoNumPhotos(string initValue)
518
: base(GPhotoNameTable.NumPhotos, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos, initValue)
523
/// GPhotoNumPhotosRemaining schema extension describing an numphotosremaining
525
public class GPhotoNumPhotosRemaining : SimpleElement
528
/// default constructor
530
public GPhotoNumPhotosRemaining()
531
: base(GPhotoNameTable.NumPhotosRemaining, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos)
534
/// default constructor with an initial value as a string
536
public GPhotoNumPhotosRemaining(string initValue)
537
: base(GPhotoNameTable.NumPhotosRemaining, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos, initValue)
542
/// GPhotoChecksum schema extension describing an checksum
544
public class GPhotoChecksum : SimpleElement
547
/// default constructor
549
public GPhotoChecksum()
550
: base(GPhotoNameTable.Checksum, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos)
553
/// default constructor with an initial value as a string
555
public GPhotoChecksum(string initValue)
556
: base(GPhotoNameTable.Checksum, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos, initValue)
561
/// GPhotoClient schema extension describing an client
563
public class GPhotoClient : SimpleElement
566
/// default constructor
568
public GPhotoClient()
569
: base(GPhotoNameTable.Client, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos)
572
/// default constructor with an initial value as a string
574
public GPhotoClient(string initValue)
575
: base(GPhotoNameTable.Client, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos, initValue)
580
/// GPhotoHeight schema extension describing an height
582
public class GPhotoHeight : SimpleElement
585
/// default constructor
587
public GPhotoHeight()
588
: base(GPhotoNameTable.Height, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos)
591
/// default constructor with an initial value as a string
593
public GPhotoHeight(string initValue)
594
: base(GPhotoNameTable.Height, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos, initValue)
599
/// GPhotoPosition schema extension describing an position
601
public class GPhotoPosition : SimpleElement
604
/// default constructor
606
public GPhotoPosition()
607
: base(GPhotoNameTable.Position, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos)
610
/// default constructor with an initial value as a string
612
public GPhotoPosition(string initValue)
613
: base(GPhotoNameTable.Position, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos, initValue)
618
/// GPhotoRotation schema extension describing an rotation
620
public class GPhotoRotation : SimpleElement
623
/// default constructor
625
public GPhotoRotation()
626
: base(GPhotoNameTable.Rotation, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos)
629
/// default constructor with an initial value as a string
631
public GPhotoRotation(string initValue)
632
: base(GPhotoNameTable.Rotation, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos, initValue)
637
/// GPhotoSize schema extension describing an size
639
public class GPhotoSize : SimpleElement
642
/// default constructor
645
: base(GPhotoNameTable.Size, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos)
648
/// default constructor with an initial value as a string
650
public GPhotoSize(string initValue)
651
: base(GPhotoNameTable.Size, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos, initValue)
656
/// GPhotoTimestamp schema extension describing an timestamp
658
public class GPhotoTimestamp : SimpleElement
661
/// default constructor
663
public GPhotoTimestamp()
664
: base(GPhotoNameTable.Timestamp, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos)
667
/// default constructor with an initial value as a string
669
public GPhotoTimestamp(string initValue)
670
: base(GPhotoNameTable.Timestamp, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos, initValue)
676
/// GPhotoVersion schema extension describing an version
678
public class GPhotoVersion : SimpleElement
681
/// default constructor
683
public GPhotoVersion()
684
: base(GPhotoNameTable.Version, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos)
687
/// default constructor with an initial value as a string
689
public GPhotoVersion(string initValue)
690
: base(GPhotoNameTable.Version, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos, initValue)
695
/// GPhotoPhotoId schema extension describing an photoid
697
public class GPhotoPhotoId : SimpleElement
700
/// default constructor
702
public GPhotoPhotoId()
703
: base(GPhotoNameTable.Photoid, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos)
706
/// default constructor with an initial value as a string
708
public GPhotoPhotoId(string initValue)
709
: base(GPhotoNameTable.Photoid, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos, initValue)
714
/// GPhotoWidth schema extension describing an width
716
public class GPhotoWidth : SimpleElement
719
/// default constructor
722
: base(GPhotoNameTable.Width, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos)
725
/// default constructor with an initial value as a string
727
public GPhotoWidth(string initValue)
728
: base(GPhotoNameTable.Width, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos, initValue)
733
/// GPhotoWeight schema extension describing an weight
735
public class GPhotoWeight : SimpleElement
738
/// default constructor
740
public GPhotoWeight()
741
: base(GPhotoNameTable.Weight, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos)
744
/// default constructor with an initial value as a string
746
public GPhotoWeight(string initValue)
747
: base(GPhotoNameTable.Weight, GPhotoNameTable.gPhotoPrefix, GPhotoNameTable.NSGPhotos, initValue)