← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8032: Added new controller: CurrentUserController at /api/currentUser. Gives information about current ...

 

------------------------------------------------------------
revno: 8032
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2012-09-11 13:48:03 +0700
message:
  Added new controller: CurrentUserController at /api/currentUser. Gives information about current user. Also added /inbox (messageConversation and interpretations), /dashboard (still WIP) to get basic information.
added:
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/user/CurrentUserController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/webdomain/user/
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/webdomain/user/Dashboard.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/webdomain/user/Inbox.java
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/interpretation/Interpretation.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/message/MessageConversation.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/utils/WebUtils.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== 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	2012-09-03 19:48:33 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/interpretation/Interpretation.java	2012-09-11 06:48:03 +0000
@@ -30,6 +30,7 @@
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.fasterxml.jackson.annotation.JsonView;
 import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
 import org.hisp.dhis.chart.Chart;
@@ -157,7 +158,7 @@
     // -------------------------------------------------------------------------
 
     @JsonProperty
-    @JsonDeserialize( as = BaseIdentifiableObject.class )
+    @JsonSerialize( as = BaseIdentifiableObject.class )
     @JsonView( { DetailedView.class, ExportView.class } )
     @JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
     public Chart getChart()
@@ -171,7 +172,7 @@
     }
 
     @JsonProperty
-    @JsonDeserialize( as = BaseIdentifiableObject.class )
+    @JsonSerialize( as = BaseIdentifiableObject.class )
     @JsonView( { DetailedView.class, ExportView.class } )
     @JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
     public MapView getMapView()
@@ -185,7 +186,7 @@
     }
 
     @JsonProperty
-    @JsonDeserialize( as = BaseIdentifiableObject.class )
+    @JsonSerialize( as = BaseIdentifiableObject.class )
     @JsonView( { DetailedView.class, ExportView.class } )
     @JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
     public ReportTable getReportTable()
@@ -199,7 +200,7 @@
     }
 
     @JsonProperty
-    @JsonDeserialize( as = BaseIdentifiableObject.class )
+    @JsonSerialize( as = BaseIdentifiableObject.class )
     @JsonView( { DetailedView.class, ExportView.class } )
     @JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
     public DataSet getDataSet()
@@ -213,7 +214,7 @@
     }
 
     @JsonProperty
-    @JsonDeserialize( as = BaseIdentifiableObject.class )
+    @JsonSerialize( as = BaseIdentifiableObject.class )
     @JsonView( { DetailedView.class, ExportView.class } )
     @JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
     public Period getPeriod()
@@ -227,7 +228,7 @@
     }
 
     @JsonProperty
-    @JsonDeserialize( as = BaseIdentifiableObject.class )
+    @JsonSerialize( as = BaseIdentifiableObject.class )
     @JsonView( { DetailedView.class, ExportView.class } )
     @JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
     public OrganisationUnit getOrganisationUnit()
@@ -254,7 +255,7 @@
     }
 
     @JsonProperty
-    @JsonDeserialize( as = BaseIdentifiableObject.class )
+    @JsonSerialize( as = BaseIdentifiableObject.class )
     @JsonView( { DetailedView.class, ExportView.class } )
     @JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
     public User getUser()
@@ -281,7 +282,7 @@
     }
 
     @JsonProperty
-    @JsonDeserialize( contentAs = BaseIdentifiableObject.class )
+    @JsonSerialize( contentAs = BaseIdentifiableObject.class )
     @JsonView( { DetailedView.class, ExportView.class } )
     @JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
     public List<InterpretationComment> getComments()

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/message/MessageConversation.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/message/MessageConversation.java	2012-04-20 18:31:48 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/message/MessageConversation.java	2012-09-11 06:48:03 +0000
@@ -330,6 +330,8 @@
     // Transient fields
     //-------------------------------------------------------------------------------------------------------
 
+    @JsonProperty
+    @JacksonXmlProperty( isAttribute = true)
     public boolean isRead()
     {
         return read;
@@ -340,6 +342,8 @@
         this.read = read;
     }
 
+    @JsonProperty
+    @JacksonXmlProperty( isAttribute = true)
     public boolean isFollowUp()
     {
         return followUp;

=== added file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/user/CurrentUserController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/user/CurrentUserController.java	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/user/CurrentUserController.java	2012-09-11 06:48:03 +0000
@@ -0,0 +1,151 @@
+package org.hisp.dhis.api.controller.user;
+
+/*
+ * Copyright (c) 2004-2012, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ *   list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ *   this list of conditions and the following disclaimer in the documentation
+ *   and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ *   be used to endorse or promote products derived from this software without
+ *   specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import org.hisp.dhis.api.controller.WebOptions;
+import org.hisp.dhis.api.utils.ContextUtils;
+import org.hisp.dhis.api.utils.WebUtils;
+import org.hisp.dhis.api.webdomain.user.Dashboard;
+import org.hisp.dhis.api.webdomain.user.Inbox;
+import org.hisp.dhis.interpretation.Interpretation;
+import org.hisp.dhis.interpretation.InterpretationService;
+import org.hisp.dhis.message.MessageConversation;
+import org.hisp.dhis.message.MessageService;
+import org.hisp.dhis.user.CurrentUserService;
+import org.hisp.dhis.user.User;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.util.StringUtils;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.ArrayList;
+import java.util.Map;
+
+/**
+ * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
+ */
+@Controller
+@RequestMapping( value = CurrentUserController.RESOURCE_PATH, method = RequestMethod.GET )
+public class CurrentUserController
+{
+    public static final String RESOURCE_PATH = "/currentUser";
+
+    @Autowired
+    private CurrentUserService currentUserService;
+
+    @Autowired
+    private MessageService messageService;
+
+    @Autowired
+    private InterpretationService interpretationService;
+
+    @RequestMapping
+    public String getCurrentUser( @RequestParam Map<String, String> parameters,
+      Model model, HttpServletRequest request, HttpServletResponse response ) throws Exception
+    {
+        WebOptions options = new WebOptions( parameters );
+        User user = currentUserService.getCurrentUser();
+
+        if ( user == null )
+        {
+            ContextUtils.notFoundResponse( response, "User object is null, user is not authenticated." );
+            return null;
+        }
+
+        if ( options.hasLinks() )
+        {
+            WebUtils.generateLinks( user );
+        }
+
+        model.addAttribute( "model", user );
+        model.addAttribute( "viewClass", options.getViewClass( "detailed" ) );
+
+        return StringUtils.uncapitalize( "user" );
+    }
+
+    @RequestMapping( value = "/inbox" )
+    public String getInbox( @RequestParam Map<String, String> parameters,
+      Model model, HttpServletRequest request, HttpServletResponse response ) throws Exception
+    {
+        WebOptions options = new WebOptions( parameters );
+        User user = currentUserService.getCurrentUser();
+
+        if ( user == null )
+        {
+            ContextUtils.notFoundResponse( response, "User object is null, user is not authenticated." );
+            return null;
+        }
+
+        Inbox inbox = new Inbox();
+        inbox.setMessageConversations( new ArrayList<MessageConversation>( messageService.getMessageConversations( 0, Integer.MAX_VALUE ) ) );
+        inbox.setInterpretations( new ArrayList<Interpretation>( interpretationService.getInterpretations( 0, Integer.MAX_VALUE ) ) );
+
+        if ( options.hasLinks() )
+        {
+            WebUtils.generateLinks( inbox );
+        }
+
+        model.addAttribute( "model", inbox );
+        model.addAttribute( "viewClass", options.getViewClass( "basic" ) );
+
+        return StringUtils.uncapitalize( "inbox" );
+    }
+
+    @RequestMapping( value = "/dashboard" )
+    public String getDashboard( @RequestParam Map<String, String> parameters,
+      Model model, HttpServletRequest request, HttpServletResponse response ) throws Exception
+    {
+        WebOptions options = new WebOptions( parameters );
+        User user = currentUserService.getCurrentUser();
+
+        if ( user == null )
+        {
+            ContextUtils.notFoundResponse( response, "User object is null, user is not authenticated." );
+            return null;
+        }
+
+        Dashboard dashboard = new Dashboard();
+        dashboard.setUnreadMessageConversation( messageService.getUnreadMessageConversationCount() );
+        dashboard.setUnreadInterpretations( interpretationService.getNewInterpretationCount() );
+
+        if ( options.hasLinks() )
+        {
+            WebUtils.generateLinks( dashboard );
+        }
+
+        model.addAttribute( "model", dashboard );
+        model.addAttribute( "viewClass", options.getViewClass( "basic" ) );
+
+        return StringUtils.uncapitalize( "inbox" );
+    }
+}

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/utils/WebUtils.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/utils/WebUtils.java	2012-07-21 15:46:29 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/utils/WebUtils.java	2012-09-11 06:48:03 +0000
@@ -103,37 +103,41 @@
     }
 
     @SuppressWarnings( "unchecked" )
-    public static void generateLinks( IdentifiableObject identifiableObject )
+    public static void generateLinks( Object object )
     {
-        identifiableObject.setHref( ContextUtils.getPathWithUid( identifiableObject ) );
+        if(IdentifiableObject.class.isAssignableFrom( object.getClass() ))
+        {
+            IdentifiableObject identifiableObject = (IdentifiableObject) object;
+            identifiableObject.setHref( ContextUtils.getPathWithUid( identifiableObject ) );
+        }
 
-        Collection<Field> fields = ReflectionUtils.collectFields( identifiableObject.getClass(), alwaysTrue );
+        Collection<Field> fields = ReflectionUtils.collectFields( object.getClass(), alwaysTrue );
 
         for ( Field field : fields )
         {
             if ( IdentifiableObject.class.isAssignableFrom( field.getType() ) )
             {
-                Object object = ReflectionUtils.getFieldObject( field, identifiableObject );
+                Object fieldObject = ReflectionUtils.getFieldObject( field, object );
 
-                if ( object != null )
+                if ( fieldObject != null )
                 {
-                    IdentifiableObject idObject = (IdentifiableObject) object;
+                    IdentifiableObject idObject = (IdentifiableObject) fieldObject;
                     idObject.setHref( ContextUtils.getPathWithUid( idObject ) );
                 }
             }
-            else if ( ReflectionUtils.isCollection( field.getName(), identifiableObject, IdentifiableObject.class ) )
+            else if ( ReflectionUtils.isCollection( field.getName(), object, IdentifiableObject.class ) )
             {
-                Object collection = ReflectionUtils.getFieldObject( field, identifiableObject );
+                Object collection = ReflectionUtils.getFieldObject( field, object );
 
                 if ( collection != null )
                 {
-                    Collection<IdentifiableObject> objects = (Collection<IdentifiableObject>) collection;
+                    Collection<IdentifiableObject> collectionObjects = (Collection<IdentifiableObject>) collection;
 
-                    for ( IdentifiableObject object : objects )
+                    for ( IdentifiableObject collectionObject : collectionObjects )
                     {
-                        if ( object != null )
+                        if ( collectionObject != null )
                         {
-                            object.setHref( ContextUtils.getPathWithUid( object ) );
+                            collectionObject.setHref( ContextUtils.getPathWithUid( collectionObject ) );
                         }
                     }
                 }

=== added directory 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/webdomain/user'
=== added file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/webdomain/user/Dashboard.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/webdomain/user/Dashboard.java	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/webdomain/user/Dashboard.java	2012-09-11 06:48:03 +0000
@@ -0,0 +1,75 @@
+package org.hisp.dhis.api.webdomain.user;
+
+/*
+ * Copyright (c) 2004-2012, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ *   list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ *   this list of conditions and the following disclaimer in the documentation
+ *   and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ *   be used to endorse or promote products derived from this software without
+ *   specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonView;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
+import org.hisp.dhis.common.Dxf2Namespace;
+import org.hisp.dhis.common.view.DetailedView;
+import org.hisp.dhis.common.view.ExportView;
+
+/**
+ * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
+ */
+@JacksonXmlRootElement( localName = "dashboard", namespace = Dxf2Namespace.NAMESPACE )
+public class Dashboard
+{
+    private long unreadMessageConversation;
+
+    private long unreadInterpretations;
+
+    public Dashboard()
+    {
+    }
+
+    @JsonProperty
+    @JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE)
+    public long getUnreadMessageConversation()
+    {
+        return unreadMessageConversation;
+    }
+
+    public void setUnreadMessageConversation( long unreadMessageConversation )
+    {
+        this.unreadMessageConversation = unreadMessageConversation;
+    }
+
+    @JsonProperty
+    @JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE)
+    public long getUnreadInterpretations()
+    {
+        return unreadInterpretations;
+    }
+
+    public void setUnreadInterpretations( long unreadInterpretations )
+    {
+        this.unreadInterpretations = unreadInterpretations;
+    }
+}

=== added file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/webdomain/user/Inbox.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/webdomain/user/Inbox.java	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/webdomain/user/Inbox.java	2012-09-11 06:48:03 +0000
@@ -0,0 +1,83 @@
+package org.hisp.dhis.api.webdomain.user;
+
+/*
+ * Copyright (c) 2004-2012, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ *   list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ *   this list of conditions and the following disclaimer in the documentation
+ *   and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ *   be used to endorse or promote products derived from this software without
+ *   specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonView;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
+import org.hisp.dhis.common.Dxf2Namespace;
+import org.hisp.dhis.common.view.DetailedView;
+import org.hisp.dhis.common.view.ExportView;
+import org.hisp.dhis.interpretation.Interpretation;
+import org.hisp.dhis.message.MessageConversation;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
+ */
+@JacksonXmlRootElement( localName = "inbox", namespace = Dxf2Namespace.NAMESPACE )
+public class Inbox
+{
+    private List<MessageConversation> messageConversations = new ArrayList<MessageConversation>(  );
+
+    private List<Interpretation> interpretations = new ArrayList<Interpretation>(  );
+
+    public Inbox()
+    {
+    }
+
+    @JsonProperty
+    @JacksonXmlElementWrapper( localName = "messageConversations", namespace = Dxf2Namespace.NAMESPACE )
+    @JacksonXmlProperty( localName = "messageConversation", namespace = Dxf2Namespace.NAMESPACE )
+    public List<MessageConversation> getMessageConversations()
+    {
+        return messageConversations;
+    }
+
+    public void setMessageConversations( List<MessageConversation> messageConversations )
+    {
+        this.messageConversations = messageConversations;
+    }
+
+    @JsonProperty
+    @JacksonXmlElementWrapper( localName = "interpretations", namespace = Dxf2Namespace.NAMESPACE )
+    @JacksonXmlProperty( localName = "interpretation", namespace = Dxf2Namespace.NAMESPACE )
+    public List<Interpretation> getInterpretations()
+    {
+        return interpretations;
+    }
+
+    public void setInterpretations( List<Interpretation> interpretations )
+    {
+        this.interpretations = interpretations;
+    }
+}