Package com.oss.asn1

Interface IndexProcedure

public interface IndexProcedure
When the protocol definition extensively uses information object sets, an application might need a better way to index such a large number of information object sets rather than explicit invocation of indexByXXX method per each individual information object set. This interface defines a default indexing procedure that is automatically applied to every instance of information object set of a particular class. In order to activate automatic indexing you develop the class that implements this interface and associate it with the corresponding class of information object sets. For example, having:
     &id ProtocolIE-ID UNIQUE,
     &criticality Criticality,
     &presence Presence
 CommonTransportChannelSetupRequestFDD-IEs NBAP-PROTOCOL-IES ::= ...
 CommonTransportChannelSetupRequestTDD-IEs NBAP-PROTOCOL-IES ::= ...
 ... (another 143 information object sets of this class)
 ErrorIndication-IEs NBAP-PROTOCOL-IES ::= ...
you enable automatic indexing for all these 146 information object sets as follows:
     new IndexProcedure() {
         public Index create(IndexedInfoObjectSet oset) {
             // Do not index information object sets that are empty
             // or contain just a few elements.
             if (oset.getSize() > 2) {
                 Index index = new DefaultIndex() {
                     public int mapKey(AbstractData key) {
                          ProtocolIE_ID id = (ProtocolIE_ID)key;
                          return id.intValue();
                 NBAP_PROTOCOL_IES_OSET oset_ies =
                 if (oset_ies.indexById(index))
                     return oset_ies.getIndex();
             return null;
After the invocation of the setIndexProcedure all instances of the NBAP_PROTOCOL_IES_OSET will be automatically indexed right after the information object set is instantiated.
ASN.1/Java 1.4-beta C
  • Method Summary

    Modifier and Type
    Create the index for the indexed information object set.
  • Method Details

    • create

      Create the index for the indexed information object set. Whenever the IndexProcedure is associated with the particular subclass of IndexedInfoObjectSet, this method is automatically invoked by the constructor to index the information object set.
      ios - the information object set to index.
      the index created or null if the information object set cannot be indexed.