예제 #1
0
  @Override
  protected void doParseEventAttributes(XMLEventParserContext ctx, XMLEvent event, Object... args) {
    Iterator iter = event.asStartElement().getAttributes();
    if (iter == null) return;

    while (iter.hasNext()) {
      Attribute attr = (Attribute) iter.next();
      if (attr.getName().getLocalPart().equals("name") && attr.getValue() != null)
        this.setName(attr.getValue());
      else if (attr.getName().getLocalPart().equals("default") && attr.getValue() != null)
        this.setDefaultValue(attr.getValue());
      else if (attr.getName().getLocalPart().equals("nearestValue") && attr.getValue() != null) {
        Boolean d = WWUtil.convertStringToBoolean(attr.getValue());
        if (d != null) this.setNearestValue(d);
      }
    }
  }