org.apache.cxf.common.xmlschema.XmlSchemaUtils.getContentAttributes()方法的使用及代码示例

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

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

XmlSchemaUtils.getContentAttributes介绍

暂无

代码示例

代码示例来源:origin: org.apache.cxf/cxf-core

public static List<XmlSchemaAnnotated> getContentAttributes(XmlSchemaComplexType type,
                              SchemaCollection collection) {
  List<XmlSchemaAnnotated> results = new ArrayList<>();
  QName baseTypeName = getBaseType(type);
  if (baseTypeName != null) {
    XmlSchemaComplexType baseType = (XmlSchemaComplexType)collection.getTypeByQName(baseTypeName);
    // recurse onto the base type ...
    results.addAll(getContentAttributes(baseType, collection));
    // and now process our sequence.
    List<XmlSchemaAttributeOrGroupRef> extAttrs = getContentAttributes(type);
    results.addAll(extAttrs);
    return results;
  }
  // no base type, the simple case.
  List<XmlSchemaAttributeOrGroupRef> attrs = type.getAttributes();
  results.addAll(attrs);
  return results;
}

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

public static List<XmlSchemaAnnotated> getContentAttributes(XmlSchemaComplexType type,
                              SchemaCollection collection) {
  List<XmlSchemaAnnotated> results = new ArrayList<>();
  QName baseTypeName = getBaseType(type);
  if (baseTypeName != null) {
    XmlSchemaComplexType baseType = (XmlSchemaComplexType)collection.getTypeByQName(baseTypeName);
    // recurse onto the base type ...
    results.addAll(getContentAttributes(baseType, collection));
    // and now process our sequence.
    List<XmlSchemaAttributeOrGroupRef> extAttrs = getContentAttributes(type);
    results.addAll(extAttrs);
    return results;
  }
  // no base type, the simple case.
  List<XmlSchemaAttributeOrGroupRef> attrs = type.getAttributes();
  results.addAll(attrs);
  return results;
}

代码示例来源:origin: org.apache.cxf/cxf-common-utilities

public static List<XmlSchemaAnnotated>
getContentAttributes(XmlSchemaComplexType type, SchemaCollection collection) {
  List<XmlSchemaAnnotated> results = new ArrayList<XmlSchemaAnnotated>();
  QName baseTypeName = getBaseType(type);
  if (baseTypeName != null) {
    XmlSchemaComplexType baseType = (XmlSchemaComplexType)collection.getTypeByQName(baseTypeName);
    // recurse onto the base type ...
    results.addAll(getContentAttributes(baseType, collection));
    // and now process our sequence.
    List<XmlSchemaAttributeOrGroupRef> extAttrs = getContentAttributes(type);
    results.addAll(extAttrs);
    return results;
  } else {
    // no base type, the simple case.
    List<XmlSchemaAttributeOrGroupRef> attrs = type.getAttributes();
    results.addAll(attrs);
    return results;
  }
}

代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs

public static List<XmlSchemaAnnotated>
getContentAttributes(XmlSchemaComplexType type, SchemaCollection collection) {
  List<XmlSchemaAnnotated> results = new ArrayList<XmlSchemaAnnotated>();
  QName baseTypeName = getBaseType(type);
  if (baseTypeName != null) {
    XmlSchemaComplexType baseType = (XmlSchemaComplexType)collection.getTypeByQName(baseTypeName);
    // recurse onto the base type ...
    results.addAll(getContentAttributes(baseType, collection));
    // and now process our sequence.
    List<XmlSchemaAttributeOrGroupRef> extAttrs = getContentAttributes(type);
    results.addAll(extAttrs);
    return results;
  } else {
    // no base type, the simple case.
    List<XmlSchemaAttributeOrGroupRef> attrs = type.getAttributes();
    results.addAll(attrs);
    return results;
  }
}

代码示例来源:origin: org.apache.cxf/cxf-api

public static List<XmlSchemaAnnotated>
getContentAttributes(XmlSchemaComplexType type, SchemaCollection collection) {
  List<XmlSchemaAnnotated> results = new ArrayList<XmlSchemaAnnotated>();
  QName baseTypeName = getBaseType(type);
  if (baseTypeName != null) {
    XmlSchemaComplexType baseType = (XmlSchemaComplexType)collection.getTypeByQName(baseTypeName);
    // recurse onto the base type ...
    results.addAll(getContentAttributes(baseType, collection));
    // and now process our sequence.
    List<XmlSchemaAttributeOrGroupRef> extAttrs = getContentAttributes(type);
    results.addAll(extAttrs);
    return results;
  } else {
    // no base type, the simple case.
    List<XmlSchemaAttributeOrGroupRef> attrs = type.getAttributes();
    results.addAll(attrs);
    return results;
  }
}

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

public void complexTypeConstructorAndAccessors(QName name, XmlSchemaComplexType type) {
  accessors = new StringBuilder();
  utils = new JavascriptUtils(code);
  List<XmlSchemaObject> items = JavascriptUtils.getContentElements(type, xmlSchemaCollection);
  List<XmlSchemaAnnotated> attrs = XmlSchemaUtils.getContentAttributes(type, xmlSchemaCollection);
  final String elementPrefix = "this._";
  String typeObjectName = nameManager.getJavascriptName(name);
  code.append("//\n");
  code.append("// Constructor for XML Schema item " + name.toString() + "\n");
  code.append("//\n");
  code.append("function " + typeObjectName + " () {\n");
  // to assist in debugging we put a type property into every object.
  utils.appendLine("this.typeMarker = '" + typeObjectName + "';");
  for (XmlSchemaObject thing : items) {
    ParticleInfo itemInfo = ParticleInfo.forLocalItem(thing, xmlSchema, xmlSchemaCollection,
                             prefixAccumulator, type.getQName());
    constructItem(type, elementPrefix, typeObjectName, itemInfo);
  }
  for (XmlSchemaAnnotated thing : attrs) {
    AttributeInfo itemInfo = AttributeInfo.forLocalItem(thing, xmlSchema, xmlSchemaCollection,
                              prefixAccumulator, type.getQName());
    constructOneItem(type, elementPrefix, typeObjectName, itemInfo);
  }
  code.append("}\n\n");
  code.append(accessors.toString());
}

相关文章