package de.flux.playground.deckcompare.dto;

import java.util.List;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

import lombok.Data;

@Data
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class Deck {

    @XmlAttribute(name = "game")
    private String id;
    @XmlElement(name = "section")
    private List<Section> sections;
    private String notes;

}

@@ -38,16 +38,44 @@
 e.dto;%0A%0A
+import java.util.ArrayList;%0A
 import j
@@ -89,16 +89,16 @@
 l.List;%0A
-
 %0Aimport 
@@ -432,16 +432,116 @@
 Deck %7B%0A%0A
+    private static final int DEFAULT_SECTIONS = 2;%0A    private static final int CARDS_SECTION = 1;%0A%0A
     @Xml
@@ -658,16 +658,16 @@
 ctions;%0A
-
     priv
@@ -685,10 +685,246 @@
 notes;%0A%0A
+    public List%3CCard%3E getCards() %7B%0A        List%3CCard%3E cards = new ArrayList%3CCard%3E();%0A%0A        if (sections.size() %3E DEFAULT_SECTIONS) %7B%0A            cards = sections.get(CARDS_SECTION).getCards();%0A        %7D%0A%0A        return cards;%0A    %7D%0A%0A
 %7D%0A

Add method to extract playable cards form deck