@Override protected void consumeAttributes(AttributeHelper helper) throws ParseException { content = helper.consumeContent(false); } }
@Override protected void consumeAttributes(AttributeHelper helper) throws ParseException { content = helper.consumeContent(false); } }
protected void consumeAttributes(AttributeHelper helper) throws ParseException { this.itemType = helper.consumeContent(true); } }
@Override protected void consumeAttributes(AttributeHelper helper) throws ParseException { super.consumeAttributes(helper); playlistId = helper.consumeContent(true); } }
@Override protected void consumeAttributes(AttributeHelper helper) throws ParseException { super.consumeAttributes(helper); videoId = helper.consumeContent(true); } }
@Override protected void consumeAttributes(AttributeHelper helper) throws ParseException { super.consumeAttributes(helper); // Accept empty text content = helper.consumeContent(false); if (content == null) { content = ""; } } }
@Override protected void consumeAttributes(AttributeHelper helper) throws ParseException { super.consumeAttributes(helper); videoId = helper.consumeContent(true); } }
@Override protected void consumeAttributes(AttributeHelper helper) throws ParseException { super.consumeAttributes(helper); try { countHint = Integer.parseInt(helper.consumeContent(true)); } catch (NumberFormatException e) { throw new ParseException("CountHint should be an integer"); } } }
@Override protected void consumeAttributes(AttributeHelper helper) throws ParseException { super.consumeAttributes(helper); String content = helper.consumeContent(true); for (Value value : Value.values()) { if (value.xmlName.equals(content)) { this.value = value; break; } } }
@Override protected void consumeAttributes(AttributeHelper helper) throws ParseException { super.consumeAttributes(helper); try { age = Integer.parseInt(helper.consumeContent(true)); } catch (NumberFormatException e) { throw new ParseException("Age should be an integer"); } } }
@Override protected void consumeAttributes(AttributeHelper helper) throws ParseException { super.consumeAttributes(helper); String content = helper.consumeContent(true); for (Value value : Value.values()) { if (value.xmlName.equals(content)) { this.value = value; break; } } }
@Override protected void consumeAttributes(AttributeHelper helper) throws ParseException { super.consumeAttributes(helper); try { age = Integer.parseInt(helper.consumeContent(true)); } catch (NumberFormatException e) { throw new ParseException("Age should be an integer"); } } }
@Override protected void consumeAttributes(AttributeHelper helper) throws ParseException { super.consumeAttributes(helper); try { status = Status.valueOf(helper.consumeContent(true).toUpperCase()); } catch (IllegalArgumentException e) { throw new ParseException("Invalid relationship value"); } } }
@Override protected void consumeAttributes(AttributeHelper helper) throws ParseException { super.consumeAttributes(helper); try { status = YtStatus.Value.valueOf(helper.consumeContent(true).toUpperCase()); } catch (IllegalArgumentException e) { throw new ParseException("Invalid status value"); } } }
@Override protected void consumeAttributes(AttributeHelper helper) throws ParseException { super.consumeAttributes(helper); gender = Value.fromId(helper.consumeContent(true)); if (gender == null) { // It is necessarily null because the value is invalid, since // consumeContent(true) requires something to be there. throw new ParseException("Unknown gender. It should be m or f."); } } }
@Override protected void consumeAttributes(AttributeHelper helper) throws ParseException { super.consumeAttributes(helper); gender = Value.fromId(helper.consumeContent(true)); if (gender == null) { // It is necessarily null because the value is invalid, since // consumeContent(true) requires something to be there. throw new ParseException("Unknown gender. It should be m or f."); } } }
@Override protected void consumeAttributes(AttributeHelper helper) throws ParseException { super.consumeAttributes(helper); try { dateTime = DateTime.parseDateTime(helper.consumeContent(true)); } catch (NumberFormatException e) { throw new ParseException("Invalid date time format."); } }
@Override protected void consumeAttributes(AttributeHelper helper) throws ParseException { super.consumeAttributes(helper); try { date = DateTime.parseDate(helper.consumeContent(true)); } catch (NumberFormatException e) { throw new ParseException("Invalid date. Expected format: YYYY-MM-DD"); } } }
@Override protected void consumeAttributes(AttributeHelper helper) throws ParseException { super.consumeAttributes(helper); state = helper.consumeEnum("name", true, State.class, null, new AttributeHelper.LowerCaseEnumToAttributeValue<State>()); reasonCode = helper.consume("reasonCode", false); helpUrl = helper.consume("helpUrl", false); description = helper.consumeContent(false); } }
@Override protected void consumeAttributes(AttributeHelper helper) throws ParseException { super.consumeAttributes(helper); state = helper.consumeEnum("name", true, State.class, null, new AttributeHelper.LowerCaseEnumToAttributeValue<State>()); reasonCode = helper.consume("reasonCode", false); helpUrl = helper.consume("helpUrl", false); description = helper.consumeContent(false); } }