I'd like to keep a getter/setter logic as much as possible. Any logic should be decoupled from those IMHO. I can move the exception throw to the getDomFromString though.