protected void processComplexType(XSComplexType complexType, ParseContext parseContext) throws Exception { XSParticle particle = complexType.getContentType().asParticle(); if (particle != null) { processParticle(particle, parseContext); } XSSimpleType xsSimpleType = complexType.getContentType().asSimpleType(); if (xsSimpleType != null) { processText("value", xsSimpleType, parseContext); } Collection<? extends XSAttributeUse> c = complexType.getAttributeUses(); Iterator<? extends XSAttributeUse> i = c.iterator(); while(i.hasNext()) { XSAttributeUse attUse = i.next(); processAttribute(attUse, parseContext); } }
/** * This method converts a complex XSD type to a UML class * @param type is non-null complex type definition * @param intoClass is non-null uml class to describe the XSD type into */ private void processComplexType(XSComplexType type, Classifier intoClass) { XSContentType contentType; intoClass.setAbstract( type.isAbstract() ); assignSuperclass( type, intoClass ); // describe type as an XSAttContainer processAttributeContainer( type, intoClass ); // describe the specific contents of this type // NOTE: type.getExplicitContent() should be used but it actually misses some specific definitions // in in-lined types contentType = type.getExplicitContent(); if ( contentType == null ) { contentType = type.getContentType(); } if ( contentType instanceof XSSimpleType ) { // handle the restriction/extension as THIS type (the superclass identified here is the correct one) processSimpleContent( contentType.asSimpleType(), intoClass ); } else if ( contentType instanceof XSParticle ) { processParticleAsComplexTypeContent( contentType.asParticle(), intoClass ); } }
if(type.getContentType().asSimpleType()!=null) {
if(type.getContentType().asSimpleType()!=null) {
if(type.getContentType().asSimpleType()!=null) {
if(type.getContentType().asSimpleType()!=null) {
if(type.getContentType().asSimpleType()!=null) {
if (type.getContentType().asSimpleType() != null) {
if (type.getContentType().asSimpleType() != null) {
if (type.getContentType().asSimpleType() != null) {
if (type.getContentType().asSimpleType() != null) {
if (type.getContentType().asSimpleType() != null) {