=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/interpretation/Interpretation.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/interpretation/Interpretation.java 2013-08-23 15:56:19 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/interpretation/Interpretation.java 2013-09-18 10:30:31 +0000 @@ -59,6 +59,11 @@ public class Interpretation extends BaseIdentifiableObject { + public static final String TYPE_CHART = "chart"; + public static final String TYPE_MAP = "map"; + public static final String TYPE_REPORT_TABLE = "reportTable"; + public static final String TYPE_DATASET_REPORT = "dataSetReport"; + private Chart chart; private Map map; @@ -121,7 +126,31 @@ // ------------------------------------------------------------------------- // Logic // ------------------------------------------------------------------------- - + + @JsonProperty + @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 ) + public String getType() + { + if ( chart != null ) + { + return TYPE_CHART; + } + else if ( map != null ) + { + return TYPE_MAP; + } + else if ( reportTable != null ) + { + return TYPE_REPORT_TABLE; + } + else if ( dataSet != null ) + { + return TYPE_DATASET_REPORT; + } + + return null; + } + public void addComment( InterpretationComment comment ) { this.comments.add( comment );