@Override
  public void generate(XmlWriter w, ExtensionProfile extProfile) throws IOException {

    ArrayList<XmlWriter.Attribute> attrs = new ArrayList<XmlWriter.Attribute>();

    if (label != null) {
      attrs.add(new XmlWriter.Attribute("label", label));
    }

    if (lat != null) {
      attrs.add(new XmlWriter.Attribute("lat", lat.toString()));
    }

    if (lon != null) {
      attrs.add(new XmlWriter.Attribute("lon", lon.toString()));
    }

    if (elev != null) {
      attrs.add(new XmlWriter.Attribute("elev", elev.toString()));
    }

    if (time != null) {
      attrs.add(new XmlWriter.Attribute("time", time.toString()));
    }

    generateStartElement(w, Namespaces.gNs, "geoPt", attrs, null);

    // Invoke ExtensionPoint.
    generateExtensions(w, extProfile);

    w.endElement(Namespaces.gNs, "geoPt");
  }
示例#2
0
  @Override
  public void generate(XmlWriter w, ExtensionProfile extensionProfile) throws IOException {
    ArrayList<XmlWriter.Attribute> attributes = new ArrayList<XmlWriter.Attribute>();

    if (name != null) {
      attributes.add(new XmlWriter.Attribute(ATTRIBUTE_NAME, name));
    }

    generateStartElement(w, Namespaces.APPS_NAMESPACE, EXTENSION_LOCAL_NAME, attributes, null);

    // Invoke ExtensionPoint.
    generateExtensions(w, extensionProfile);

    w.endElement(Namespaces.APPS_NAMESPACE, EXTENSION_LOCAL_NAME);
  }
示例#3
0
  @Override
  public void generate(XmlWriter w, ExtensionProfile extProfile) throws IOException {

    ArrayList<XmlWriter.Attribute> attrs = new ArrayList<XmlWriter.Attribute>();

    if (rel != null) {
      attrs.add(new XmlWriter.Attribute("rel", rel));
    }

    if (label != null) {
      attrs.add(new XmlWriter.Attribute("label", label));
    }

    if (address != null) {
      attrs.add(new XmlWriter.Attribute("address", address));
    }

    if (quota != null) {
      attrs.add(new XmlWriter.Attribute("quota", quota));
    }

    if (primary) {
      attrs.add(new XmlWriter.Attribute("primary", true));
    }

    if (displayName != null) {
      attrs.add(new XmlWriter.Attribute("displayName", displayName));
    }

    generateStartElement(w, Namespaces.gNs, "email", attrs, null);

    // Invoke ExtensionPoint.
    generateExtensions(w, extProfile);

    w.endElement(Namespaces.gNs, "email");
  }
 public void generate(XmlWriter w, ExtensionProfile extProfile) throws IOException {
   w.simpleElement(Namespaces.batchNs, "id", null, id);
 }