Пример #1
0
  private Node generateFieldNode(Document doc, ClassField field) {
    Element fieldEl = doc.createElement(EL_FIELD);

    fieldEl.setAttribute(ATR_NAME, field.getName());
    fieldEl.setAttribute(ATR_TYPE, field.getType());

    if (field.isInput()) fieldEl.setAttribute(ATR_NATURE, "input");
    else if (field.isGoal()) fieldEl.setAttribute(ATR_NATURE, "goal");

    if (field.getValue() != null) fieldEl.setAttribute(ATR_VALUE, field.getValue());

    return fieldEl;
  }