/** {@inheritDoc} */ protected void writeChildren( XMLStreamWriter out, Player player, boolean showAll, boolean toSavedGame) throws XMLStreamException { super.writeChildren(out, player, showAll, toSavedGame); if (goodsContainer != null) { goodsContainer.toXML(out, player, showAll, toSavedGame); } }
/** {@inheritDoc} */ protected void readChild(XMLStreamReader in) throws XMLStreamException { if (GoodsContainer.getXMLElementTagName().equals(in.getLocalName())) { goodsContainer = getGame() .getFreeColGameObject(in.getAttributeValue(null, ID_ATTRIBUTE), GoodsContainer.class); if (goodsContainer == null) { goodsContainer = new GoodsContainer(getGame(), this, in); } else { goodsContainer.readFromXML(in); } } else { super.readChild(in); } }