org.apache.ws.commons.schema.XmlSchemaAny类的使用及代码示例

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

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

XmlSchemaAny介绍

[英]Enables any element from the specified namespace or namespaces to appear in the containing complexType element. Represents the World Wide Web Consortium (W3C) any element.
[中]

代码示例

代码示例来源:origin: org.raml/raml-parser-2

@Nonnull
  private XmlSchemaType createAny()
  {
    final XmlSchemaComplexType value = new XmlSchemaComplexType(schema, false);
    final XmlSchemaChoice xmlSchemaSequence = new XmlSchemaChoice();
    value.setParticle(xmlSchemaSequence);
    final List<XmlSchemaChoiceMember> items = xmlSchemaSequence.getItems();
    final XmlSchemaAny schemaAny = new XmlSchemaAny();
    schemaAny.setMinOccurs(0);
    schemaAny.setMaxOccurs(UNBOUNDED);
    schemaAny.setProcessContent(XmlSchemaContentProcessing.SKIP);
    items.add(schemaAny);
    return value;
  }
}

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

/** @noinspection UnusedParameters*/
private XmlSchemaAny handleAny(XmlSchema schema, Element anyEl,
    Element schemaEl) {
  XmlSchemaAny any = new XmlSchemaAny();
  if (anyEl.hasAttribute("namespace"))
    any.namespace = anyEl.getAttribute("namespace");
  if (anyEl.hasAttribute("processContents")) {
    String processContent = getEnumString(anyEl, "processContents");
    any.processContent = new XmlSchemaContentProcessing(processContent);
  }
  Element annotationEl = XDOMUtil.getFirstChildElementNS(anyEl,
      XmlSchema.SCHEMA_NS, "annotation");
  if (annotationEl != null) {
    XmlSchemaAnnotation annotation = handleAnnotation(annotationEl);
    any.setAnnotation(annotation);
  }
  any.minOccurs = getMinOccurs(anyEl);
  any.maxOccurs = getMaxOccurs(anyEl);
  return any;
}

代码示例来源:origin: org.wso2.carbon.data/org.wso2.carbon.dataservices.core

/**
 * Creates the default data services response element, and stores it in the schema.
 * @param cparams The common parameters used in the schema generator
 */
private static void createAndStoreDataServiceResponseElement(CommonParams cparams) {
  XmlSchemaElement element = createElement(cparams, DBConstants.WSO2_DS_NAMESPACE,
      DBConstants.DATA_SERVICE_RESPONSE_WRAPPER_ELEMENT, true);
  XmlSchemaComplexType type = createComplexType(cparams, DBConstants.WSO2_DS_NAMESPACE, 
      DBConstants.DATA_SERVICE_RESPONSE_WRAPPER_ELEMENT, false);
  element.setType(type);
  XmlSchemaAny anyEl = new XmlSchemaAny();
  anyEl.setMinOccurs(0);
  XmlSchemaSequence seq = new XmlSchemaSequence();
  seq.getItems().add(anyEl);
  type.setParticle(seq);
}

代码示例来源:origin: org.apache.cxf/cxf-rt-databinding-aegis

XmlSchemaAny any = new XmlSchemaAny();
any.setMinOccurs(0);
any.setMaxOccurs(Long.MAX_VALUE);
sequence.getItems().add(any);

代码示例来源:origin: org.apache.axis2/axis2-kernel

XmlSchemaComplexType entryType = new XmlSchemaComplexType(xmlSchema, false);
XmlSchemaSequence entrySequence = new XmlSchemaSequence();
XmlSchemaAny any = new XmlSchemaAny();
entrySequence.getItems().add(any);
entryType.setParticle(entrySequence);

代码示例来源:origin: apache/axis2-java

SchemaConstants.ARRAY_TYPE);
metainfHolder.addMaxOccurs(anyElementFieldName, any.getMaxOccurs());
metainfHolder.addMinOccurs(anyElementFieldName, any.getMinOccurs());

代码示例来源:origin: apache/cxf

String anyNamespaceSpec = any.getNamespace();
  utils.appendLine("var anyNeeded = " + any.getMinOccurs() + ";");
  utils.appendLine("var anyAllowed = " + any.getMaxOccurs() + ";");
} else if (optional) {
  utils.appendLine("var anyNeeded = 0;");

代码示例来源:origin: org.apache.axis2/axis2-adb-codegen

boolean isArray = xmlSchemaAny.getMaxOccurs() > 1;

代码示例来源:origin: apache/cxf

XmlSchemaAny any = new XmlSchemaAny();
any.setMinOccurs(0);
any.setMaxOccurs(Long.MAX_VALUE);
sequence.getItems().add(any);

代码示例来源:origin: apache/axis2-java

XmlSchemaComplexType entryType = new XmlSchemaComplexType(xmlSchema, false);
XmlSchemaSequence entrySequence = new XmlSchemaSequence();
XmlSchemaAny any = new XmlSchemaAny();
entrySequence.getItems().add(any);
entryType.setParticle(entrySequence);

代码示例来源:origin: org.apache.axis2/axis2-adb-codegen

SchemaConstants.ARRAY_TYPE);
metainfHolder.addMaxOccurs(anyElementFieldName, any.getMaxOccurs());
metainfHolder.addMinOccurs(anyElementFieldName, any.getMinOccurs());

代码示例来源:origin: apache/axis2-java

boolean isArray = xmlSchemaAny.getMaxOccurs() > 1;

代码示例来源:origin: raml-org/raml-java-parser

@Nonnull
  private XmlSchemaType createAny()
  {
    final XmlSchemaComplexType value = new XmlSchemaComplexType(schema, false);
    final XmlSchemaChoice xmlSchemaSequence = new XmlSchemaChoice();
    value.setParticle(xmlSchemaSequence);
    final List<XmlSchemaChoiceMember> items = xmlSchemaSequence.getItems();
    final XmlSchemaAny schemaAny = new XmlSchemaAny();
    schemaAny.setMinOccurs(0);
    schemaAny.setMaxOccurs(UNBOUNDED);
    schemaAny.setProcessContent(XmlSchemaContentProcessing.SKIP);
    items.add(schemaAny);
    return value;
  }
}

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

/** @noinspection UnusedParameters*/
private XmlSchemaAny handleAny(XmlSchema schema, Element anyEl,
    Element schemaEl) {
  XmlSchemaAny any = new XmlSchemaAny();
  if (anyEl.hasAttribute("namespace"))
    any.namespace = anyEl.getAttribute("namespace");
  if (anyEl.hasAttribute("processContents")) {
    String processContent = getEnumString(anyEl, "processContents");
    any.processContent = new XmlSchemaContentProcessing(processContent);
  }
  Element annotationEl = XDOMUtil.getFirstChildElementNS(anyEl,
      XmlSchema.SCHEMA_NS, "annotation");
  if (annotationEl != null) {
    XmlSchemaAnnotation annotation = handleAnnotation(annotationEl);
    any.setAnnotation(annotation);
  }
  any.minOccurs = getMinOccurs(anyEl);
  any.maxOccurs = getMaxOccurs(anyEl);
  return any;
}

代码示例来源:origin: org.raml/raml-parser-2

final XmlSchemaAny schemaAny = new XmlSchemaAny();
schemaAny.setMinOccurs(0);
schemaAny.setMaxOccurs(UNBOUNDED);
schemaAny.setProcessContent(XmlSchemaContentProcessing.SKIP);
items.add(schemaAny);

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

/** @noinspection UnusedParameters*/
private XmlSchemaAny handleAny(XmlSchema schema,
                Element anyEl,
                Element schemaEl) {
  XmlSchemaAny any = new XmlSchemaAny();
  if (anyEl.hasAttribute("namespace"))
    any.namespace = anyEl.getAttribute("namespace");
  if (anyEl.hasAttribute("processContents")) {
    String processContent = getEnumString(anyEl,
        "processContents");
    any.processContent =
        new XmlSchemaContentProcessing(processContent);
  }
  Element annotationEl = XDOMUtil.getFirstChildElementNS(anyEl,
      XmlSchema.SCHEMA_NS, "annotation");
  if (annotationEl != null) {
    XmlSchemaAnnotation annotation =
        handleAnnotation(annotationEl);
    any.setAnnotation(annotation);
  }
  any.minOccurs = getMinOccurs(anyEl);
  any.maxOccurs = getMaxOccurs(anyEl);
  return any;
}

代码示例来源:origin: raml-org/raml-java-parser

final XmlSchemaAny schemaAny = new XmlSchemaAny();
schemaAny.setMinOccurs(0);
schemaAny.setMaxOccurs(UNBOUNDED);
schemaAny.setProcessContent(XmlSchemaContentProcessing.SKIP);
items.add(schemaAny);

相关文章