/** {@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());
      }
    }
  }