Example #1
0
  @Override
  public void encodeData(AsnOutputStream asnOs) throws MAPException {

    try {
      if (this.cgiList != null) {
        asnOs.writeTag(Tag.CLASS_CONTEXT_SPECIFIC, false, _ID_cgiList);
        int pos = asnOs.StartContentDefiniteLength();
        for (GlobalCellId globalCellId : this.cgiList) {
          ((GlobalCellIdImpl) globalCellId).encodeAll(asnOs);
        }
        asnOs.FinalizeContent(pos);
      }
      if (this.eUtranCgiList != null) {
        asnOs.writeTag(Tag.CLASS_CONTEXT_SPECIFIC, false, _ID_eUtranCgiList);
        int pos = asnOs.StartContentDefiniteLength();
        for (EUtranCgi eUtranCgi : this.eUtranCgiList) {
          ((EUtranCgiImpl) eUtranCgi).encodeAll(asnOs);
        }
        asnOs.FinalizeContent(pos);
      }
      if (this.routingAreaIdList != null) {
        asnOs.writeTag(Tag.CLASS_CONTEXT_SPECIFIC, false, _ID_routingAreaIdList);
        int pos = asnOs.StartContentDefiniteLength();
        for (RAIdentity raIdentity : this.routingAreaIdList) {
          ((RAIdentityImpl) raIdentity).encodeAll(asnOs);
        }
        asnOs.FinalizeContent(pos);
      }
      if (this.locationAreaIdList != null) {
        asnOs.writeTag(Tag.CLASS_CONTEXT_SPECIFIC, false, _ID_locationAreaIdList);
        int pos = asnOs.StartContentDefiniteLength();
        for (LAIFixedLength laiFixedLength : this.locationAreaIdList) {
          ((LAIFixedLengthImpl) laiFixedLength).encodeAll(asnOs);
        }
        asnOs.FinalizeContent(pos);
      }
      if (this.trackingAreaIdList != null) {
        asnOs.writeTag(Tag.CLASS_CONTEXT_SPECIFIC, false, _ID_trackingAreaIdList);
        int pos = asnOs.StartContentDefiniteLength();
        for (TAId taId : this.trackingAreaIdList) {
          ((TAIdImpl) taId).encodeAll(asnOs);
        }
        asnOs.FinalizeContent(pos);
      }

      if (this.extensionContainer != null)
        ((MAPExtensionContainerImpl) this.extensionContainer)
            .encodeAll(asnOs, Tag.CLASS_CONTEXT_SPECIFIC, _ID_extensionContainer);

    } catch (AsnException e) {
      throw new MAPException(
          "AsnException when encoding " + _PrimitiveName + ": " + e.getMessage(), e);
    }
  }