1: <?php
2: namespace Mapbender\WmtsBundle\Entity;
3:
4: use Doctrine\Common\Collections\ArrayCollection;
5: use Doctrine\ORM\EntityManager;
6: use Doctrine\ORM\Mapping as ORM;
7: use Mapbender\CoreBundle\Entity\Contact;
8: use Mapbender\CoreBundle\Entity\Keyword;
9: use Mapbender\CoreBundle\Entity\Source;
10:
11: /**
12: * Description of WmtsSource
13: *
14: * @ORM\Entity
15: * @ORM\Table(name="mb_wmts_wmtssource")
16: * ORM\DiscriminatorMap({"mb_wmts_wmssource" = "WmtsSource"})
17: */
18: class WmtsSource extends Source {
19:
20: /**
21: * @ORM\Column(type="string", nullable=true)
22: */
23: protected $version = "";
24:
25: /**
26: * @ORM\Column(type="string", nullable=true)
27: */
28: protected $fees = "";
29: /**
30: * @ORM\Column(type="string", nullable=true)
31: */
32: protected $originUrl;
33:
34: /**
35: * @ORM\Column(type="string",nullable=true)
36: */
37: protected $accessConstraints = "";
38:
39: /**
40: * @ORM\Column(type="text",nullable=true)
41: */
42: protected $serviceType = "";
43:
44: /**
45: * @ORM\OneToOne(targetEntity="Mapbender\CoreBundle\Entity\Contact", cascade={"persist","remove"})
46: */
47: protected $contact;
48:
49: // /**
50: // * @ORM\Column(type="string",nullable=true)
51: // */
52: // protected $serviceProviderSite = "";
53: // /**
54: // * @ORM\Column(type="string",nullable=true)
55: // */
56: // protected $serviceProviderName = "";
57: // /**
58: // * @ORM\Column(type="string",nullable=true)
59: // */
60: // protected $contactIndividualName = "";
61: //
62: // /**
63: // * @ORM\Column(type="string",nullable=true)
64: // */
65: // protected $contactPositionName = "";
66: //
67: // /**
68: // * @ORM\Column(type="string",nullable=true)
69: // */
70: // protected $contactPhoneVoice = "";
71: //
72: // /**
73: // * @ORM\Column(type="string",nullable=true)
74: // */
75: // protected $contactPhoneFacsimile = "";
76: //
77: // /**
78: // * @ORM\Column(type="string",nullable=true)
79: // */
80: // protected $contactAddressDeliveryPoint = "";
81: //
82: // /**
83: // * @ORM\Column(type="string",nullable=true)
84: // */
85: // protected $contactAddressCity = "";
86: //
87: // /**
88: // * @ORM\Column(type="string",nullable=true)
89: // */
90: // protected $contactAddressPostalCode = "";
91: //
92: // /**
93: // * @ORM\Column(type="string",nullable=true)
94: // */
95: // protected $contactAddressCountry = "";
96: //
97: // /**
98: // * @ORM\Column(type="string",nullable=true)
99: // */
100: // protected $contactElectronicMailAddress = "";
101: //
102: // /**
103: // * @ORM\Column(type="string",nullable=true)
104: // */
105: // protected $contactAddressAdministrativeArea = "";
106: //
107: // /**
108: // * @ORM\Column(type="string", nullable=true)
109: // */
110: // protected $requestGetCapabilitiesGETREST = "";
111: //
112: // /**
113: // * @ORM\Column(type="string", nullable=true)
114: // */
115: // protected $requestGetCapabilitiesGETKVP = "";
116: // /**
117: // * @ORM\Column(type="string", nullable=true)
118: // */
119: // protected $requestGetCapabilitiesPOST = "";
120: // /**
121: // * @ORM\Column(type="string", nullable=true)
122: // */
123: // protected $requestGetCapabilitiesPOSTSOAP = "";
124: // /**
125: // * @ORM\Column(type="string", nullable=true)
126: // */
127: // protected $requestGetTileGETREST = "";
128: // /**
129: // * @ORM\Column(type="string", nullable=true)
130: // */
131: // protected $requestGetTileGETKVP = "";
132: // /**
133: // * @ORM\Column(type="string", nullable=true)
134: // */
135: // protected $requestGetFeatureInfoGETREST = "";
136: // /**
137: // * @ORM\Column(type="string", nullable=true)
138: // */
139: // protected $requestGetFeatureInfoGETKVP = "";
140: //
141: // /**
142: // * @ORM\Column(type="array", nullable=true);
143: // */
144: // protected $theme = null;
145: //
146: // /**
147: // * @ORM\Column(type="array", nullable=true);
148: // */
149: // protected $tilematrixset = null;
150:
151: /**
152: * @ORM\Column(type="text", nullable=true);
153: */
154: protected $username = null;
155:
156: /**
157: * @ORM\Column(type="text", nullable=true);
158: */
159: protected $password = null;
160:
161: public function __construct(){
162: // $this->keywords = new ArrayCollection();
163: // $this->layers = new ArrayCollection();
164: // $this->exceptionFormats = array();
165: }
166:
167:
168:
169: public function getType(){
170: return "WMTS";
171: }
172:
173: public function getManagerType(){
174: return "wmts";
175: }
176:
177: public function getClassname(){
178: return "Mapbender\WmtsBundle\Entity\WmtsSource";
179: }
180:
181: /**
182: * Set version
183: *
184: * @param string $version
185: * @return WmtsSource
186: */
187: public function setVersion($version)
188: {
189: $this->version = $version;
190:
191: return $this;
192: }
193:
194: /**
195: * Get version
196: *
197: * @return string
198: */
199: public function getVersion()
200: {
201: return $this->version;
202: }
203:
204: /**
205: * Set fees
206: *
207: * @param string $fees
208: * @return WmtsSource
209: */
210: public function setFees($fees)
211: {
212: $this->fees = $fees;
213:
214: return $this;
215: }
216:
217: /**
218: * Get fees
219: *
220: * @return string
221: */
222: public function getFees()
223: {
224: return $this->fees;
225: }
226:
227: /**
228: * Set originUrl
229: *
230: * @param string $originUrl
231: * @return WmtsSource
232: */
233: public function setOriginUrl($originUrl)
234: {
235: $this->originUrl = $originUrl;
236:
237: return $this;
238: }
239:
240: /**
241: * Get originUrl
242: *
243: * @return string
244: */
245: public function getOriginUrl()
246: {
247: return $this->originUrl;
248: }
249:
250: /**
251: * Set accessConstraints
252: *
253: * @param string $accessConstraints
254: * @return WmtsSource
255: */
256: public function setAccessConstraints($accessConstraints)
257: {
258: $this->accessConstraints = $accessConstraints;
259:
260: return $this;
261: }
262:
263: /**
264: * Get accessConstraints
265: *
266: * @return string
267: */
268: public function getAccessConstraints()
269: {
270: return $this->accessConstraints;
271: }
272:
273: /**
274: * Set serviceType
275: *
276: * @param string $serviceType
277: * @return WmtsSource
278: */
279: public function setServiceType($serviceType)
280: {
281: $this->serviceType = $serviceType;
282:
283: return $this;
284: }
285:
286: /**
287: * Get serviceType
288: *
289: * @return string
290: */
291: public function getServiceType()
292: {
293: return $this->serviceType;
294: }
295:
296: /**
297: * Set username
298: *
299: * @param string $username
300: * @return WmtsSource
301: */
302: public function setUsername($username)
303: {
304: $this->username = $username;
305:
306: return $this;
307: }
308:
309: /**
310: * Get username
311: *
312: * @return string
313: */
314: public function getUsername()
315: {
316: return $this->username;
317: }
318:
319: /**
320: * Set password
321: *
322: * @param string $password
323: * @return WmtsSource
324: */
325: public function setPassword($password)
326: {
327: $this->password = $password;
328:
329: return $this;
330: }
331:
332: /**
333: * Get password
334: *
335: * @return string
336: */
337: public function getPassword()
338: {
339: return $this->password;
340: }
341:
342: /**
343: * Create a WmsInstace
344: */
345: public function createInstance(){
346: $instance = new WmtsInstance();
347: $instance->setWmtsSource($this);
348: $instance->setTitle($this->getTitle());
349: //@TODO ...
350: return $instance;
351: }
352:
353: /**
354: * @inheritdoc
355: */
356: public function remove(EntityManager $em)
357: {
358:
359: }
360: }