org.apache.ws.commons.schema.XmlSchemaSimpleContentExtension.setAnnotation()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(2.8k)|赞(0)|评价(0)|浏览(137)

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

XmlSchemaSimpleContentExtension.setAnnotation介绍

暂无

代码示例

代码示例来源:origin: org.apache.ws.commons.schema/XmlSchema

  1. private XmlSchemaSimpleContentExtension handleSimpleContentExtension(
  2. XmlSchema schema, Element extEl, Element schemaEl) {
  3. XmlSchemaSimpleContentExtension ext = new XmlSchemaSimpleContentExtension();
  4. if (extEl.hasAttribute("base")) {
  5. String name = extEl.getAttribute("base");
  6. ext.baseTypeName = getRefQName(name, extEl);
  7. }
  8. for (Element el = XDOMUtil.getFirstChildElementNS(extEl,
  9. XmlSchema.SCHEMA_NS); el != null; el = XDOMUtil
  10. .getNextSiblingElementNS(el, XmlSchema.SCHEMA_NS)) {
  11. if (el.getLocalName().equals("attribute")) {
  12. XmlSchemaAttribute attr = handleAttribute(schema, el, schemaEl);
  13. ext.attributes.add(attr);
  14. } else if (el.getLocalName().equals("attributeGroup")) {
  15. XmlSchemaAttributeGroupRef attrGroup = handleAttributeGroupRef(el);
  16. ext.attributes.add(attrGroup);
  17. } else if (el.getLocalName().equals("anyAttribute")) {
  18. ext.anyAttribute = handleAnyAttribute(schema, el, schemaEl);
  19. } else if (el.getLocalName().equals("annotation")) {
  20. XmlSchemaAnnotation ann = handleAnnotation(el);
  21. ext.setAnnotation(ann);
  22. }
  23. }
  24. return ext;
  25. }

代码示例来源:origin: org.apache.ws.schema/XmlSchema

  1. private XmlSchemaSimpleContentExtension handleSimpleContentExtension(
  2. XmlSchema schema, Element extEl, Element schemaEl) {
  3. XmlSchemaSimpleContentExtension ext = new XmlSchemaSimpleContentExtension();
  4. if (extEl.hasAttribute("base")) {
  5. String name = extEl.getAttribute("base");
  6. ext.baseTypeName = getRefQName(name, extEl);
  7. }
  8. for (Element el = XDOMUtil.getFirstChildElementNS(extEl,
  9. XmlSchema.SCHEMA_NS); el != null; el = XDOMUtil
  10. .getNextSiblingElementNS(el, XmlSchema.SCHEMA_NS)) {
  11. if (el.getLocalName().equals("attribute")) {
  12. XmlSchemaAttribute attr = handleAttribute(schema, el, schemaEl);
  13. ext.attributes.add(attr);
  14. } else if (el.getLocalName().equals("attributeGroup")) {
  15. XmlSchemaAttributeGroupRef attrGroup = handleAttributeGroupRef(el);
  16. ext.attributes.add(attrGroup);
  17. } else if (el.getLocalName().equals("anyAttribute")) {
  18. ext.anyAttribute = handleAnyAttribute(schema, el, schemaEl);
  19. } else if (el.getLocalName().equals("annotation")) {
  20. XmlSchemaAnnotation ann = handleAnnotation(el);
  21. ext.setAnnotation(ann);
  22. }
  23. }
  24. return ext;
  25. }

代码示例来源:origin: org.apache.ws/com.springsource.org.apache.ws.commons.schema

  1. } else if (el.getLocalName().equals("annotation")) {
  2. XmlSchemaAnnotation ann = handleAnnotation(el);
  3. ext.setAnnotation(ann);

相关文章