当前位置: 首页>>代码示例>>Java>>正文


Java XmlSchemaContentModel类代码示例

本文整理汇总了Java中org.apache.ws.commons.schema.XmlSchemaContentModel的典型用法代码示例。如果您正苦于以下问题:Java XmlSchemaContentModel类的具体用法?Java XmlSchemaContentModel怎么用?Java XmlSchemaContentModel使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


XmlSchemaContentModel类属于org.apache.ws.commons.schema包,在下文中一共展示了XmlSchemaContentModel类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: walkComplexType

import org.apache.ws.commons.schema.XmlSchemaContentModel; //导入依赖的package包/类
protected void walkComplexType(XmlSchema xmlSchema, XmlSchemaComplexType obj) {
	walkAnnotated(xmlSchema, obj);
	XmlSchemaObjectCollection attributes = obj.getAttributes();
       for (int i = 0; i < attributes.getCount(); i++) {
           XmlSchemaObject attribute = attributes.getItem(i);
           if (attribute instanceof XmlSchemaAttribute) {
           	walkAttribute(xmlSchema, (XmlSchemaAttribute) attribute);
           } else if (attribute instanceof XmlSchemaAttributeGroupRef) {
           	walkAttributeGroupRef(xmlSchema, (XmlSchemaAttributeGroupRef) attribute);
           }
       }
	XmlSchemaContentModel xmlSchemaContentModel  = obj.getContentModel();
	XmlSchemaParticle xmlSchemaParticle = obj.getParticle();
	if (xmlSchemaContentModel != null) {
        if (xmlSchemaContentModel instanceof XmlSchemaSimpleContent) {
        	walkSimpleContent(xmlSchema, (XmlSchemaSimpleContent)xmlSchemaContentModel);
        } else if (xmlSchemaContentModel instanceof XmlSchemaComplexContent) {
        	walkComplexContent(xmlSchema, (XmlSchemaComplexContent)xmlSchemaContentModel);
        }
	} else if (xmlSchemaParticle != null) {
        if (xmlSchemaParticle instanceof XmlSchemaSequence) {
        	walkSequence(xmlSchema, (XmlSchemaSequence)xmlSchemaParticle);
        } else if (xmlSchemaParticle instanceof XmlSchemaChoice) {
        	walkChoice(xmlSchema, (XmlSchemaChoice)xmlSchemaParticle);
        } else if (xmlSchemaParticle instanceof XmlSchemaAll) {
        	walkAll(xmlSchema, (XmlSchemaAll)xmlSchemaParticle);
        } else if (xmlSchemaParticle instanceof XmlSchemaGroupRef) {
        	walkGroupRef(xmlSchema, (XmlSchemaGroupRef)xmlSchemaParticle);
        }
	}
}
 
开发者ID:convertigo,项目名称:convertigo-engine,代码行数:32,代码来源:XmlSchemaWalker.java

示例2: processComplexContentModel

import org.apache.ws.commons.schema.XmlSchemaContentModel; //导入依赖的package包/类
private static void processComplexContentModel(XmlSchemaComplexType cmplxType,
                                               TypeMapper mapper,
                                               String opName,
                                               Map<String,XmlSchema> schemaMap,
                                               String qnameSuffix) {
    XmlSchemaContentModel contentModel = cmplxType.getContentModel();
    if (contentModel instanceof XmlSchemaComplexContent) {
        XmlSchemaComplexContent xmlSchemaComplexContent = (XmlSchemaComplexContent) contentModel;
        XmlSchemaContent content = xmlSchemaComplexContent.getContent();
        if (content instanceof XmlSchemaComplexContentExtension) {
            XmlSchemaComplexContentExtension schemaExtension = (XmlSchemaComplexContentExtension) content;

            // process particles inside this extension, if any
            processSchemaSequence(schemaExtension.getParticle(), mapper, opName, schemaMap, qnameSuffix);

             XmlSchemaType extensionSchemaType = null;
            for (XmlSchema xmlSchema : schemaMap.values()) {
                extensionSchemaType = getSchemaType(xmlSchema,schemaExtension.getBaseTypeName());
                if (extensionSchemaType != null){
                    break;
                }
            }

            processXMLSchemaComplexType(extensionSchemaType, mapper, opName, schemaMap, qnameSuffix);
        }
    }
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:28,代码来源:ExtensionUtility.java

示例3: processContentModel

import org.apache.ws.commons.schema.XmlSchemaContentModel; //导入依赖的package包/类
/**
 * Process the content models. A content model is either simple type or a complex type
 * and included inside a complex content
 */
private void processContentModel(XmlSchemaContentModel content,
                                 BeanWriterMetaInfoHolder metaInfHolder,
                                 XmlSchema parentSchema)
        throws SchemaCompilationException {
    if (content instanceof XmlSchemaComplexContent) {
        processComplexContent((XmlSchemaComplexContent) content, metaInfHolder, parentSchema);
    } else if (content instanceof XmlSchemaSimpleContent) {
        processSimpleContent((XmlSchemaSimpleContent) content, metaInfHolder, parentSchema);
    }
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:15,代码来源:SchemaCompiler.java

示例4: isSoapArray

import org.apache.ws.commons.schema.XmlSchemaContentModel; //导入依赖的package包/类
private static boolean isSoapArray(XmlSchemaComplexType complexType) {
    // Soap arrays are based on complex content restriction
    XmlSchemaContentModel contentModel = complexType.getContentModel();
    if (contentModel == null) {
        return false;
    }
    XmlSchemaContent content = contentModel.getContent();
    if (!(content instanceof XmlSchemaComplexContentRestriction)) {
        return false;
    }

    XmlSchemaComplexContentRestriction restriction = (XmlSchemaComplexContentRestriction) content;
    return SOAP_ARRAY.equals(restriction.getBaseTypeName());
}
 
开发者ID:apache,项目名称:tomee,代码行数:15,代码来源:CommonsSchemaInfoBuilder.java

示例5: processComplexContentModel

import org.apache.ws.commons.schema.XmlSchemaContentModel; //导入依赖的package包/类
private void processComplexContentModel(XmlSchemaComplexType cmplxType,
                                        AxisMessage message,
                                        List partNameList,
                                        String qnameSuffix) throws CodeGenerationException {
    XmlSchemaContentModel contentModel = cmplxType.getContentModel();
    if (contentModel instanceof XmlSchemaComplexContent) {
        XmlSchemaComplexContent xmlSchemaComplexContent = (XmlSchemaComplexContent) contentModel;
        XmlSchemaContent content = xmlSchemaComplexContent.getContent();
        if (content instanceof XmlSchemaComplexContentExtension) {
            XmlSchemaComplexContentExtension schemaExtension = (XmlSchemaComplexContentExtension) content;

            // process particles inside this extension, if any
            if (schemaExtension.getParticle() != null) {
                processXMLSchemaSequence(schemaExtension.getParticle(), message, partNameList,
                        qnameSuffix);
            }

            // now we need to get the schema of the extension type from the parent schema. For that let's first retrieve
            // the parent schema
            AxisService axisService = message.getAxisOperation().getAxisService();
            ArrayList schemasList = axisService.getSchema();

            XmlSchema parentSchema = null;

            XmlSchema schema = null;
            XmlSchemaType extensionSchemaType = null;
            for (Iterator iter = schemasList.iterator(); iter.hasNext();) {
                schema = (XmlSchema) iter.next();
                extensionSchemaType = getSchemaType(schema, schemaExtension.getBaseTypeName());
                if (extensionSchemaType != null) {
                    break;
                }
            }

            // ok now we got the parent schema. Now let's get the extension's schema type

            handleAllCasesOfComplexTypes(extensionSchemaType, message, partNameList,
                    qnameSuffix);
        }
    }
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:42,代码来源:SchemaUnwrapperExtension.java


注:本文中的org.apache.ws.commons.schema.XmlSchemaContentModel类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。