Re: [HAPI-devel] Testing if a segment is actually in a message

2012-11-09 Thread LDH
Thank you. Used ReadOnlyMessageIterator which worked as advertised. *Laurent (Harry) Hasson* Co-Founder, 360Fresh.com This email and any attachments thereto may contain private, confidential, and pri

Re: [HAPI-devel] Testing if a segment is actually in a message

2012-11-09 Thread christian ohr
Hi, you can call ReadOnlyMessageIterator.createPopulatedSegmentIterator(msg) and use the returned iterator to iterate through the message until you find the desired segment or the iterator is exhausted. If you know where the segment is located within the message, check if msg.currentReps(segment

[HAPI-devel] Testing if a segment is actually in a message

2012-11-08 Thread LDH
If i do Msg.getNames(), i get a list of all valid segments for that message. However, i'd like to have a list only of the segments that were actually there. The get("SEGMENT") method will create a default segment if it's not there. Is that possible? -