@Override
    protected void writeChildren(XMLStreamWriter out)
        throws XMLStreamException {
        super.writeChildren(out);

        out.writeStartElement("gen");
        out.writeAttribute("humidityMin", Integer.toString(humidity[0]));
        out.writeAttribute("humidityMax", Integer.toString(humidity[1]));
        out.writeAttribute("temperatureMin", Integer.toString(temperature[0]));
        out.writeAttribute("temperatureMax", Integer.toString(temperature[1]));
        out.writeAttribute("altitudeMin", Integer.toString(altitude[0]));
        out.writeAttribute("altitudeMax", Integer.toString(altitude[1]));
        out.writeEndElement();

        for (Map.Entry<String, AbstractGoods> entry
                 : primaryGoodsMap.entrySet()) {
            out.writeStartElement("primary-production");
            out.writeAttribute("goods-type",
                entry.getValue().getType().getId());
            out.writeAttribute(VALUE_TAG,
                Integer.toString(entry.getValue().getAmount()));
            if (entry.getKey() != null) {
                out.writeAttribute("tile-production", entry.getKey());
            }
            out.writeEndElement();
        }

        for (Map.Entry<String, AbstractGoods> entry
                 : secondaryGoodsMap.entrySet()) {
            out.writeStartElement("secondary-production");
            out.writeAttribute("goods-type",
                entry.getValue().getType().getId());
            out.writeAttribute(VALUE_TAG,
                Integer.toString(entry.getValue().getAmount()));
            if (entry.getKey() != null) {
                out.writeAttribute("tile-production", entry.getKey());
            }
            out.writeEndElement();
        }

        for (Map.Entry<String, Map<GoodsType, AbstractGoods>> entry
                 : productionMap.entrySet()) {
            for (AbstractGoods goods : entry.getValue().values()) {
                out.writeStartElement("production");
                out.writeAttribute("goods-type", goods.getType().getId());
                out.writeAttribute(VALUE_TAG,
                    Integer.toString(goods.getAmount()));
                if (entry.getKey() != null) {
                    out.writeAttribute("tile-production", entry.getKey());
                }
                out.writeEndElement();
            }
        }

        for (RandomChoice<ResourceType> choice : resourceType) {
            out.writeStartElement("resource");
            out.writeAttribute("type", choice.getObject().getId());
            out.writeAttribute("probability",
                Integer.toString(choice.getProbability()));
            out.writeEndElement();
        }

        for (RandomChoice<Disaster> choice : disasters) {
            out.writeStartElement("disaster");
            out.writeAttribute("id", choice.getObject().getId());
            out.writeAttribute("probability",
                Integer.toString(choice.getProbability()));
            out.writeEndElement();
        }
    }