@Override
   public void processCommand(Command command, int parameter, boolean hasParameter, boolean optional)
   {
      try
      {
         writer.writeEmptyElement("command");
         writer.writeAttribute("name", command.getCommandName());

         if (hasParameter)
         {
            writer.writeAttribute("parameter", Integer.toString(parameter));
         }

         if (optional)
         {
            writer.writeAttribute("optional", "true");
         }
      }
      catch (XMLStreamException ex)
      {
         throw new RuntimeException(ex);
      }
   }