package com.nedap.archie.rm.datavalues;

import com.nedap.archie.rm.datatypes.CodePhrase;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;

/**
 * Created by pieter.bos on 04/11/15.
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "DV_CODED_TEXT", propOrder = {
        "definingCode"
})
public class DvCodedText extends DvText {

	@XmlElement(name = "defining_code")
    private CodePhrase definingCode;
    
    public CodePhrase getDefiningCode() {
        return definingCode;
    }

    public void setDefiningCode(CodePhrase definingCode) {
        this.definingCode = definingCode;
    }
}

@@ -34,16 +34,59 @@
 alues;%0A%0A
+import com.google.common.base.MoreObjects;%0A
 import c
@@ -776,11 +776,289 @@
 e;%0A    %7D
+%0A%0A    public String toString() %7B%0A        return MoreObjects.toStringHelper(this).add(%22code_string%22, definingCode.getCodeString())%0A                .add(%22terminology_id%22, definingCode.getTerminologyId())%0A                .add(%22value%22, getValue())%0A                .toString();%0A    %7D
 %0A%7D%0A

Add toString to DvCodedText