1 /** 2 * Copyright © DiamondMVC 2019 3 * License: MIT (https://github.com/DiamondMVC/Diamond/blob/master/LICENSE) 4 * Author: Jacob Jensen (bausshf) 5 */ 6 module diamond.seo.schema.structures.organization; 7 8 import diamond.core.apptype; 9 10 static if (isWeb) 11 { 12 import diamond.seo.schema.schemaobject; 13 import diamond.seo.schema.structures.contactpoint; 14 import diamond.seo.schema.structures.person; 15 import diamond.seo.schema.structures.postaladdress; 16 17 /// http://schema.org/Organization 18 class Organization : SchemaObject 19 { 20 private: 21 /// The name. 22 string _name; 23 /// The url. 24 string _url; 25 /// The contact point. 26 ContactPoint[] _contactPoint; 27 /// The email. 28 string _email; 29 /// The fax number. 30 string _faxNumber; 31 /// The member. 32 Organization[] _member; 33 /// The alumni. 34 Person[] _alumni; 35 /// The telephone. 36 string _telephone; 37 /// The sponsor. 38 Organization _sponsor; 39 /// The address. 40 PostalAddress _address; 41 /// The logo. 42 string _logo; 43 /// The description. 44 string _description; 45 46 public: 47 /// Creates a new organization. 48 this() 49 { 50 super("Organization"); 51 } 52 53 /** 54 * Creates a new organization. 55 * Params: 56 * organizationType = The type of the organization. 57 */ 58 protected this(string organizationType) 59 { 60 super(organizationType); 61 } 62 63 @property 64 { 65 final 66 { 67 /// Gets the name. 68 string name() { return _name; } 69 70 /// Sets the name. 71 void name(string newName) 72 { 73 _name = newName; 74 75 super.addField("name", _name); 76 } 77 78 /// Gets the url. 79 string url() { return _url; } 80 81 /// Sets the url. 82 void url(string newUrl) 83 { 84 _url = newUrl; 85 86 super.addField("url", _url); 87 } 88 89 /// Gets the contact point. 90 ContactPoint[] contactPoint() { return _contactPoint; } 91 92 /// Sets the contact point. 93 void contactPoint(ContactPoint[] newContactPoint) 94 { 95 _contactPoint = newContactPoint; 96 97 super.addField("contactPoint", _contactPoint); 98 } 99 100 /// Gets the email. 101 string email() { return _email; } 102 103 /// Sets the email. 104 void email(string newEmail) 105 { 106 _email = newEmail; 107 108 super.addField("email", _email); 109 } 110 111 /// Gets the fax number. 112 string faxNumber() { return _faxNumber; } 113 114 /// Sets the fax number. 115 void faxNumber(string newFaxNumber) 116 { 117 _faxNumber = newFaxNumber; 118 119 super.addField("faxNumber", _faxNumber); 120 } 121 122 /// Gets the member. 123 Organization[] member() { return _member; } 124 125 /// Sets the member. 126 void member(Organization[] newMember) 127 { 128 _member = newMember; 129 130 super.addField("member", _member); 131 } 132 133 /// Gets the alumni. 134 Person[] alumni() { return _alumni; } 135 136 /// Sets the alumni. 137 void alumni(Person[] newAlumni) 138 { 139 _alumni = newAlumni; 140 141 super.addField("alumni", _alumni); 142 } 143 144 /// Gets the telephone. 145 string telephone() { return _telephone; } 146 147 /// Sets the telephone. 148 void telephone(string newTelephone) 149 { 150 _telephone = newTelephone; 151 152 super.addField("telephone", _telephone); 153 } 154 155 /// Gets the sponsor. 156 Organization sponsor() { return _sponsor; } 157 158 /// Sets the sponsor. 159 void sponsor(Organization newSponsor) 160 { 161 _sponsor = newSponsor; 162 163 super.addField("sponsor", _sponsor); 164 } 165 166 /// Gets the address. 167 PostalAddress address() { return _address; } 168 169 /// Sets the address. 170 void address(PostalAddress newAddress) 171 { 172 _address = newAddress; 173 174 super.addField("address", _address); 175 } 176 177 /// Gets the logo. 178 string logo() { return _logo; } 179 180 /// Sets the logo. 181 void logo(string newLogo) 182 { 183 _logo = newLogo; 184 185 super.addField("logo", _logo); 186 } 187 188 /// Gets the description. 189 string description() { return _description; } 190 191 /// Sets the description. 192 void description(string newDescription) 193 { 194 _description = newDescription; 195 196 super.addField("description", _description); 197 } 198 } 199 } 200 } 201 }