/** * Gets the name of the attribute this histogram describes. * * @return attribute name */ public String getAttributeName() { return attributeId.getName(); }
/** * Gets the name of the attribute this histogram describes. * * @return attribute name */ public String getAttributeName() { return attributeId.getName(); }
/** Gets the attribute name. */ public String getName() { return attributeId.getName(); }
/** Gets the attribute name. */ public String getName() { return attributeId.getName(); }
private boolean hasNameAndType(GoogleBaseAttribute attr, String name, GoogleBaseAttributeType type) { GoogleBaseAttributeType subtype = attr.getAttributeId().getType(); return name.equals(attr.getAttributeId().getName()) && (type == null || subtype != null && type.isSupertypeOf(subtype)); }
private boolean hasNameAndType(GoogleBaseAttribute attr, String name, GoogleBaseAttributeType type) { GoogleBaseAttributeType subtype = attr.getAttributeId().getType(); return name.equals(attr.getAttributeId().getName()) && (type == null || subtype != null && type.isSupertypeOf(subtype)); }
attrs.add(new XmlWriter.Attribute("name", attributeId.getName()));
attrs.add(new XmlWriter.Attribute("name", attributeId.getName()));
/** 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(); }
private void generateAttribute(GoogleBaseAttribute attribute, XmlWriter xmlWriter) throws IOException { String elementName = convertToElementName(attribute.getAttributeId().getName()); xmlWriter.startElement(GoogleBaseNamespaces.G, elementName, getXmlAttributes(attribute), null); generateValue(attribute, xmlWriter); generateSubElements(attribute, xmlWriter); generateAdjustments(attribute, xmlWriter); generateSubAttributes(attribute, xmlWriter); xmlWriter.endElement(); }
private void generateAttribute(GoogleBaseAttribute attribute, XmlWriter xmlWriter) throws IOException { String elementName = convertToElementName(attribute.getAttributeId().getName()); xmlWriter.startElement(GoogleBaseNamespaces.G, elementName, getXmlAttributes(attribute), null); generateValue(attribute, xmlWriter); generateSubElements(attribute, xmlWriter); generateAdjustments(attribute, xmlWriter); generateSubAttributes(attribute, xmlWriter); xmlWriter.endElement(); }