View Javadoc

1   // -- FILE ------------------------------------------------------------------
2   // name       : AsnField.java
3   // project    : Panter: LI
4   // created    : lep - 2007.01.03
5   // language   : java
6   // environment: JDK 1.5.0
7   // copyright  : (c) 2006 by Panter llc, Switzerland
8   // license    : this is free software licensed under the GPL. see COPYING
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  } // interface AsnField
46  
47  // -- EOF -------------------------------------------------------------------