本文整理了Java中org.apache.cxf.common.xmlschema.XmlSchemaUtils.getSequence()
方法的一些代码示例,展示了XmlSchemaUtils.getSequence()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XmlSchemaUtils.getSequence()
方法的具体详情如下:
包路径:org.apache.cxf.common.xmlschema.XmlSchemaUtils
类名称:XmlSchemaUtils
方法名:getSequence
暂无
代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs
public static List<XmlSchemaObject> getContentElements(XmlSchemaComplexType type,
SchemaCollection collection) {
List<XmlSchemaObject> results = new ArrayList<XmlSchemaObject>();
QName baseTypeName = getBaseType(type);
if (baseTypeName != null) {
XmlSchemaComplexType baseType = (XmlSchemaComplexType)collection.getTypeByQName(baseTypeName);
// recurse onto the base type ...
results.addAll(getContentElements(baseType, collection));
// and now process our sequence.
XmlSchemaSequence extSequence = getContentSequence(type);
if (extSequence != null) {
for (XmlSchemaSequenceMember item : extSequence.getItems()) {
/*
* For now, leave the return type alone. Fix some day.
*/
results.add((XmlSchemaObject)item);
}
}
return results;
} else {
// no base type, the simple case.
XmlSchemaSequence sequence = getSequence(type);
for (XmlSchemaSequenceMember item : sequence.getItems()) {
results.add((XmlSchemaObject)item);
}
return results;
}
}
代码示例来源:origin: org.apache.cxf/cxf-api
public static List<XmlSchemaObject> getContentElements(XmlSchemaComplexType type,
SchemaCollection collection) {
List<XmlSchemaObject> results = new ArrayList<XmlSchemaObject>();
QName baseTypeName = getBaseType(type);
if (baseTypeName != null) {
XmlSchemaComplexType baseType = (XmlSchemaComplexType)collection.getTypeByQName(baseTypeName);
// recurse onto the base type ...
results.addAll(getContentElements(baseType, collection));
// and now process our sequence.
XmlSchemaSequence extSequence = getContentSequence(type);
if (extSequence != null) {
for (XmlSchemaSequenceMember item : extSequence.getItems()) {
/*
* For now, leave the return type alone. Fix some day.
*/
results.add((XmlSchemaObject)item);
}
}
return results;
} else {
// no base type, the simple case.
XmlSchemaSequence sequence = getSequence(type);
for (XmlSchemaSequenceMember item : sequence.getItems()) {
results.add((XmlSchemaObject)item);
}
return results;
}
}
代码示例来源:origin: org.apache.cxf/cxf-common-utilities
public static List<XmlSchemaObject> getContentElements(XmlSchemaComplexType type,
SchemaCollection collection) {
List<XmlSchemaObject> results = new ArrayList<XmlSchemaObject>();
QName baseTypeName = getBaseType(type);
if (baseTypeName != null) {
XmlSchemaComplexType baseType = (XmlSchemaComplexType)collection.getTypeByQName(baseTypeName);
// recurse onto the base type ...
results.addAll(getContentElements(baseType, collection));
// and now process our sequence.
XmlSchemaSequence extSequence = getContentSequence(type);
if (extSequence != null) {
for (XmlSchemaSequenceMember item : extSequence.getItems()) {
/*
* For now, leave the return type alone. Fix some day.
*/
results.add((XmlSchemaObject)item);
}
}
return results;
} else {
// no base type, the simple case.
XmlSchemaSequence sequence = getSequence(type);
for (XmlSchemaSequenceMember item : sequence.getItems()) {
results.add((XmlSchemaObject)item);
}
return results;
}
}
代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs
private void addCrossImportsType(XmlSchema schema, XmlSchemaType schemaType) {
// the base type might cross schemas.
if (schemaType instanceof XmlSchemaComplexType) {
XmlSchemaComplexType complexType = (XmlSchemaComplexType)schemaType;
XmlSchemaUtils.addImportIfNeeded(schema, complexType.getBaseSchemaTypeName());
addCrossImports(schema, complexType.getContentModel());
addCrossImportsAttributeList(schema, complexType.getAttributes());
// could it be a choice or something else?
if (complexType.getParticle() instanceof XmlSchemaChoice) {
XmlSchemaChoice choice = XmlSchemaUtils.getChoice(complexType);
addCrossImports(schema, choice);
} else if (complexType.getParticle() instanceof XmlSchemaAll) {
XmlSchemaAll all = XmlSchemaUtils.getAll(complexType);
addCrossImports(schema, all);
} else {
XmlSchemaSequence sequence = XmlSchemaUtils.getSequence(complexType);
addCrossImports(schema, sequence);
}
}
}
private void addCrossImports(XmlSchema schema, XmlSchemaAll all) {
代码示例来源:origin: org.apache.cxf/cxf-api
private void addCrossImportsType(XmlSchema schema, XmlSchemaType schemaType) {
// the base type might cross schemas.
if (schemaType instanceof XmlSchemaComplexType) {
XmlSchemaComplexType complexType = (XmlSchemaComplexType)schemaType;
XmlSchemaUtils.addImportIfNeeded(schema, complexType.getBaseSchemaTypeName());
addCrossImports(schema, complexType.getContentModel());
addCrossImportsAttributeList(schema, complexType.getAttributes());
// could it be a choice or something else?
if (complexType.getParticle() instanceof XmlSchemaChoice) {
XmlSchemaChoice choice = XmlSchemaUtils.getChoice(complexType);
addCrossImports(schema, choice);
} else if (complexType.getParticle() instanceof XmlSchemaAll) {
XmlSchemaAll all = XmlSchemaUtils.getAll(complexType);
addCrossImports(schema, all);
} else {
XmlSchemaSequence sequence = XmlSchemaUtils.getSequence(complexType);
addCrossImports(schema, sequence);
}
}
}
private void addCrossImports(XmlSchema schema, XmlSchemaAll all) {
代码示例来源:origin: org.apache.cxf/cxf-common-utilities
private void addCrossImportsType(XmlSchema schema, XmlSchemaType schemaType) {
// the base type might cross schemas.
if (schemaType instanceof XmlSchemaComplexType) {
XmlSchemaComplexType complexType = (XmlSchemaComplexType)schemaType;
XmlSchemaUtils.addImportIfNeeded(schema, complexType.getBaseSchemaTypeName());
addCrossImports(schema, complexType.getContentModel());
addCrossImportsAttributeList(schema, complexType.getAttributes());
// could it be a choice or something else?
if (complexType.getParticle() instanceof XmlSchemaChoice) {
XmlSchemaChoice choice = XmlSchemaUtils.getChoice(complexType);
addCrossImports(schema, choice);
} else if (complexType.getParticle() instanceof XmlSchemaAll) {
XmlSchemaAll all = XmlSchemaUtils.getAll(complexType);
addCrossImports(schema, all);
} else {
XmlSchemaSequence sequence = XmlSchemaUtils.getSequence(complexType);
addCrossImports(schema, sequence);
}
}
}
private void addCrossImports(XmlSchema schema, XmlSchemaAll all) {
内容来源于网络,如有侵权,请联系作者删除!