Exemplo n.º 1
0
 /** {@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);
   }
 }
Exemplo n.º 2
0
 /** {@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);
   }
 }