gpt4 book ai didi

com.google.gdata.util.common.xml.XmlWriter.endRepeatingElement()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-18 13:38:40 26 4
gpt4 key购买 nike

本文整理了Java中com.google.gdata.util.common.xml.XmlWriter.endRepeatingElement()方法的一些代码示例,展示了XmlWriter.endRepeatingElement()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XmlWriter.endRepeatingElement()方法的具体详情如下:
包路径:com.google.gdata.util.common.xml.XmlWriter
类名称:XmlWriter
方法名:endRepeatingElement

XmlWriter.endRepeatingElement介绍

[英]Indicates that the series of repeating elements have been completely written.
[中]指示一系列重复元素已完全写入。

代码示例

代码示例来源:origin: com.google.gdata/gdata-core-1.0

private void generateEntries(XmlWriter w, ExtensionProfile extProfile)
  throws IOException {
 // Generate all entries
 w.startRepeatingElement();
 for (E entry : entries) {
  entry.generateAtom(w, extProfile);
 }
 w.endRepeatingElement();
}

代码示例来源:origin: com.mulesoft.google/google-api-gdata

private void generateEntries(XmlWriter w, ExtensionProfile extProfile)
  throws IOException {
 // Generate all entries
 w.startRepeatingElement();
 for (E entry : entries) {
  entry.generateAtom(w, extProfile);
 }
 w.endRepeatingElement();
}

代码示例来源:origin: com.google.gdata/gdata-java-client

private void generateEntries(XmlWriter w, ExtensionProfile extProfile)
  throws IOException {
 // Generate all entries
 w.startRepeatingElement();
 for (E entry : entries) {
  entry.generateAtom(w, extProfile);
 }
 w.endRepeatingElement();
}

代码示例来源:origin: com.mulesoft.google/google-api-gdata

/** Generates the XML representation for this object. */
 private void generate(XmlWriter w, String name) throws IOException {
  if (total == 0) {
   // Nothing to generate
   return;
  }
  w.startElement(GoogleBaseNamespaces.GM, name,
    Collections.singletonList(
      new XmlWriter.Attribute("total", Integer.toString(total))), null);
  if (countBySource != null && !countBySource.isEmpty()) {
   w.startRepeatingElement();
   for (Map.Entry<String, Integer> entry : countBySource.entrySet()) {
    List<XmlWriter.Attribute> attrs =
      new ArrayList<XmlWriter.Attribute>(2);
    attrs.add(new XmlWriter.Attribute("name", entry.getKey()));
    attrs.add(
      new XmlWriter.Attribute("count", entry.getValue().toString()));
    w.simpleElement(GoogleBaseNamespaces.GM, "source", attrs, null);
   }
   w.endRepeatingElement();
  }
  w.endElement();
 }
}

代码示例来源:origin: com.google.gdata/gdata-java-client

/** Generates the XML representation for this object. */
 private void generate(XmlWriter w, String name) throws IOException {
  if (total == 0) {
   // Nothing to generate
   return;
  }
  w.startElement(GoogleBaseNamespaces.GM, name,
    Collections.singletonList(
      new XmlWriter.Attribute("total", Integer.toString(total))), null);
  if (countBySource != null && !countBySource.isEmpty()) {
   w.startRepeatingElement();
   for (Map.Entry<String, Integer> entry : countBySource.entrySet()) {
    List<XmlWriter.Attribute> attrs =
      new ArrayList<XmlWriter.Attribute>(2);
    attrs.add(new XmlWriter.Attribute("name", entry.getKey()));
    attrs.add(
      new XmlWriter.Attribute("count", entry.getValue().toString()));
    w.simpleElement(GoogleBaseNamespaces.GM, "source", attrs, null);
   }
   w.endRepeatingElement();
  }
  w.endElement();
 }
}

代码示例来源:origin: com.google.gdata/gdata-core-1.0

/**
 * Generates XML corresponding to extended properties. Implementations in
 * extended classes should always call the base class to allow for nested
 * extensions.
 * 
 * @param w Output writer.
 * 
 * @param extProfile Extension profile for use by nested extensions.
 * 
 * @throws IOException
 */
protected void generateExtensions(XmlWriter w, ExtensionProfile extProfile)
  throws IOException {
 for (Extension ext : nonRepeatingExtensionMap.values()) {
  ext.generate(w, extProfile);
 }
 for (List<Extension> extList : repeatingExtensionMap.values()) {
  w.startRepeatingElement();
  for (Extension ext : extList) {
   ext.generate(w, extProfile);
  }
  w.endRepeatingElement();
 }
 if (xmlBlob != null) {
  w.innerXml(xmlBlob.getBlob());
 }
}

代码示例来源:origin: com.google.gdata/gdata-java-client

/**
 * Generates XML corresponding to extended properties. Implementations in
 * extended classes should always call the base class to allow for nested
 * extensions.
 * 
 * @param w Output writer.
 * 
 * @param extProfile Extension profile for use by nested extensions.
 * 
 * @throws IOException
 */
protected void generateExtensions(XmlWriter w, ExtensionProfile extProfile)
  throws IOException {
 for (Extension ext : nonRepeatingExtensionMap.values()) {
  ext.generate(w, extProfile);
 }
 for (List<Extension> extList : repeatingExtensionMap.values()) {
  w.startRepeatingElement();
  for (Extension ext : extList) {
   ext.generate(w, extProfile);
  }
  w.endRepeatingElement();
 }
 if (xmlBlob != null) {
  w.innerXml(xmlBlob.getBlob());
 }
}

代码示例来源:origin: com.mulesoft.google/google-api-gdata

/**
 * Generates XML corresponding to extended properties. Implementations in
 * extended classes should always call the base class to allow for nested
 * extensions.
 * 
 * @param w Output writer.
 * 
 * @param extProfile Extension profile for use by nested extensions.
 * 
 * @throws IOException
 */
protected void generateExtensions(XmlWriter w, ExtensionProfile extProfile)
  throws IOException {
 for (Extension ext : nonRepeatingExtensionMap.values()) {
  ext.generate(w, extProfile);
 }
 for (List<Extension> extList : repeatingExtensionMap.values()) {
  w.startRepeatingElement();
  for (Extension ext : extList) {
   ext.generate(w, extProfile);
  }
  w.endRepeatingElement();
 }
 if (xmlBlob != null) {
  w.innerXml(xmlBlob.getBlob());
 }
}

代码示例来源:origin: com.google.gdata/gdata-java-client

writer.simpleElement(Namespaces.gCalNs, GADGET_TYPE, prefAttrs, null);
writer.endRepeatingElement();
writer.endElement(Namespaces.gCalNs, TYPE);

代码示例来源:origin: com.google.gdata/gdata-core-1.0

category.generateAtom(w);
w.endRepeatingElement();

代码示例来源:origin: com.mulesoft.google/google-api-gdata

category.generateAtom(w);
w.endRepeatingElement();

代码示例来源:origin: com.mulesoft.google/google-api-gdata

value.generate(w);
w.endRepeatingElement();

代码示例来源:origin: com.google.gdata/gdata-java-client

@Override
public void generate(XmlWriter w, ExtensionProfile extProfile) 
  throws IOException {
 ArrayList<Attribute> attrs = new ArrayList<Attribute>();
 if (coreVersion.isCompatible(Service.Versions.V1)) {
  attrs.add(new Attribute("title", title.getPlainText()));
 }
 w.startElement(atomPubNs, "workspace", attrs, null);
 if (!coreVersion.isCompatible(Service.Versions.V1)) {
  title.generateAtom(w, "title");
 }
 w.startRepeatingElement();
 for (Collection collection : collectionList) {
  collection.generate(w, extProfile);
 }
 w.endRepeatingElement();
 generateExtensions(w, extProfile);
 w.endElement(atomPubNs, "workspace");
}

代码示例来源:origin: com.mulesoft.google/google-api-gdata

@Override
public void generate(XmlWriter w, ExtensionProfile extProfile) 
  throws IOException {
 ArrayList<Attribute> attrs = new ArrayList<Attribute>();
 if (coreVersion.isCompatible(Service.Versions.V1)) {
  attrs.add(new Attribute("title", title.getPlainText()));
 }
 w.startElement(atomPubNs, "workspace", attrs, null);
 if (!coreVersion.isCompatible(Service.Versions.V1)) {
  title.generateAtom(w, "title");
 }
 w.startRepeatingElement();
 for (Collection collection : collectionList) {
  collection.generate(w, extProfile);
 }
 w.endRepeatingElement();
 generateExtensions(w, extProfile);
 w.endElement(atomPubNs, "workspace");
}

代码示例来源:origin: com.google.gdata/gdata-core-1.0

/**
 * Generates XML.
 *
 * @param   w
 *            output writer
 *
 * @throws  IOException
 */
@Override
public void generate(XmlWriter w, ExtensionProfile extProfile) 
  throws IOException {
 w.startElement(atomPubNs, "service", null, null);
 w.startRepeatingElement();
 for (Workspace workspace : workspaces) {
  workspace.generate(w, extProfile);
 }
 w.endRepeatingElement();
 generateExtensions(w, extProfile);
 w.endElement(atomPubNs, "service");
}

代码示例来源:origin: com.mulesoft.google/google-api-gdata

/**
 * Generates XML.
 *
 * @param   w
 *            output writer
 *
 * @throws  IOException
 */
@Override
public void generate(XmlWriter w, ExtensionProfile extProfile) 
  throws IOException {
 w.startElement(atomPubNs, "service", null, null);
 w.startRepeatingElement();
 for (Workspace workspace : workspaces) {
  workspace.generate(w, extProfile);
 }
 w.endRepeatingElement();
 generateExtensions(w, extProfile);
 w.endElement(atomPubNs, "service");
}

代码示例来源:origin: com.google.gdata/gdata-java-client

/**
 * Generates XML.
 *
 * @param   w
 *            output writer
 *
 * @throws  IOException
 */
@Override
public void generate(XmlWriter w, ExtensionProfile extProfile) 
  throws IOException {
 w.startElement(atomPubNs, "service", null, null);
 w.startRepeatingElement();
 for (Workspace workspace : workspaces) {
  workspace.generate(w, extProfile);
 }
 w.endRepeatingElement();
 generateExtensions(w, extProfile);
 w.endElement(atomPubNs, "service");
}

代码示例来源:origin: com.google.gdata/gdata-java-client

/** 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();
}

代码示例来源:origin: com.google.gdata/gdata-core-1.0

@Override
public void generate(XmlWriter w, ExtensionProfile extProfile) 
  throws IOException {
 ArrayList<Attribute> attrs = new ArrayList<Attribute>();
 if (coreVersion.isCompatible(Service.Versions.V1)) {
  attrs.add(new Attribute("title", title.getPlainText()));
 }
 w.startElement(atomPubNs, "workspace", attrs, null);
 if (!coreVersion.isCompatible(Service.Versions.V1)) {
  title.generateAtom(w, "title");
 }
 w.startRepeatingElement();
 for (Collection collection : collectionList) {
  collection.generate(w, extProfile);
 }
 w.endRepeatingElement();
 generateExtensions(w, extProfile);
 w.endElement(atomPubNs, "workspace");
}

代码示例来源:origin: com.mulesoft.google/google-api-gdata

/** 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();
}

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com