/** {@inheritDoc} */
  @Override
  protected void writeAttributes(FreeColXMLWriter xw) throws XMLStreamException {
    super.writeAttributes(xw);

    if (target != null) {
      xw.writeAttribute(TARGET_TAG, target.getId());
    }
  }
示例#2
0
文件: Wish.java 项目: vardars/FreeCol
  /** {@inheritDoc} */
  @Override
  protected void writeAttributes(FreeColXMLWriter xw) throws XMLStreamException {
    super.writeAttributes(xw);

    // Write identifier, Location will match Object
    if (destination != null) {
      xw.writeAttribute(DESTINATION_TAG, destination.getId());

      if (transportable != null) {
        xw.writeAttribute(TRANSPORTABLE_TAG, transportable.getId());
      }
    }
  }