for (i=env.getAllProperties();i.hasNext();) {
encodeProp(sb,(Property)i.next());
}
//Create tag received
ReceivedObject ro = env.getReceived();
if (ro != null) {
//Create tag received
sb.append(OT).append(RECEIVED_TAG).append(CT);
//Date
String value = new BasicFipaDateTime(ro.getDate()).toString();
if (value != null) {
encodeOneLineTag(sb, RECEIVED_DATE,RECEIVED_ATTR,value);
}
//By
if (((value=ro.getBy()) != null)&&(!value.equals(NULL))) {
encodeOneLineTag(sb, RECEIVED_BY,RECEIVED_ATTR,value);
}
//From
if (((value=ro.getFrom()) != null)&&(!value.equals(NULL))) {
encodeOneLineTag(sb, RECEIVED_FROM,RECEIVED_ATTR,value);
}
//Id
if (((value=ro.getId()) != null)&&(!value.equals(NULL))) {
encodeOneLineTag(sb, RECEIVED_ID,RECEIVED_ATTR,value);
}
//Via
if (((value=ro.getVia()) != null)&&(!value.equals(NULL))) {
encodeOneLineTag(sb, RECEIVED_VIA,RECEIVED_ATTR,value);
}
sb.append(ET).append(RECEIVED_TAG).append(CT);
}
sb.append(ET).append(PARAMS_TAG).append(CT);