1
2
3
4
5
6
7
8
9
10 package ch.panter.li.bi.asn.model;
11
12 import ch.panter.li.bi.asn.AsnTag;
13 import ch.panter.li.bi.asn.AsnValue;
14 import ch.panter.li.bi.util.ReadOnlyCollection;
15 import ch.panter.li.bi.util.NamedItem;
16
17
18 public interface AsnField extends NamedItem {
19
20 public AsnTag getTag();
21
22 public AsnType getType();
23
24 /**
25 @return true if the field is either marked OPTIONAL or a DEFAULT value was specified, false for
26 mandatory fields.
27 */
28 public boolean isOptional();
29
30 /**
31 @return true if a DEFAULT value was specified, false for mandatory fields or OPTIONAL fields
32 without a DEFAULT value.
33 */
34 public boolean hasDefaultValue();
35
36 /**
37 @return the DEFAULT value to use in case a value is missing. might be null.
38 */
39 public AsnValue getDefaultValue();
40
41 public boolean hasConstraints();
42
43 public ReadOnlyCollection<AsnConstraint> getConstraints();
44
45 }
46
47