1   package hudsonfog.voc.system;
2   
3   import com.fogx.webdav.DavResource;
4   import com.fogx.webdav.DavClass;
5   import com.fogx.webdav.DavBean;
6   import com.fogx.webdav.DavProperty;
7   import static com.fogx.webdav.DavProperty.*;
8   import com.fogx.webdav.packages.DavBeanPackage;
9   import com.fogx.webdav.util.DavResourceSupport;
10  import com.fogx.webdav.util.UrlUtil;
11  import java.util.Date;
12  import java.util.Map;
13  import java.util.HashMap;
14  import java.util.List;
15  import java.util.Collections;
16  import java.util.Arrays;
17  
18  import hudsonfog.voc.system.primitiveTypes.*;
19  import hudsonfog.voc.system.XMLSchema.*;
20  
21  import hudsonfog.voc.system.fog.*;
22  
23  
24  public abstract class primitiveTypes {
25  
26    @DavClass._aLiteral
27    public static class pieces extends hudsonfog.voc.system.XMLSchema.intLiteral {
28      private Integer value;
29      public pieces(Integer value) {
30        this.value = value;
31      }
32  
33      public Integer getValue() {
34        return value;
35      }
36    }
37  
38    @DavClass._aLiteral
39    public static class years extends hudsonfog.voc.system.XMLSchema.intLiteral {
40      private Integer value;
41      public years(Integer value) {
42        this.value = value;
43      }
44  
45      public Integer getValue() {
46        return value;
47      }
48    }
49  
50    @DavClass._aLiteral
51    public static class months extends hudsonfog.voc.system.XMLSchema.intLiteral {
52      private Integer value;
53      public months(Integer value) {
54        this.value = value;
55      }
56  
57      public Integer getValue() {
58        return value;
59      }
60    }
61  
62    @DavClass._aLiteral
63    public static class weeks extends hudsonfog.voc.system.XMLSchema.intLiteral {
64      private Integer value;
65      public weeks(Integer value) {
66        this.value = value;
67      }
68  
69      public Integer getValue() {
70        return value;
71      }
72    }
73  
74    @DavClass._aLiteral
75    public static class days extends hudsonfog.voc.system.XMLSchema.intLiteral {
76      private Integer value;
77      public days(Integer value) {
78        this.value = value;
79      }
80  
81      public Integer getValue() {
82        return value;
83      }
84    }
85  
86    @DavClass._aLiteral
87    public static class hours extends hudsonfog.voc.system.XMLSchema.intLiteral {
88      private Integer value;
89      public hours(Integer value) {
90        this.value = value;
91      }
92  
93      public Integer getValue() {
94        return value;
95      }
96    }
97  
98    @DavClass._aLiteral
99    public static class minutes extends hudsonfog.voc.system.XMLSchema.intLiteral {
100     private Integer value;
101     public minutes(Integer value) {
102       this.value = value;
103     }
104 
105     public Integer getValue() {
106       return value;
107     }
108   }
109 
110   @DavClass._aLiteral
111   public static class seconds extends hudsonfog.voc.system.XMLSchema.intLiteral {
112     private Integer value;
113     public seconds(Integer value) {
114       this.value = value;
115     }
116 
117     public Integer getValue() {
118       return value;
119     }
120   }
121 
122   @DavClass._aLiteral
123   public static class milliseconds extends hudsonfog.voc.system.XMLSchema.intLiteral {
124     private Integer value;
125     public milliseconds(Integer value) {
126       this.value = value;
127     }
128 
129     public Integer getValue() {
130       return value;
131     }
132   }
133 
134   @DavClass._aLiteral
135   public static class fileSize extends hudsonfog.voc.system.XMLSchema.intLiteral {
136     private Integer value;
137     public fileSize(Integer value) {
138       this.value = value;
139     }
140 
141     public Integer getValue() {
142       return value;
143     }
144   }
145 
146   @DavClass._aLiteral
147   public static class birthday extends hudsonfog.voc.system.XMLSchema.dateLiteral {
148     private Long value;
149     public birthday(Long value) {
150       this.value = value;
151     }
152 
153     public Long getValue() {
154       return value;
155     }
156     public birthday(Date value) {
157       this.value = value.getTime();
158     }
159   }
160 
161   @DavClass._aLiteral
162   public static class age extends hudsonfog.voc.system.XMLSchema.dateLiteral {
163     private Long value;
164     public age(Long value) {
165       this.value = value;
166     }
167 
168     public Long getValue() {
169       return value;
170     }
171     public age(Date value) {
172       this.value = value.getTime();
173     }
174   }
175 
176   @DavClass._aLiteral
177   public static class year extends hudsonfog.voc.system.XMLSchema.dateLiteral {
178     private Long value;
179     public year(Long value) {
180       this.value = value;
181     }
182 
183     public Long getValue() {
184       return value;
185     }
186     public year(Date value) {
187       this.value = value.getTime();
188     }
189   }
190 
191   @DavClass._aLiteral
192   public static class yearMonth extends hudsonfog.voc.system.XMLSchema.dateLiteral {
193     private Long value;
194     public yearMonth(Long value) {
195       this.value = value;
196     }
197 
198     public Long getValue() {
199       return value;
200     }
201     public yearMonth(Date value) {
202       this.value = value.getTime();
203     }
204   }
205 
206   @DavClass._aLiteral
207   public static class yearMonthDay extends hudsonfog.voc.system.XMLSchema.dateLiteral {
208     private Long value;
209     public yearMonthDay(Long value) {
210       this.value = value;
211     }
212 
213     public Long getValue() {
214       return value;
215     }
216     public yearMonthDay(Date value) {
217       this.value = value.getTime();
218     }
219   }
220 
221   @DavClass._aLiteral
222   public static class sec extends hudsonfog.voc.system.XMLSchema.intLiteral {
223     private Integer value;
224     public sec(Integer value) {
225       this.value = value;
226     }
227 
228     public Integer getValue() {
229       return value;
230     }
231   }
232 
233   @DavClass._aLiteral
234   public static class dateTime extends hudsonfog.voc.system.XMLSchema.dateLiteral {
235     private Long value;
236     public dateTime(Long value) {
237       this.value = value;
238     }
239 
240     public Long getValue() {
241       return value;
242     }
243     public dateTime(Date value) {
244       this.value = value.getTime();
245     }
246   }
247 
248   @DavClass._aLiteral
249   public static class monthPeriod extends hudsonfog.voc.system.XMLSchema.dateLiteral {
250     private Long value;
251     public monthPeriod(Long value) {
252       this.value = value;
253     }
254 
255     public Long getValue() {
256       return value;
257     }
258     public monthPeriod(Date value) {
259       this.value = value.getTime();
260     }
261   }
262 
263   @DavClass._aLiteral
264   public static class quarterPeriod extends hudsonfog.voc.system.XMLSchema.dateLiteral {
265     private Long value;
266     public quarterPeriod(Long value) {
267       this.value = value;
268     }
269 
270     public Long getValue() {
271       return value;
272     }
273     public quarterPeriod(Date value) {
274       this.value = value.getTime();
275     }
276   }
277 
278   @DavClass._aLiteral
279   public static class monthDay extends hudsonfog.voc.system.XMLSchema.dateLiteral {
280     private Long value;
281     public monthDay(Long value) {
282       this.value = value;
283     }
284 
285     public Long getValue() {
286       return value;
287     }
288     public monthDay(Date value) {
289       this.value = value.getTime();
290     }
291   }
292 
293   @DavClass._aLiteral
294   public static class week extends hudsonfog.voc.system.XMLSchema.dateLiteral {
295     private Long value;
296     public week(Long value) {
297       this.value = value;
298     }
299 
300     public Long getValue() {
301       return value;
302     }
303     public week(Date value) {
304       this.value = value.getTime();
305     }
306   }
307 
308   @DavClass._aLiteral
309   public static class expirationDate extends hudsonfog.voc.system.XMLSchema.dateLiteral {
310     private Long value;
311     public expirationDate(Long value) {
312       this.value = value;
313     }
314 
315     public Long getValue() {
316       return value;
317     }
318     public expirationDate(Date value) {
319       this.value = value.getTime();
320     }
321   }
322 
323   @DavClass._aLiteral
324   public static class time1 extends hudsonfog.voc.system.XMLSchema.dateLiteral {
325     private Long value;
326     public time1(Long value) {
327       this.value = value;
328     }
329 
330     public Long getValue() {
331       return value;
332     }
333     public time1(Date value) {
334       this.value = value.getTime();
335     }
336   }
337 
338   @DavClass._aLiteral
339   public static class ipAddress extends hudsonfog.voc.system.XMLSchema.stringLiteral {
340     private String value;
341     public ipAddress(String value) {
342       this.value = value;
343     }
344 
345     public String getValue() {
346       return value;
347     }
348   }
349 
350   @DavClass._aLiteral
351   public static class emailAddress extends hudsonfog.voc.system.XMLSchema.stringLiteral {
352     private String value;
353     public emailAddress(String value) {
354       this.value = value;
355     }
356 
357     public String getValue() {
358       return value;
359     }
360   }
361 
362   @DavClass._aLiteral
363   public static class phone extends hudsonfog.voc.system.XMLSchema.stringLiteral {
364     private String value;
365     public phone(String value) {
366       this.value = value;
367     }
368 
369     public String getValue() {
370       return value;
371     }
372   }
373 
374   @DavClass._aLiteral
375   public static class mobilePhone extends hudsonfog.voc.system.XMLSchema.stringLiteral {
376     private String value;
377     public mobilePhone(String value) {
378       this.value = value;
379     }
380 
381     public String getValue() {
382       return value;
383     }
384   }
385 
386   @DavClass._aLiteral
387   public static class password extends hudsonfog.voc.system.XMLSchema.stringLiteral {
388     private String value;
389     public password(String value) {
390       this.value = value;
391     }
392 
393     public String getValue() {
394       return value;
395     }
396   }
397 
398   @DavClass._aLiteral
399   public static class href extends hudsonfog.voc.system.XMLSchema.stringLiteral {
400     private String value;
401     public href(String value) {
402       this.value = value;
403     }
404 
405     public String getValue() {
406       return value;
407     }
408   }
409 
410   @DavClass._aLiteral
411   public static class tags extends hudsonfog.voc.system.XMLSchema.stringLiteral {
412     private String value;
413     public tags(String value) {
414       this.value = value;
415     }
416 
417     public String getValue() {
418       return value;
419     }
420   }
421 
422   @DavClass._aLiteral
423   public static class list extends hudsonfog.voc.system.XMLSchema.stringLiteral {
424     private String value;
425     public list(String value) {
426       this.value = value;
427     }
428 
429     public String getValue() {
430       return value;
431     }
432   }
433 
434   @DavClass._aLiteral
435   public static class time extends hudsonfog.voc.system.XMLSchema.stringLiteral {
436     private String value;
437     public time(String value) {
438       this.value = value;
439     }
440 
441     public String getValue() {
442       return value;
443     }
444   }
445 
446   @DavClass._aLiteral
447   public static class styleSheet extends hudsonfog.voc.system.XMLSchema.stringLiteral {
448     private String value;
449     public styleSheet(String value) {
450       this.value = value;
451     }
452 
453     public String getValue() {
454       return value;
455     }
456   }
457 
458   @DavClass._aLiteral
459   public static class creditCardNumber extends hudsonfog.voc.system.XMLSchema.stringLiteral {
460     private String value;
461     public creditCardNumber(String value) {
462       this.value = value;
463     }
464 
465     public String getValue() {
466       return value;
467     }
468   }
469 
470   @DavClass._aLiteral
471   public static class fixedColor extends hudsonfog.voc.system.XMLSchema.intLiteral {
472     private Integer value;
473     public fixedColor(Integer value) {
474       this.value = value;
475     }
476 
477     public Integer getValue() {
478       return value;
479     }
480   }
481 
482   @DavClass._aLiteral
483   public static class longString extends hudsonfog.voc.system.XMLSchema.stringLiteral {
484     private String value;
485     public longString(String value) {
486       this.value = value;
487     }
488 
489     public String getValue() {
490       return value;
491     }
492   }
493 
494   @DavClass._aLiteral
495   public static class modificationDelta extends longString {
496     public modificationDelta(String value) {
497       super(value);
498     }
499   }
500 
501   @DavClass._aLiteral
502   public static class mapLink extends hudsonfog.voc.system.XMLSchema.stringLiteral {
503     private String value;
504     public mapLink(String value) {
505       this.value = value;
506     }
507 
508     public String getValue() {
509       return value;
510     }
511   }
512 
513   @DavClass._largeIcon("icons/classes/Duration-large.gif")
514   @DavClass._icon("icons/classes/Duration.gif")
515   @DavClass._alwaysInlined
516   public static class Duration {
517          @_mainValue
518       @k public Integer                       seconds;
519          public DurationType                  durationType;
520   }
521 
522   public static enum DurationType {
523     @_label("minute(s)") minute_s_, @_label("hour(s)") hour_s_, @_label("day(s)") day_s_, @_label("week(s)") week_s_, @_label("month(s)") month_s_, @_label("year(s)") year_s_;
524   }
525 
526   public static enum Durations {
527     @_label("60") _60, @_label("3600") _3600, @_label("86400") _86400, @_label("604800") _604800, @_label("2628288") _2628288, @_label("3153600") _3153600;
528   }
529 
530   @DavClass._aLiteral
531   public static class Unit extends hudsonfog.voc.system.XMLSchema.floatLiteral {
532     private Float value;
533     public Unit(Float value) {
534       this.value = value;
535     }
536 
537     public Float getValue() {
538       return value;
539     }
540   }
541 
542   @DavClass._imperialUnit("%")
543   @DavClass._metricToImperialCoef((float)1)
544   @DavClass._unitOfMeasure
545   @DavClass._aLiteral
546   @DavClass._metricUnit("%")
547   public static class Percent extends hudsonfog.voc.system.XMLSchema.floatLiteral {
548     private Float value;
549     public Percent(Float value) {
550       this.value = value;
551     }
552 
553     public Float getValue() {
554       return value;
555     }
556   }
557 
558   @DavClass._imperialUnit("yard")
559   @DavClass._metricToImperialCoef((float)1.0936)
560   @DavClass._aLiteral
561   @DavClass._unitOfMeasure
562   @DavClass._metricUnit("m")
563   public static class m extends hudsonfog.voc.system.XMLSchema.floatLiteral {
564     private Float value;
565     public m(Float value) {
566       this.value = value;
567     }
568 
569     public Float getValue() {
570       return value;
571     }
572   }
573 
574   @DavClass._imperialUnit("mile")
575   @DavClass._metricToImperialCoef((float)0.6214)
576   @DavClass._unitOfMeasure
577   @DavClass._aLiteral
578   @DavClass._metricUnit("km")
579   public static class km extends hudsonfog.voc.system.XMLSchema.floatLiteral {
580     private Float value;
581     public km(Float value) {
582       this.value = value;
583     }
584 
585     public Float getValue() {
586       return value;
587     }
588   }
589 
590   @DavClass._imperialUnit("sq. ft.")
591   @DavClass._metricToImperialCoef((float)10.7639)
592   @DavClass._unitOfMeasure
593   @DavClass._aLiteral
594   @DavClass._metricUnit("m2")
595   public static class m2 extends hudsonfog.voc.system.XMLSchema.floatLiteral {
596     private Float value;
597     public m2(Float value) {
598       this.value = value;
599     }
600 
601     public Float getValue() {
602       return value;
603     }
604   }
605 
606   @DavClass._imperialUnit("lb/ft2")
607   @DavClass._metricToImperialCoef((float)0.002048)
608   @DavClass._unitOfMeasure
609   @DavClass._aLiteral
610   @DavClass._metricUnit("g/m2")
611   public static class g_m2 extends hudsonfog.voc.system.XMLSchema.floatLiteral {
612     private Float value;
613     public g_m2(Float value) {
614       this.value = value;
615     }
616 
617     public Float getValue() {
618       return value;
619     }
620   }
621 
622   @DavClass._imperialUnit("in")
623   @DavClass._metricToImperialCoef((float)0.03937)
624   @DavClass._unitOfMeasure
625   @DavClass._aLiteral
626   @DavClass._metricUnit("mm")
627   public static class mm extends hudsonfog.voc.system.XMLSchema.floatLiteral {
628     private Float value;
629     public mm(Float value) {
630       this.value = value;
631     }
632 
633     public Float getValue() {
634       return value;
635     }
636   }
637 
638   @DavClass._imperialUnit("short ton")
639   @DavClass._metricToImperialCoef((float)1.10231)
640   @DavClass._unitOfMeasure
641   @DavClass._aLiteral
642   @DavClass._metricUnit("mt")
643   public static class ton extends hudsonfog.voc.system.XMLSchema.floatLiteral {
644     private Float value;
645     public ton(Float value) {
646       this.value = value;
647     }
648 
649     public Float getValue() {
650       return value;
651     }
652   }
653 
654   @DavClass._imperialUnit("lbf")
655   @DavClass._metricToImperialCoef((float)0.2248)
656   @DavClass._unitOfMeasure
657   @DavClass._aLiteral
658   @DavClass._metricUnit("N")
659   public static class N extends hudsonfog.voc.system.XMLSchema.floatLiteral {
660     private Float value;
661     public N(Float value) {
662       this.value = value;
663     }
664 
665     public Float getValue() {
666       return value;
667     }
668   }
669 
670   @DavClass._imperialUnit("lbf")
671   @DavClass._metricToImperialCoef((float)0.0002248)
672   @DavClass._aLiteral
673   @DavClass._unitOfMeasure
674   @DavClass._metricUnit("mN")
675   public static class mN extends hudsonfog.voc.system.XMLSchema.floatLiteral {
676     private Float value;
677     public mN(Float value) {
678       this.value = value;
679     }
680 
681     public Float getValue() {
682       return value;
683     }
684   }
685 
686   @DavClass._imperialUnit("ft lb")
687   @DavClass._metricToImperialCoef((float)1.3563)
688   @DavClass._unitOfMeasure
689   @DavClass._aLiteral
690   @DavClass._metricUnit("J")
691   public static class J extends hudsonfog.voc.system.XMLSchema.floatLiteral {
692     private Float value;
693     public J(Float value) {
694       this.value = value;
695     }
696 
697     public Float getValue() {
698       return value;
699     }
700   }
701 
702   @DavClass._imperialUnit("in")
703   @DavClass._metricToImperialCoef((float)0.3937)
704   @DavClass._aLiteral
705   @DavClass._unitOfMeasure
706   @DavClass._metricUnit("cm")
707   public static class cm extends hudsonfog.voc.system.XMLSchema.floatLiteral {
708     private Float value;
709     public cm(Float value) {
710       this.value = value;
711     }
712 
713     public Float getValue() {
714       return value;
715     }
716   }
717 
718   @DavClass._imperialUnit("pt")
719   @DavClass._metricToImperialCoef((float)1)
720   @DavClass._unitOfMeasure
721   @DavClass._aLiteral
722   @DavClass._metricUnit("pt")
723   public static class pt extends hudsonfog.voc.system.XMLSchema.floatLiteral {
724     private Float value;
725     public pt(Float value) {
726       this.value = value;
727     }
728 
729     public Float getValue() {
730       return value;
731     }
732   }
733 
734   @DavClass._imperialUnit("yard/min")
735   @DavClass._metricToImperialCoef((float)1.0936)
736   @DavClass._unitOfMeasure
737   @DavClass._aLiteral
738   @DavClass._metricUnit("m/min")
739   public static class m_min extends hudsonfog.voc.system.XMLSchema.floatLiteral {
740     private Float value;
741     public m_min(Float value) {
742       this.value = value;
743     }
744 
745     public Float getValue() {
746       return value;
747     }
748   }
749 
750   @DavClass._imperialUnit("lb")
751   @DavClass._metricToImperialCoef((float)2.205)
752   @DavClass._unitOfMeasure
753   @DavClass._aLiteral
754   @DavClass._metricUnit("kg")
755   public static class kg extends hudsonfog.voc.system.XMLSchema.floatLiteral {
756     private Float value;
757     public kg(Float value) {
758       this.value = value;
759     }
760 
761     public Float getValue() {
762       return value;
763     }
764   }
765 
766   @DavClass._imperialUnit("gsm")
767   @DavClass._metricToImperialCoef((float)1)
768   @DavClass._unitOfMeasure
769   @DavClass._aLiteral
770   @DavClass._metricUnit("gsm")
771   public static class gsm extends hudsonfog.voc.system.XMLSchema.floatLiteral {
772     private Float value;
773     public gsm(Float value) {
774       this.value = value;
775     }
776 
777     public Float getValue() {
778       return value;
779     }
780   }
781 
782   @DavClass._imperialUnit("lb/ft2")
783   @DavClass._metricToImperialCoef((float)0.2048)
784   @DavClass._unitOfMeasure
785   @DavClass._aLiteral
786   @DavClass._metricUnit("mPa")
787   public static class mPa extends hudsonfog.voc.system.XMLSchema.floatLiteral {
788     private Float value;
789     public mPa(Float value) {
790       this.value = value;
791     }
792 
793     public Float getValue() {
794       return value;
795     }
796   }
797 
798   @DavClass._imperialUnit("lb/ft2")
799   @DavClass._metricToImperialCoef((float)204.8)
800   @DavClass._unitOfMeasure
801   @DavClass._aLiteral
802   @DavClass._metricUnit("kPa")
803   public static class kPa extends hudsonfog.voc.system.XMLSchema.floatLiteral {
804     private Float value;
805     public kPa(Float value) {
806       this.value = value;
807     }
808 
809     public Float getValue() {
810       return value;
811     }
812   }
813 
814   @DavClass._imperialUnit("in3")
815   @DavClass._metricToImperialCoef((float)0.06103)
816   @DavClass._unitOfMeasure
817   @DavClass._aLiteral
818   @DavClass._metricUnit("ml")
819   public static class ml extends hudsonfog.voc.system.XMLSchema.floatLiteral {
820     private Float value;
821     public ml(Float value) {
822       this.value = value;
823     }
824 
825     public Float getValue() {
826       return value;
827     }
828   }
829 
830   @DavClass._imperialUnit("in3")
831   @DavClass._metricToImperialCoef((float)0.06103)
832   @DavClass._unitOfMeasure
833   @DavClass._aLiteral
834   @DavClass._metricUnit("cm3")
835   public static class cm3 extends hudsonfog.voc.system.XMLSchema.floatLiteral {
836     private Float value;
837     public cm3(Float value) {
838       this.value = value;
839     }
840 
841     public Float getValue() {
842       return value;
843     }
844   }
845 }
846