Importance() { xmlValue = this.name().toLowerCase(); }
/** Generate the XML representation for this tag. */ public void generate(XmlWriter w, ExtensionProfile extProfile) throws IOException { if (attributes.isEmpty()) { // Nothing to write return; } w.startElement(GoogleBaseNamespaces.GM, "attributes", null, null); w.startRepeatingElement(); for (GmAttribute attribute : attributes) { List<XmlWriter.Attribute> attributes = new ArrayList<XmlWriter.Attribute>(); GoogleBaseAttributeId id = attribute.getAttributeId(); attributes.add(new XmlWriter.Attribute("name", id.getName())); if (id.getType() != null) { attributes.add(new XmlWriter.Attribute("type", id.getType().getName())); } if (attribute.getImportance() != null) { attributes.add(new XmlWriter.Attribute("importance", attribute.getImportance().getXmlValue())); } w.simpleElement(GoogleBaseNamespaces.GM, "attribute", attributes, null); } w.endRepeatingElement(); w.endElement(); }
/** Generate the XML representation for this tag. */ public void generate(XmlWriter w, ExtensionProfile extProfile) throws IOException { if (attributes.isEmpty()) { // Nothing to write return; } w.startElement(GoogleBaseNamespaces.GM, "attributes", null, null); w.startRepeatingElement(); for (GmAttribute attribute : attributes) { List<XmlWriter.Attribute> attributes = new ArrayList<XmlWriter.Attribute>(); GoogleBaseAttributeId id = attribute.getAttributeId(); attributes.add(new XmlWriter.Attribute("name", id.getName())); if (id.getType() != null) { attributes.add(new XmlWriter.Attribute("type", id.getType().getName())); } if (attribute.getImportance() != null) { attributes.add(new XmlWriter.Attribute("importance", attribute.getImportance().getXmlValue())); } w.simpleElement(GoogleBaseNamespaces.GM, "attribute", attributes, null); } w.endRepeatingElement(); w.endElement(); }
Importance() { xmlValue = this.name().toLowerCase(); }