NCCOOS Trac Projects: Top | Web | Platforms | Processing | Viz | Sprints | Sandbox | (Wind)

root/RiceInventory/trunk/RiceInventory/RiceInventory/Platform.py

Revision 26 (checked in by cbc, 15 years ago)

Initial import of RiceInventory?.

  • Property svn:eol-style set to native
Line 
1 # -*- coding: utf-8 -*-
2 #
3 # File: Platform.py
4 #
5 # Copyright (c) 2009 by []
6 # Generator: ArchGenXML Version 2.4.1
7 #            http://plone.org/products/archgenxml
8 #
9 # GNU General Public License (GPL)
10 #
11
12 __author__ = """unknown <unknown>"""
13 __docformat__ = 'plaintext'
14
15 from AccessControl import ClassSecurityInfo
16 from Products.Archetypes.atapi import *
17 from zope.interface import implements
18 import interfaces
19
20 from Products.CMFDynamicViewFTI.browserdefault import BrowserDefaultMixin
21
22 from Products.RiceInventory.config import *
23
24 ##code-section module-header #fill in your manual code here
25 ##/code-section module-header
26
27 schema = Schema((
28
29     StringField(
30         name='responsibleOwner',
31         widget=StringField._properties['widget'](
32             label='Responsibleowner',
33             label_msgid='RiceInventory_label_responsibleOwner',
34             i18n_domain='RiceInventory',
35         ),
36         required=1,
37         label="Responsible Owner",
38     ),
39     StringField(
40         name='associatedEntities',
41         widget=StringField._properties['widget'](
42             label='Associatedentities',
43             label_msgid='RiceInventory_label_associatedEntities',
44             i18n_domain='RiceInventory',
45         ),
46     ),
47     StringField(
48         name='platformType',
49         widget=StringField._properties['widget'](
50             label='Platformtype',
51             label_msgid='RiceInventory_label_platformType',
52             i18n_domain='RiceInventory',
53         ),
54     ),
55     StringField(
56         name='deploymentContactName',
57         widget=StringField._properties['widget'](
58             label='Deploymentcontactname',
59             label_msgid='RiceInventory_label_deploymentContactName',
60             i18n_domain='RiceInventory',
61         ),
62         schemata="Contacts",
63     ),
64     StringField(
65         name='deploymentContactPhone',
66         widget=StringField._properties['widget'](
67             label='Deploymentcontactphone',
68             label_msgid='RiceInventory_label_deploymentContactPhone',
69             i18n_domain='RiceInventory',
70         ),
71         schemata="Contacts",
72     ),
73     StringField(
74         name='deploymentContactEmail',
75         widget=StringField._properties['widget'](
76             label='Deploymentcontactemail',
77             label_msgid='RiceInventory_label_deploymentContactEmail',
78             i18n_domain='RiceInventory',
79         ),
80         schemata="Contacts",
81     ),
82     StringField(
83         name='dataContactName',
84         widget=StringField._properties['widget'](
85             label='Datacontactname',
86             label_msgid='RiceInventory_label_dataContactName',
87             i18n_domain='RiceInventory',
88         ),
89         schemata="Contacts",
90     ),
91     StringField(
92         name='dataContactPhone',
93         widget=StringField._properties['widget'](
94             label='Datacontactphone',
95             label_msgid='RiceInventory_label_dataContactPhone',
96             i18n_domain='RiceInventory',
97         ),
98         schemata="Contacts",
99     ),
100     StringField(
101         name='dataContactEmail',
102         widget=StringField._properties['widget'](
103             label='Datacontactemail',
104             label_msgid='RiceInventory_label_dataContactEmail',
105             i18n_domain='RiceInventory',
106         ),
107         schemata="Contacts",
108     ),
109     StringField(
110         name='platformStatus',
111         widget=StringField._properties['widget'](
112             label='Platformstatus',
113             label_msgid='RiceInventory_label_platformStatus',
114             i18n_domain='RiceInventory',
115         ),
116         required=1,
117         schemata="Dates",
118     ),
119     DateTimeField(
120         name='deploymentStart',
121         widget=DateTimeField._properties['widget'](
122             label='Deploymentstart',
123             label_msgid='RiceInventory_label_deploymentStart',
124             i18n_domain='RiceInventory',
125         ),
126         schemata="Dates",
127     ),
128     DateTimeField(
129         name='deploymentEnd',
130         widget=DateTimeField._properties['widget'](
131             label='Deploymentend',
132             label_msgid='RiceInventory_label_deploymentEnd',
133             i18n_domain='RiceInventory',
134         ),
135         schemata="Dates",
136     ),
137     TextField(
138         name='endReason',
139         widget=TextAreaWidget(
140             label='Endreason',
141             label_msgid='RiceInventory_label_endReason',
142             i18n_domain='RiceInventory',
143         ),
144         schemata="Dates",
145     ),
146     StringField(
147         name='locationDescription',
148         widget=StringField._properties['widget'](
149             label='Locationdescription',
150             label_msgid='RiceInventory_label_locationDescription',
151             i18n_domain='RiceInventory',
152         ),
153         schemata="Location",
154     ),
155     FloatField(
156         name='latitude',
157         widget=FloatField._properties['widget'](
158             label='Latitude',
159             label_msgid='RiceInventory_label_latitude',
160             i18n_domain='RiceInventory',
161         ),
162         schemata="Location",
163     ),
164     FloatField(
165         name='longitude',
166         widget=FloatField._properties['widget'](
167             label='Longitude',
168             label_msgid='RiceInventory_label_longitude',
169             i18n_domain='RiceInventory',
170         ),
171         schemata="Location",
172     ),
173     FloatField(
174         name='elevation',
175         widget=FloatField._properties['widget'](
176             label='Elevation',
177             label_msgid='RiceInventory_label_elevation',
178             i18n_domain='RiceInventory',
179         ),
180         schemata="Location",
181     ),
182     BooleanField(
183         name='nearRealTime',
184         widget=BooleanField._properties['widget'](
185             label='Nearrealtime',
186             label_msgid='RiceInventory_label_nearRealTime',
187             i18n_domain='RiceInventory',
188         ),
189         schemata="Data",
190     ),
191     StringField(
192         name='dataURL',
193         widget=StringField._properties['widget'](
194             label='Dataurl',
195             label_msgid='RiceInventory_label_dataURL',
196             i18n_domain='RiceInventory',
197         ),
198         schemata="Data",
199     ),
200     LinesField(
201         name='observedVariables',
202         widget=MultiSelectionWidget(
203             label='Observedvariables',
204             label_msgid='RiceInventory_label_observedVariables',
205             i18n_domain='RiceInventory',
206         ),
207         schemata="Data",
208         multiValued=1,
209     ),
210     LinesField(
211         name='intendedAudience',
212         widget=LinesField._properties['widget'](
213             label='Intendedaudience',
214             label_msgid='RiceInventory_label_intendedAudience',
215             i18n_domain='RiceInventory',
216         ),
217         schemata="Usage",
218     ),
219     BooleanField(
220         name='multipurpose',
221         widget=BooleanField._properties['widget'](
222             label='Multipurpose',
223             label_msgid='RiceInventory_label_multipurpose',
224             i18n_domain='RiceInventory',
225         ),
226         schemata="Usage",
227     ),
228     BooleanField(
229         name='relocatable',
230         widget=BooleanField._properties['widget'](
231             label='Relocatable',
232             label_msgid='RiceInventory_label_relocatable',
233             i18n_domain='RiceInventory',
234         ),
235         schemata="Usage",
236     ),
237     BooleanField(
238         name='expandable',
239         widget=BooleanField._properties['widget'](
240             label='Expandable',
241             label_msgid='RiceInventory_label_expandable',
242             i18n_domain='RiceInventory',
243         ),
244         schemata="Usage",
245     ),
246     LinesField(
247         name='associatedModels',
248         widget=MultiSelectionWidget(
249             label='Associatedmodels',
250             label_msgid='RiceInventory_label_associatedModels',
251             i18n_domain='RiceInventory',
252         ),
253         schemata="Usage",
254         multiValued=1,
255     ),
256     LinesField(
257         name='associatedApplications',
258         widget=MultiSelectionWidget(
259             label='Associatedapplications',
260             label_msgid='RiceInventory_label_associatedApplications',
261             i18n_domain='RiceInventory',
262         ),
263         schemata="Usage",
264         multiValued=1,
265     ),
266     StringField(
267         name='funding',
268         widget=StringField._properties['widget'](
269             label='Funding',
270             label_msgid='RiceInventory_label_funding',
271             i18n_domain='RiceInventory',
272         ),
273         schemata="Costs",
274     ),
275     FloatField(
276         name='initialPurchaseCost',
277         widget=FloatField._properties['widget'](
278             label='Initialpurchasecost',
279             label_msgid='RiceInventory_label_initialPurchaseCost',
280             i18n_domain='RiceInventory',
281         ),
282         schemata="Costs",
283     ),
284     FloatField(
285         name='initialDeploymentCost',
286         widget=FloatField._properties['widget'](
287             label='Initialdeploymentcost',
288             label_msgid='RiceInventory_label_initialDeploymentCost',
289             i18n_domain='RiceInventory',
290         ),
291         schemata="Costs",
292     ),
293     FloatField(
294         name='annualPersonnelCost',
295         widget=FloatField._properties['widget'](
296             label='Annualpersonnelcost',
297             label_msgid='RiceInventory_label_annualPersonnelCost',
298             i18n_domain='RiceInventory',
299         ),
300         schemata="Costs",
301     ),
302     FloatField(
303         name='annualNonPersonnelCost',
304         widget=FloatField._properties['widget'](
305             label='Annualnonpersonnelcost',
306             label_msgid='RiceInventory_label_annualNonPersonnelCost',
307             i18n_domain='RiceInventory',
308         ),
309         schemata="Costs",
310     ),
311
312 ),
313 )
314
315 ##code-section after-local-schema #fill in your manual code here
316 ##/code-section after-local-schema
317
318 Platform_schema = BaseSchema.copy() + \
319     schema.copy()
320
321 ##code-section after-schema #fill in your manual code here
322 ##/code-section after-schema
323
324 class Platform(BaseContent, BrowserDefaultMixin):
325     """
326     """
327     security = ClassSecurityInfo()
328
329     implements(interfaces.IPlatform)
330
331     meta_type = 'Platform'
332     _at_rename_after_creation = True
333
334     schema = Platform_schema
335
336     ##code-section class-header #fill in your manual code here
337     ##/code-section class-header
338
339     # Methods
340 def modify_fti(fti):
341     # Hide unnecessary tabs (usability enhancement)
342     for a in fti['actions']:
343         if a['id'] in ['metadata']:
344             a['visible'] = 0
345     return fti
346
347 registerType(Platform, PROJECTNAME)
348 # end of class Platform
349
350 ##code-section module-footer #fill in your manual code here
351 ##/code-section module-footer
352
353
354
Note: See TracBrowser for help on using the browser.