code: public static weka.core.Attribute buildAttribute(DataField dataField) {
          switch (dataField.getOptype()) {
              case CONTINUOUS:
                  return new weka.core.Attribute(dataField.getName().getValue());
              case CATEGORICAL:
                  List<Value> values = dataField.getValues();
                  FastVector nominalValues = new FastVector();
                  for (Value value : values) {
                      nominalValues.addElement(value.getValue());
                  }
  
                  return new weka.core.Attribute(dataField.getName().getValue(), nominalValues);
              default:
                  throw new RuntimeException("PMML DataField OPTYPE " + dataField.getOptype() + " not supported.");
          }
      }
docs: Creates a new {@link weka.core.Attribute} from a {@link org.dmg.pmml.DataField PMML DataField}.
  
  @param dataField The {@link org.dmg.pmml.DataField PMML DataField} representing the attribute.
  @return A new {@link weka.core.Attribute}.