: Wednesday, October 20, 2010 10:29 AM
To: [email protected]
Subject: Re: [HAPI-devel] Ignore groups and just access segments
I got some help off list and figured this out.
Instead of doing "Message myMessage = new
GenericParser().parse(myMessageString);"
I got some help off list and figured this out.
Instead of doing “Message myMessage = new
GenericParser().parse(myMessageString);” you can do “GenericMessage
myMessage = new GenericMessage.UnknownVersion(new
DefaultModelClassFactory()); myMessage.parse(myMessageString);” and get
generic access to
Replying to myself. Please confirm if this is correct.
I’m seeing other posts in the HAPI archive that HAPI simply doesn’t work on
a message and generic segments. It applies some semantics and uses groups on
all messages.
To access a message as I intend to I would need to either:
- iterate
I have a use case where I want to capture data from a segment if it exists
in a message. For example, if a message contains an IN1 or a PID segment I
want to get some data from it. The message type is not relevant nor is the
structural validity relevant.
Using a terser works up to a point, I’m u
4 matches
Mail list logo