OSDN Git Service

4faf044828a3f07786a8b8fd9aa248bfb7eb7bf0
[bm-asn1/bm-asn1.git] / jp / bitmeister / asn1 / sample / FrightStatusTypes.java
1 /*
2  * Copyright 2011-2012 BitMeister Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 package jp.bitmeister.asn1.sample;
17
18 import java.math.BigInteger;
19
20 import jp.bitmeister.asn1.annotation.ASN1Alternative;
21 import jp.bitmeister.asn1.annotation.ASN1DefinedTypes;
22 import jp.bitmeister.asn1.annotation.ASN1Element;
23 import jp.bitmeister.asn1.annotation.ASN1Enumeration;
24 import jp.bitmeister.asn1.annotation.ASN1Extendable;
25 import jp.bitmeister.asn1.annotation.ASN1ModuleTags;
26 import jp.bitmeister.asn1.annotation.ASN1Tag;
27 import jp.bitmeister.asn1.type.ASN1Module;
28 import jp.bitmeister.asn1.type.ASN1TagClass;
29 import jp.bitmeister.asn1.type.ASN1TagDefault;
30 import jp.bitmeister.asn1.type.ASN1TagMode;
31 import jp.bitmeister.asn1.type.ASN1Type;
32 import jp.bitmeister.asn1.type.builtin.CHOICE;
33 import jp.bitmeister.asn1.type.builtin.ENUMERATED;
34 import jp.bitmeister.asn1.type.builtin.INTEGER;
35 import jp.bitmeister.asn1.type.builtin.NULL;
36 import jp.bitmeister.asn1.type.builtin.SEQUENCE;
37 import jp.bitmeister.asn1.type.builtin.SEQUENCE_OF;
38 import jp.bitmeister.asn1.type.useful.PrintableString;
39 import jp.bitmeister.asn1.type.useful.UTCTime;
40
41 @ASN1ModuleTags(ASN1TagDefault.AUTOMATIC_TAGS)
42 @ASN1DefinedTypes(FrightStatus.class)
43 public class FrightStatusTypes extends ASN1Module {
44
45         public static class FrightNumber extends PrintableString {
46
47                 public FrightNumber() {
48                         super();
49                 }
50
51                 public FrightNumber(String value) {
52                         super(value);
53                 }
54         }
55
56         public static class Airport extends ENUMERATED {
57
58                 @ASN1Enumeration
59                 public static final int tokyo = 0;
60
61                 @ASN1Enumeration
62                 public static final int osaka = 1;
63
64                 @ASN1Enumeration
65                 public static final int nagoya = 2;
66
67                 @ASN1Enumeration
68                 public static final int fukuoka = 3;
69
70                 public Airport() {
71                 }
72
73                 public Airport(BigInteger value) {
74                         super(value);
75                 }
76
77                 public Airport(long value) {
78                         super(value);
79                 }
80
81         }
82         
83         @ASN1Extendable
84         public static class AbstractSequence extends SEQUENCE {
85                 
86                 
87                 
88         }
89
90         public static class Information extends AbstractSequence {
91
92                 @ASN1Element(0)
93                 public Airport airport;
94
95                 @ASN1Element(1)
96                 public UTCTime scheduled;
97
98                 @ASN1Element(value = 2, optional = true)
99                 public UTCTime actual;
100
101                 public Information() {
102                 }
103
104                 public Information(Airport airport, UTCTime scheduled,
105                                 UTCTime actual) {
106                         super();
107                         this.airport = airport;
108                         this.scheduled = scheduled;
109                         this.actual = actual;
110                 }
111
112         }
113
114         public static class Status extends CHOICE {
115
116                 @ASN1Alternative(0)
117                 public NULL onTime;
118
119                 @ASN1Alternative(1)
120                 public INTEGER delay;
121
122                 public Status() {
123                 }
124
125                 public Status(ASN1TagClass tagClass, int tagNumber, ASN1Type data) {
126                         super(tagClass, tagNumber, data);
127                 }
128
129                 public Status(ASN1Type data) {
130                         super(data);
131                 }
132
133         }
134         
135         @ASN1Tag(value = 1, tagClass = ASN1TagClass.APPLICATION, tagMode = ASN1TagMode.IMPLICIT)
136         public static class AllFrights extends SEQUENCE_OF<FrightStatus> {
137
138                 public AllFrights() {
139                         super(FrightStatus.class);
140                 }
141
142                 public AllFrights(FrightStatus... components) {
143                         super(FrightStatus.class, components);
144                 }
145
146         }
147         
148 }