Where to place logic for cleaning up data from an external system

"triashill" <[email protected]>
Newsgroups gmane.comp.programming.domain-driven-design
Message-ID <[email protected]>
Description of the system:The system basically processes messages from
an external system.
The way i have modeled the system is :1. I created an anti corruption
layer that receives the messages (swift messages) from an external
system. The ACL also has a reponsibility for cleaning up the data, then
lastly, the ACL sends the messages to the domain services for
processing.2. I have the actual domain, that processes these messages,
does some calculations etc.
I am having problems with figuring out where to put the logic for
'cleaning' the data that is in the swift messages.
Swift Message:Each swift message is just a BLOB of text containing a
various fields and their respective Values
{ :field1://value 1 *** :field2://value2!!}

So likewise i have an entity called Message, which contains a list of
fields. The problem i am facing is transforming the BLOB of text into a
Message entity. This is because each field needs to be extracted
differently from the next. So in the example above,  the value of field1
must be value 1, without the ***, the value of field2 must be value 2,
without the !!
In total, there are 4 different fieldTypes. So my question is, where do
i put the logic to clean up the fields,
1. do i put it in an external 'service' that has an if statement to
clean each field differently?2. Do i put the logic for cleaning in the
Field Value object itself, so each field knows how to clean itself

And does all this logic sit in the ACL or it moves to the domain. I get
a sense that the logic for cleaning external data must not sit in the
omain, because it has no business sitting there.
public class Message: Entity<long>{ public IList<Field> Fields{get;
set;}}
public class Field: ValueObject{ string Tag {get; set;} // this is what
it looks for in the swift message BLOB of text from the external system
string Value {get;set;}}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.