@Override protected void consumeAttributes(AttributeHelper helper) throws ParseException { href = helper.consume(HREF, true); label = helper.consume(LABEL, false); primary = helper.consumeBoolean(PRIMARY, false); rel = helper.consumeEnum(REL, false, Rel.class, null, REL_ENUM_TO_ATTRIBUTE_VALUE); }
@Override protected void consumeAttributes(AttributeHelper helper) throws ParseException { active = helper.consumeBoolean(ACTIVE, true); name = helper.consume(NAME, true); number = helper.consumeInteger(NUMBER, true); value = helper.consumeDouble(VALUE, true); }
@Override protected void consumeAttributes(AttributeHelper helper) throws ParseException { channels = helper.consumeInteger(CHANNELS, false); duration = helper.consumeLong(DURATION, false); height = helper.consumeInteger(HEIGHT, false); samplingrate = helper.consumeFloat(SAMPLINGRATE, false); type = helper.consume(TYPE, false); width = helper.consumeInteger(WIDTH, false); }
@Override protected void consumeAttributes(AttributeHelper helper) throws ParseException { date = helper.consumeDateTime(DATE, false); notes = helper.consume(NOTES, false); shares = helper.consumeDouble(SHARES, false); type = helper.consume(TYPE, true); }
@Override protected void consumeAttributes(AttributeHelper helper) throws ParseException { address = helper.consume(ADDRESS, true); label = helper.consume(LABEL, false); primary = helper.consumeBoolean(PRIMARY, false); protocol = helper.consume(PROTOCOL, false); rel = helper.consume(REL, false); }
@Override protected void consumeAttributes(AttributeHelper helper) throws ParseException { amount = helper.consumeDouble(AMOUNT, true); currencyCode = helper.consume(CURRENCYCODE, true); }
@Override protected void consumeAttributes(AttributeHelper helper) throws ParseException { rel = helper.consumeEnum(REL, true, Rel.class, null, REL_ENUM_TO_ATTRIBUTE_VALUE); value = helper.consume(null, false); }
@Override public XmlParser.ElementHandler getChildHandler(String namespace, String localName, Attributes attrs) throws ParseException, IOException { if (GoogleBaseNamespaces.GM_URI.equals(namespace) && "source".equals(localName)) { AttributeHelper helper = new AttributeHelper(attrs); stat.setCountBySource(helper.consume("name", true), helper.consumeInteger("count", true)); helper.assertAllConsumed(); } return new XmlParser.ElementHandler(); } }
/** Parses gm:attribute sub-elements. */ @Override public XmlParser.ElementHandler getChildHandler(String namespace, String localName, Attributes attrs) throws ParseException, IOException { if (namespace.equals(GoogleBaseNamespaces.GM_URI) && "attribute".equals(localName)) { AttributeHelper helper = new AttributeHelper(attrs); String nameAttr = helper.consume("name", true); GoogleBaseAttributeType typeAttr = GoogleBaseAttributeType .getInstance(helper.consume("type", false)); GmAttribute.Importance importanceAttr = helper .consumeEnum("importance", false, GmAttribute.Importance.class); GoogleBaseAttributeId attributeId = new GoogleBaseAttributeId(nameAttr, typeAttr); addAttribute(attributeId, importanceAttr); helper.assertAllConsumed(); return new XmlParser.ElementHandler(); } else { return super.getChildHandler(namespace, localName, attrs); } } };
@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); } }
/** * Creates an new handler for a gm:value tag. * * @param attrs XML attributes for the gm:value tag */ private AddValueHandler(Attributes attrs) throws IOException, ParseException { AttributeHelper helper = new AttributeHelper(attrs); this.count = helper.consumeInteger("count", false, 0); helper.assertAllConsumed(); }
@Override protected void consumeAttributes(AttributeHelper helper) throws ParseException { startTime = helper.consumeDateTime(START_TIME, true); endTime = helper.consumeDateTime(END_TIME, false); valueString = helper.consume(VALUE_STRING, false); }
@Override protected void consumeAttributes(AttributeHelper helper) throws ParseException { total = helper.consumeInteger(TOTAL, false); value = helper.consumeBoolean(null, false); }
@Override protected void consumeAttributes(AttributeHelper helper) throws ParseException { name = helper.consume(NAME, true); number = helper.consumeInteger(NUMBER, true); path = helper.consume(PATH, true); }
@Override protected void consumeAttributes(AttributeHelper helper) throws ParseException { kind = helper.consume(KIND, true); value = helper.consumeLong(null, true); }
@Override protected void consumeAttributes(AttributeHelper helper) throws ParseException { insertionMode = helper.consumeEnum(INSERTIONMODE, false, InsertionMode.class, null, INSERTIONMODE_ENUM_TO_ATTRIBUTE_VALUE); numberOfRows = helper.consumeInteger(NUMROWS, false); startIndex = helper.consumeInteger(STARTROW, true); }
@Override protected void consumeAttributes(AttributeHelper helper) throws ParseException { value = helper.consumeBoolean(VALUE, true); }
@Override protected void consumeAttributes(AttributeHelper helper) throws ParseException { count = helper.consumeInteger("count", false); updated = helper.consumeDateTime("updated", false); }
@Override protected void consumeAttributes(AttributeHelper helper) throws ParseException { value = helper.consumeInteger(VALUE, true); }
@Override protected void consumeAttributes(AttributeHelper helper) throws ParseException { value = helper.consumeLong(null, false); }