StropheCappuccino API 1.0.0
/tmp/tempDoc.doc/Build/StropheCappuccino.build/Release/Browser.environment/Sources/TNStropheVCard.j
Go to the documentation of this file.
00001 @STATIC;1.0;I;23;Foundation/Foundation.jI;16;AppKit/CPImage.ji;11;TNXMLNode.jt;12667;objj_executeFile("Foundation/Foundation.j", NO);objj_executeFile("AppKit/CPImage.j", NO);objj_executeFile("TNXMLNode.j", YES);{var the_class = objj_allocateClassPair(CPObject, "TNStropheVCard"),
00002 meta_class = the_class.isa;class_addIvars(the_class, [new objj_ivar("_photo"), new objj_ivar("_categories"), new objj_ivar("_fullName"), new objj_ivar("_locality"), new objj_ivar("_organizationName"), new objj_ivar("_organizationUnit"), new objj_ivar("_role"), new objj_ivar("_title"), new objj_ivar("_type"), new objj_ivar("_userID")]);objj_registerClassPair(the_class);
00003 class_addMethods(the_class, [new objj_method(sel_getUid("photo"), function $TNStropheVCard__photo(self, _cmd)
00004 {
00005     return self._photo;
00006 }
00007 ,["CPImage"]), new objj_method(sel_getUid("setPhoto:"), function $TNStropheVCard__setPhoto_(self, _cmd, newValue)
00008 {
00009     self._photo = newValue;
00010 }
00011 ,["void","CPImage"]), new objj_method(sel_getUid("categories"), function $TNStropheVCard__categories(self, _cmd)
00012 {
00013     return self._categories;
00014 }
00015 ,["CPString"]), new objj_method(sel_getUid("setCategories:"), function $TNStropheVCard__setCategories_(self, _cmd, newValue)
00016 {
00017     self._categories = newValue;
00018 }
00019 ,["void","CPString"]), new objj_method(sel_getUid("fullName"), function $TNStropheVCard__fullName(self, _cmd)
00020 {
00021     return self._fullName;
00022 }
00023 ,["CPString"]), new objj_method(sel_getUid("setFullName:"), function $TNStropheVCard__setFullName_(self, _cmd, newValue)
00024 {
00025     self._fullName = newValue;
00026 }
00027 ,["void","CPString"]), new objj_method(sel_getUid("locality"), function $TNStropheVCard__locality(self, _cmd)
00028 {
00029     return self._locality;
00030 }
00031 ,["CPString"]), new objj_method(sel_getUid("setLocality:"), function $TNStropheVCard__setLocality_(self, _cmd, newValue)
00032 {
00033     self._locality = newValue;
00034 }
00035 ,["void","CPString"]), new objj_method(sel_getUid("organizationName"), function $TNStropheVCard__organizationName(self, _cmd)
00036 {
00037     return self._organizationName;
00038 }
00039 ,["CPString"]), new objj_method(sel_getUid("setOrganizationName:"), function $TNStropheVCard__setOrganizationName_(self, _cmd, newValue)
00040 {
00041     self._organizationName = newValue;
00042 }
00043 ,["void","CPString"]), new objj_method(sel_getUid("organizationUnit"), function $TNStropheVCard__organizationUnit(self, _cmd)
00044 {
00045     return self._organizationUnit;
00046 }
00047 ,["CPString"]), new objj_method(sel_getUid("setOrganizationUnit:"), function $TNStropheVCard__setOrganizationUnit_(self, _cmd, newValue)
00048 {
00049     self._organizationUnit = newValue;
00050 }
00051 ,["void","CPString"]), new objj_method(sel_getUid("role"), function $TNStropheVCard__role(self, _cmd)
00052 {
00053     return self._role;
00054 }
00055 ,["CPString"]), new objj_method(sel_getUid("setRole:"), function $TNStropheVCard__setRole_(self, _cmd, newValue)
00056 {
00057     self._role = newValue;
00058 }
00059 ,["void","CPString"]), new objj_method(sel_getUid("title"), function $TNStropheVCard__title(self, _cmd)
00060 {
00061     return self._title;
00062 }
00063 ,["CPString"]), new objj_method(sel_getUid("setTitle:"), function $TNStropheVCard__setTitle_(self, _cmd, newValue)
00064 {
00065     self._title = newValue;
00066 }
00067 ,["void","CPString"]), new objj_method(sel_getUid("type"), function $TNStropheVCard__type(self, _cmd)
00068 {
00069     return self._type;
00070 }
00071 ,["CPString"]), new objj_method(sel_getUid("setType:"), function $TNStropheVCard__setType_(self, _cmd, newValue)
00072 {
00073     self._type = newValue;
00074 }
00075 ,["void","CPString"]), new objj_method(sel_getUid("userID"), function $TNStropheVCard__userID(self, _cmd)
00076 {
00077     return self._userID;
00078 }
00079 ,["CPString"]), new objj_method(sel_getUid("setUserID:"), function $TNStropheVCard__setUserID_(self, _cmd, newValue)
00080 {
00081     self._userID = newValue;
00082 }
00083 ,["void","CPString"]), new objj_method(sel_getUid("initWithXMLNode:"), function $TNStropheVCard__initWithXMLNode_(self, _cmd, aNode)
00084 {
00085     if (self = objj_msgSendSuper({ receiver:self, super_class:objj_getClass("TNStropheVCard").super_class }, "init"))
00086     {
00087         self._categories = ((___r1 = (aNode == null ? null : aNode.isa.objj_msgSend1(aNode, "firstChildWithName:", "CATEGORIES"))), ___r1 == null ? null : ___r1.isa.objj_msgSend0(___r1, "text"));
00088         self._fullName = ((___r1 = (aNode == null ? null : aNode.isa.objj_msgSend1(aNode, "firstChildWithName:", "FN"))), ___r1 == null ? null : ___r1.isa.objj_msgSend0(___r1, "text"));
00089         self._locality = ((___r1 = (aNode == null ? null : aNode.isa.objj_msgSend1(aNode, "firstChildWithName:", "LOCALITY"))), ___r1 == null ? null : ___r1.isa.objj_msgSend0(___r1, "text"));
00090         self._organizationName = ((___r1 = (aNode == null ? null : aNode.isa.objj_msgSend1(aNode, "firstChildWithName:", "ORGNAME"))), ___r1 == null ? null : ___r1.isa.objj_msgSend0(___r1, "text"));
00091         self._organizationUnit = ((___r1 = (aNode == null ? null : aNode.isa.objj_msgSend1(aNode, "firstChildWithName:", "ORGUNIT"))), ___r1 == null ? null : ___r1.isa.objj_msgSend0(___r1, "text"));
00092         self._role = ((___r1 = (aNode == null ? null : aNode.isa.objj_msgSend1(aNode, "firstChildWithName:", "ROLE"))), ___r1 == null ? null : ___r1.isa.objj_msgSend0(___r1, "text"));
00093         self._title = ((___r1 = (aNode == null ? null : aNode.isa.objj_msgSend1(aNode, "firstChildWithName:", "TITLE"))), ___r1 == null ? null : ___r1.isa.objj_msgSend0(___r1, "text"));
00094         self._type = ((___r1 = (aNode == null ? null : aNode.isa.objj_msgSend1(aNode, "firstChildWithName:", "TYPE"))), ___r1 == null ? null : ___r1.isa.objj_msgSend0(___r1, "text"));
00095         self._userID = ((___r1 = (aNode == null ? null : aNode.isa.objj_msgSend1(aNode, "firstChildWithName:", "USERID"))), ___r1 == null ? null : ___r1.isa.objj_msgSend0(___r1, "text"));
00096         var photoNode;
00097         if (photoNode = (aNode == null ? null : aNode.isa.objj_msgSend1(aNode, "firstChildWithName:", "PHOTO")))
00098         {
00099             var data = ((___r1 = (photoNode == null ? null : photoNode.isa.objj_msgSend1(photoNode, "firstChildWithName:", "BINVAL"))), ___r1 == null ? null : ___r1.isa.objj_msgSend0(___r1, "text"));
00100             self._photo = ((___r1 = CPImage.isa.objj_msgSend0(CPImage, "alloc")), ___r1 == null ? null : ___r1.isa.objj_msgSend1(___r1, "initWithData:", CPData.isa.objj_msgSend1(CPData, "dataWithBase64:", data)));
00101         }
00102     }
00103     return self;
00104     var ___r1;
00105 }
00106 ,["id","TNXMLNode"]), new objj_method(sel_getUid("XMLNode"), function $TNStropheVCard__XMLNode(self, _cmd)
00107 {
00108     var node = TNXMLNode.isa.objj_msgSend2(TNXMLNode, "nodeWithName:andAttributes:", "vCard", {"xmlns": "vcard-temp"});
00109     if (self._fullName)
00110     {
00111         (node == null ? null : node.isa.objj_msgSend1(node, "addChildWithName:", "FN"));
00112         (node == null ? null : node.isa.objj_msgSend1(node, "addTextNode:", self._fullName));
00113         (node == null ? null : node.isa.objj_msgSend0(node, "up"));
00114     }
00115     if (self._title)
00116     {
00117         (node == null ? null : node.isa.objj_msgSend1(node, "addChildWithName:", "TITLE"));
00118         (node == null ? null : node.isa.objj_msgSend1(node, "addTextNode:", self._title));
00119         (node == null ? null : node.isa.objj_msgSend0(node, "up"));
00120     }
00121     if (self._organizationName)
00122     {
00123         (node == null ? null : node.isa.objj_msgSend1(node, "addChildWithName:", "ORGNAME"));
00124         (node == null ? null : node.isa.objj_msgSend1(node, "addTextNode:", self._organizationName));
00125         (node == null ? null : node.isa.objj_msgSend0(node, "up"));
00126     }
00127     if (self._organizationUnit)
00128     {
00129         (node == null ? null : node.isa.objj_msgSend1(node, "addChildWithName:", "ORGUNIT"));
00130         (node == null ? null : node.isa.objj_msgSend1(node, "addTextNode:", self._organizationUnit));
00131         (node == null ? null : node.isa.objj_msgSend0(node, "up"));
00132     }
00133     if (self._userID)
00134     {
00135         (node == null ? null : node.isa.objj_msgSend1(node, "addChildWithName:", "USERID"));
00136         (node == null ? null : node.isa.objj_msgSend1(node, "addTextNode:", self._userID));
00137         (node == null ? null : node.isa.objj_msgSend0(node, "up"));
00138     }
00139     if (self._locality)
00140     {
00141         (node == null ? null : node.isa.objj_msgSend1(node, "addChildWithName:", "LOCALITY"));
00142         (node == null ? null : node.isa.objj_msgSend1(node, "addTextNode:", self._locality));
00143         (node == null ? null : node.isa.objj_msgSend0(node, "up"));
00144     }
00145     if (self._categories)
00146     {
00147         (node == null ? null : node.isa.objj_msgSend1(node, "addChildWithName:", "CATEGORIES"));
00148         (node == null ? null : node.isa.objj_msgSend1(node, "addTextNode:", self._categories));
00149         (node == null ? null : node.isa.objj_msgSend0(node, "up"));
00150     }
00151     if (self._type)
00152     {
00153         (node == null ? null : node.isa.objj_msgSend1(node, "addChildWithName:", "TYPE"));
00154         (node == null ? null : node.isa.objj_msgSend1(node, "addTextNode:", self._type));
00155         (node == null ? null : node.isa.objj_msgSend0(node, "up"));
00156     }
00157     if (self._role)
00158     {
00159         (node == null ? null : node.isa.objj_msgSend1(node, "addChildWithName:", "ROLE"));
00160         (node == null ? null : node.isa.objj_msgSend1(node, "addTextNode:", self._role));
00161         (node == null ? null : node.isa.objj_msgSend0(node, "up"));
00162     }
00163     if (self._photo)
00164     {
00165         (node == null ? null : node.isa.objj_msgSend1(node, "addChildWithName:", "PHOTO"));
00166         (node == null ? null : node.isa.objj_msgSend1(node, "addChildWithName:", "BINVAL"));
00167         (node == null ? null : node.isa.objj_msgSend1(node, "addTextNode:", ((___r1 = ((___r2 = self._photo), ___r2 == null ? null : ___r2.isa.objj_msgSend0(___r2, "data"))), ___r1 == null ? null : ___r1.isa.objj_msgSend0(___r1, "base64"))));
00168         (node == null ? null : node.isa.objj_msgSend0(node, "up"));
00169         (node == null ? null : node.isa.objj_msgSend0(node, "up"));
00170     }
00171     return node;
00172     var ___r1, ___r2;
00173 }
00174 ,["TNXMLNode"])]);
00175 }{
00176 var the_class = objj_getClass("TNStropheVCard")
00177 if(!the_class) throw new SyntaxError("*** Could not find definition for class \"TNStropheVCard\"");
00178 var meta_class = the_class.isa;class_addMethods(the_class, [new objj_method(sel_getUid("initWithCoder:"), function $TNStropheVCard__initWithCoder_(self, _cmd, aCoder)
00179 {
00180     if (self = objj_msgSendSuper({ receiver:self, super_class:objj_getClass("TNStropheVCard").super_class }, "init"))
00181     {
00182         self._fullName = (aCoder == null ? null : aCoder.isa.objj_msgSend1(aCoder, "decodeObjectForKey:", "_fullName"));
00183         self._organizationName = (aCoder == null ? null : aCoder.isa.objj_msgSend1(aCoder, "decodeObjectForKey:", "_organizationName"));
00184         self._organizationUnit = (aCoder == null ? null : aCoder.isa.objj_msgSend1(aCoder, "decodeObjectForKey:", "_organizationUnit"));
00185         self._userID = (aCoder == null ? null : aCoder.isa.objj_msgSend1(aCoder, "decodeObjectForKey:", "_userID"));
00186         self._locality = (aCoder == null ? null : aCoder.isa.objj_msgSend1(aCoder, "decodeObjectForKey:", "_locality"));
00187         self._categories = (aCoder == null ? null : aCoder.isa.objj_msgSend1(aCoder, "decodeObjectForKey:", "_categories"));
00188         self._type = (aCoder == null ? null : aCoder.isa.objj_msgSend1(aCoder, "decodeObjectForKey:", "_type"));
00189         self._role = (aCoder == null ? null : aCoder.isa.objj_msgSend1(aCoder, "decodeObjectForKey:", "_role"));
00190         self._title = (aCoder == null ? null : aCoder.isa.objj_msgSend1(aCoder, "decodeObjectForKey:", "_title"));
00191         self._photo = (aCoder == null ? null : aCoder.isa.objj_msgSend1(aCoder, "decodeObjectForKey:", "_photo"));
00192     }
00193     return self;
00194 }
00195 ,["id","CPCoder"]), new objj_method(sel_getUid("encodeWithCoder:"), function $TNStropheVCard__encodeWithCoder_(self, _cmd, aCoder)
00196 {
00197     (aCoder == null ? null : aCoder.isa.objj_msgSend2(aCoder, "encodeObject:forKey:", self._fullName, "_fullName"));
00198     (aCoder == null ? null : aCoder.isa.objj_msgSend2(aCoder, "encodeObject:forKey:", self._organizationName, "_organizationName"));
00199     (aCoder == null ? null : aCoder.isa.objj_msgSend2(aCoder, "encodeObject:forKey:", self._organizationUnit, "_organizationUnit"));
00200     (aCoder == null ? null : aCoder.isa.objj_msgSend2(aCoder, "encodeObject:forKey:", self._userID, "_userID"));
00201     (aCoder == null ? null : aCoder.isa.objj_msgSend2(aCoder, "encodeObject:forKey:", self._locality, "_locality"));
00202     (aCoder == null ? null : aCoder.isa.objj_msgSend2(aCoder, "encodeObject:forKey:", self._categories, "_categories"));
00203     (aCoder == null ? null : aCoder.isa.objj_msgSend2(aCoder, "encodeObject:forKey:", self._type, "_type"));
00204     (aCoder == null ? null : aCoder.isa.objj_msgSend2(aCoder, "encodeObject:forKey:", self._role, "_role"));
00205     (aCoder == null ? null : aCoder.isa.objj_msgSend2(aCoder, "encodeObject:forKey:", self._title, "_title"));
00206     (aCoder == null ? null : aCoder.isa.objj_msgSend2(aCoder, "encodeObject:forKey:", self._photo, "_photo"));
00207 }
00208 ,["void","CPCoder"])]);
00209 }
 All Classes Namespaces Files Functions Variables