• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java XmlSchemaParticle类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: cosnoamb

import org.apache.ws.commons.schema.XmlSchemaParticle; //导入依赖的package包/类
private static XmlSchemaGroupBase cosnoamb(XmlSchema xmlSchema, XmlSchemaGroupBase xmlParentSchemaGroupBase, XmlSchemaGroupBase xmlSchemaGroupBase) {
	System.out.println(" [email protected]"+xmlSchemaGroupBase.hashCode());
	List<XmlSchemaParticle> items = new XmlSchemaUtils.XmlSchemaObjectCollectionList<XmlSchemaParticle>(xmlSchemaGroupBase.getItems());
	int size = items.size();
	int i = 0, j = 1;
	
	if (size > 1 ) {
		while (i < size) {
			XmlSchemaParticle item1 = cosnoamb(xmlSchema, xmlSchemaGroupBase, items.get(i));
			while (j <= size-1) {
				XmlSchemaParticle item2 = cosnoamb(xmlSchema, xmlSchemaGroupBase, items.get(j));
				if (compare(xmlSchema, xmlSchemaGroupBase, item1, item2) == 0) {
					items = new XmlSchemaUtils.XmlSchemaObjectCollectionList<XmlSchemaParticle>(xmlSchemaGroupBase.getItems());
					size = items.size();
					item1 = items.get(j-1);
				}
				else {
					j++;
					break;
				}
			}
			i++;
		}
	}
	return xmlSchemaGroupBase;
}
 
开发者ID:convertigo,项目名称:convertigo-engine,代码行数:27,代码来源:SchemaManager.java


示例2: getFirstElement

import org.apache.ws.commons.schema.XmlSchemaParticle; //导入依赖的package包/类
private static Map<XmlSchemaElement, XmlSchemaGroupBase> getFirstElement(XmlSchemaGroupBase parentSchemaGroupBase, XmlSchemaParticle particle) {
	Map<XmlSchemaElement, XmlSchemaGroupBase> map = new HashMap<XmlSchemaElement, XmlSchemaGroupBase>();
	if (particle instanceof XmlSchemaElement) {
		map.put((XmlSchemaElement)particle, parentSchemaGroupBase);
	}
	else if (particle instanceof XmlSchemaGroupBase) {
		XmlSchemaGroupBase xmlSchemaGroupBase = (XmlSchemaGroupBase)particle;
		List<XmlSchemaParticle> items = new XmlSchemaUtils.XmlSchemaObjectCollectionList<XmlSchemaParticle>(xmlSchemaGroupBase.getItems());
		if (items.size() > 0) {
			if (items.get(0) instanceof XmlSchemaElement) {
				map.put((XmlSchemaElement)items.get(0), xmlSchemaGroupBase);
			}
			else {
				map = getFirstElement(xmlSchemaGroupBase, items.get(0));
			}
		}
	}
	return map;
}
 
开发者ID:convertigo,项目名称:convertigo-engine,代码行数:20,代码来源:SchemaManager.java


示例3: getXmlSchemaObject

import org.apache.ws.commons.schema.XmlSchemaParticle; //导入依赖的package包/类
@Override
public XmlSchemaParticle getXmlSchemaObject(XmlSchemaCollection collection, XmlSchema schema) {
	List<RequestableVariable> variables = getParentSequence().getAllVariables();
	
	XmlSchemaSequence sequence = variables.size() > 0 ? XmlSchemaUtils.makeDynamic(this, new XmlSchemaSequence()) : null;
	
	for (RequestableVariable variable : variables) {
		XmlSchemaElement element = XmlSchemaUtils.makeDynamic(this, new XmlSchemaElement());
		element.setName(variable.getName());
		element.setSchemaTypeName(variable.getTypeAffectation());
		element.setMinOccurs(0);
		if (variable.isMultiValued()) {
			element.setMaxOccurs(Long.MAX_VALUE);
		}
		sequence.getItems().add(element);
	}
	
	if (sequence != null) {
		return getXmlSchemaParticle(collection, schema, sequence);
	} else {
		return (XmlSchemaParticle) super.getXmlSchemaObject(collection, schema);
	}
}
 
开发者ID:convertigo,项目名称:convertigo-engine,代码行数:24,代码来源:InputVariablesStep.java


示例4: extractParticle

import org.apache.ws.commons.schema.XmlSchemaParticle; //导入依赖的package包/类
/**
 * Extract a particle from a complex type
 * returns null if it can't be extracted.
 */
private XmlSchemaParticle extractParticle(XmlSchemaComplexType complexType) {
    XmlSchemaParticle particle = complexType.getParticle();

    // handle case where the complexType is an extension
    if (particle == null && complexType.getContentModel() != null
            && complexType.getContentModel().getContent() != null) {
        XmlSchemaContent content = complexType.getContentModel().getContent();
        if (content instanceof XmlSchemaComplexContentExtension) {
            XmlSchemaComplexContentExtension complexContent = (XmlSchemaComplexContentExtension) content;
            particle = complexContent.getParticle();
        }
    }

    return particle;
}
 
开发者ID:inbloom,项目名称:secure-data-service,代码行数:20,代码来源:DidSchemaParser.java


示例5: parseParticleForIdentityType

import org.apache.ws.commons.schema.XmlSchemaParticle; //导入依赖的package包/类
/**
 * Recursively parse through an XmlSchemaPatricle to the elements
 * collecting all DidRefSources
 */
private XmlSchemaElement parseParticleForIdentityType(XmlSchemaParticle particle) {
    XmlSchemaElement identityType = null;
    if (particle != null) {
        if (particle instanceof XmlSchemaElement) {
            XmlSchemaElement element = (XmlSchemaElement) particle;
            String elementName = element.getSchemaTypeName().getLocalPart();
            if (elementName.contains(IDENTITY_TYPE)) {
                identityType = element;
            }
        } else if (particle instanceof XmlSchemaSequence) {
            XmlSchemaSequence schemaSequence = (XmlSchemaSequence) particle;
            for (int i = 0; i < schemaSequence.getItems().getCount(); i++) {
                XmlSchemaObject item = schemaSequence.getItems().getItem(i);
                if (item instanceof XmlSchemaParticle) {
                    identityType = parseParticleForIdentityType((XmlSchemaParticle) item);
                }
            }
        }
    }
    return identityType;
}
 
开发者ID:inbloom,项目名称:secure-data-service,代码行数:26,代码来源:DidSchemaParser.java


示例6: decorateImage

import org.apache.ws.commons.schema.XmlSchemaParticle; //导入依赖的package包/类
public Image decorateImage(Image image, Object element) {
	Image decoratedImage = image;
	
	if (element == null) {
		decoratedImage = null;
	} else if (element instanceof XmlSchemaParticle) {
		XmlSchemaParticle particle = (XmlSchemaParticle) element;
		
		long min = particle.getMinOccurs();
		long max = particle.getMaxOccurs();
		
		String occur = null;
		if (min == 0) {
			occur = "zero";
			if (max > 0) {
				occur += "_" + (max == 1 ? "one" : max == Long.MAX_VALUE ? "unbounded" : "n");
			}
		} else if (min == 1) {
			if (max > 1) {
				occur = "one_" + (max == Long.MAX_VALUE ? "unbounded" : "n");
			}
		} else {
			occur = "n";
			if (max > min) {
				occur += "_" + (max == Long.MAX_VALUE ? "unbounded" : "m");
			}
		}
		if (occur != null) {
			decoratedImage = getOverlayImageOccur(decoratedImage, element, occur);
		}			
	} else if (element instanceof XmlSchemaAttribute) {
		XmlSchemaAttribute attribute = (XmlSchemaAttribute) element;
		XmlSchemaUse use = attribute.getUse();
		if (use.equals(XmlSchemaUtils.attributeUseOptional)) {
			decoratedImage = getOverlayImageOccur(decoratedImage, element, "zero_one");
		}
	}
	
	return decoratedImage;
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:41,代码来源:SchemaViewLabelDecorator.java


示例7: getTypesListFromXsd

import org.apache.ws.commons.schema.XmlSchemaParticle; //导入依赖的package包/类
private ArrayList<String> getTypesListFromXsd() {
	ArrayList<String> types = new ArrayList<String>();
	try {
		String tns = transaction.getProject().getTargetNamespace();
		String projectName = transaction.getProject().getName();
		XmlSchema schema = Engine.theApp.schemaManager.getSchemaForProject(projectName);
		QName responseTypeQName = new QName(tns, transaction.getXsdResponseTypeName());
		XmlSchemaComplexType xmlSchemaType = (XmlSchemaComplexType) schema.getTypeByName(responseTypeQName);
		XmlSchemaParticle xmlSchemaParticle = xmlSchemaType.getParticle();
		if (xmlSchemaParticle != null && xmlSchemaParticle instanceof XmlSchemaSequence) {
			XmlSchemaObjectCollection xmlSchemaObjectCollection = ((XmlSchemaSequence)xmlSchemaParticle).getItems();
			for (int i=0;i<xmlSchemaObjectCollection.getCount();i++) {
				XmlSchemaObject xso = xmlSchemaObjectCollection.getItem(i);
				if (xso instanceof XmlSchemaElement) {
					XmlSchemaElement xmlSchemaElement = (XmlSchemaElement)xso;
					String elName = xmlSchemaElement.getName();
					QName elType = xmlSchemaElement.getSchemaTypeName();
					String value = "<xsd:element name=\""+elName+"\" type=\""+elType.getPrefix()+":"+elType.getLocalPart()+"\"/>";
					types.add(value);
				}
			}
		}
	}
	catch (Exception e) {
	}
	return types;
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:28,代码来源:TransactionXSDTypesDialogComposite.java


示例8: walkComplexType

import org.apache.ws.commons.schema.XmlSchemaParticle; //导入依赖的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


示例9: walkComplexContentExtension

import org.apache.ws.commons.schema.XmlSchemaParticle; //导入依赖的package包/类
protected void walkComplexContentExtension(XmlSchema xmlSchema, XmlSchemaComplexContentExtension obj) {
	walkAnnotated(xmlSchema, obj);
	QName baseTypeName = obj.getBaseTypeName();
	if ((baseTypeName != null) && deep) {
		walkByTypeName(xmlSchema, baseTypeName);
	}
	
	XmlSchemaParticle xmlSchemaParticle = obj.getParticle();
	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);
        }
	}
	
	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);
           }
       }
	XmlSchemaAnyAttribute xmlSchemaAnyAttribute = obj.getAnyAttribute();
	if (xmlSchemaAnyAttribute != null) {
		walkAnyAttribute(xmlSchema, xmlSchemaAnyAttribute);
	}
}
 
开发者ID:convertigo,项目名称:convertigo-engine,代码行数:35,代码来源:XmlSchemaWalker.java


示例10: walkComplexContentRestriction

import org.apache.ws.commons.schema.XmlSchemaParticle; //导入依赖的package包/类
protected void walkComplexContentRestriction(XmlSchema xmlSchema, XmlSchemaComplexContentRestriction obj) {
	walkAnnotated(xmlSchema, obj);
	QName baseTypeName = obj.getBaseTypeName();
	if ((baseTypeName != null) && deep) {
		walkByTypeName(xmlSchema, baseTypeName);
	}
	
	XmlSchemaParticle xmlSchemaParticle = obj.getParticle();
	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);
        }
	}
	
	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);
           }
       }
	XmlSchemaAnyAttribute xmlSchemaAnyAttribute = obj.getAnyAttribute();
	if (xmlSchemaAnyAttribute != null) {
		walkAnyAttribute(xmlSchema, xmlSchemaAnyAttribute);
	}
}
 
开发者ID:convertigo,项目名称:convertigo-engine,代码行数:35,代码来源:XmlSchemaWalker.java


示例11: getXmlSchemaParticle

import org.apache.ws.commons.schema.XmlSchemaParticle; //导入依赖的package包/类
protected XmlSchemaParticle getXmlSchemaParticle(XmlSchemaCollection collection, XmlSchema schema, XmlSchemaGroupBase group) {
	XmlSchemaElement element = (XmlSchemaElement) super.getXmlSchemaObject(collection, schema);
	XmlSchemaComplexType cType = XmlSchemaUtils.makeDynamic(this, new XmlSchemaComplexType(schema));
	SchemaMeta.setContainerXmlSchemaGroupBase(element, group);
	element.setType(cType);
	cType.setParticle(group);
	return element;
}
 
开发者ID:convertigo,项目名称:convertigo-engine,代码行数:9,代码来源:InputVariablesStep.java


示例12: getXmlSchemaObject

import org.apache.ws.commons.schema.XmlSchemaParticle; //导入依赖的package包/类
@Override
public XmlSchemaParticle getXmlSchemaObject(XmlSchemaCollection collection, XmlSchema schema) {
	XmlSchemaParticle particle = super.getXmlSchemaObject(collection, schema);
	long max = Long.MAX_VALUE;
	try {
		max = Integer.parseInt(getCondition());
		if (max < 0) {
			max = 0;
		}
		XmlSchemaGroupBase group = SchemaMeta.getContainerXmlSchemaGroupBase(particle);
		group.setMaxOccurs(max);
	} catch (Exception e) { }
	return particle;
}
 
开发者ID:convertigo,项目名称:convertigo-engine,代码行数:15,代码来源:IteratorStep.java


示例13: getXmlSchemaObject

import org.apache.ws.commons.schema.XmlSchemaParticle; //导入依赖的package包/类
@Override
public XmlSchemaParticle getXmlSchemaObject(XmlSchemaCollection collection, XmlSchema schema) {
	XmlSchemaElement element = (XmlSchemaElement) super.getXmlSchemaObject(collection, schema);
	String namespace = Project.getProjectTargetNamespace(projectName);
	String localpart = getRequestableName() + "ResponseType";
	element.setSchemaTypeName(new QName(namespace, localpart));
	return element;
}
 
开发者ID:convertigo,项目名称:convertigo-engine,代码行数:9,代码来源:RequestableStep.java


示例14: getXmlSchemaParticle

import org.apache.ws.commons.schema.XmlSchemaParticle; //导入依赖的package包/类
protected XmlSchemaParticle getXmlSchemaParticle(XmlSchemaCollection collection, XmlSchema schema, XmlSchemaGroupBase group) {
	XmlSchemaParticle particle = group;
	if (isOutput()) {
		XmlSchemaElement element = (XmlSchemaElement) super.getXmlSchemaObject(collection, schema);
		XmlSchemaComplexType cType = XmlSchemaUtils.makeDynamic(this, new XmlSchemaComplexType(schema));
		SchemaMeta.setContainerXmlSchemaGroupBase(element, group);
		element.setType(cType);
		cType.setParticle(group);
		particle = element;
	}
	return particle;
}
 
开发者ID:convertigo,项目名称:convertigo-engine,代码行数:13,代码来源:StepWithExpressions.java


示例15: getParameterListForOperation

import org.apache.ws.commons.schema.XmlSchemaParticle; //导入依赖的package包/类
/**
 * Retrieves list of parameter names & their type for a given operation
 * @param operation
 */
private static String getParameterListForOperation(AxisOperation operation) {
	//Logic copied from BuilderUtil.buildsoapMessage(...)
	StringBuffer paramList = new StringBuffer();
	AxisMessage axisMessage =
	    operation.getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
	XmlSchemaElement xmlSchemaElement = axisMessage.getSchemaElement();
	if(xmlSchemaElement != null){			
	    XmlSchemaType schemaType = xmlSchemaElement.getSchemaType();
	    if (schemaType instanceof XmlSchemaComplexType) {
	        XmlSchemaComplexType complexType = ((XmlSchemaComplexType)schemaType);
	        XmlSchemaParticle particle = complexType.getParticle();
	        if (particle instanceof XmlSchemaSequence || particle instanceof XmlSchemaAll) {
	            XmlSchemaGroupBase xmlSchemaGroupBase = (XmlSchemaGroupBase)particle;
	            Iterator iterator = xmlSchemaGroupBase.getItems().getIterator();

	            while (iterator.hasNext()) {
	                XmlSchemaElement innerElement = (XmlSchemaElement)iterator.next();
	                QName qName = innerElement.getQName();
	                if (qName == null && innerElement.getSchemaTypeName()
	                        .equals(org.apache.ws.commons.schema.constants.Constants.XSD_ANYTYPE)) {
	                    break;
	                }
	                long minOccurs = innerElement.getMinOccurs();
	                boolean nillable = innerElement.isNillable();
	                String name =
	                        qName != null ? qName.getLocalPart() : innerElement.getName();
	                String type = innerElement.getSchemaTypeName().toString();
	                paramList.append(","+type +" " +name);
	            }
	        }
	   }	            	
	}
	//remove first ","
	String list = paramList.toString();		
	return list.replaceFirst(",", "");
}
 
开发者ID:wso2,项目名称:wso2-axis2-transports,代码行数:41,代码来源:XMPPSender.java


示例16: processComplexType

import org.apache.ws.commons.schema.XmlSchemaParticle; //导入依赖的package包/类
private BeanWriterMetaInfoHolder processComplexType(
        QName parentElementQName,
        XmlSchemaComplexType complexType,
        XmlSchema parentSchema) throws SchemaCompilationException {
    XmlSchemaParticle particle = complexType.getParticle();
    BeanWriterMetaInfoHolder metaInfHolder = new BeanWriterMetaInfoHolder();
    if (particle != null) {
        //Process the particle
        processParticle(parentElementQName, particle, metaInfHolder, parentSchema);
    }

    //process attributes - first look for the explicit attributes
    processAttributes(complexType.getAttributes(),metaInfHolder,parentSchema);

    //process any attribute
    //somehow the xml schema parser does not seem to pickup the any attribute!!
    XmlSchemaAnyAttribute anyAtt = complexType.getAnyAttribute();
    if (anyAtt != null) {
        processAnyAttribute(metaInfHolder, anyAtt);
    }


    //process content ,either  complex or simple
    if (complexType.getContentModel() != null) {
        processContentModel(complexType.getContentModel(),
                metaInfHolder,
                parentSchema);
    }
    return metaInfHolder;
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:31,代码来源:SchemaCompiler.java


示例17: isArray

import org.apache.ws.commons.schema.XmlSchemaParticle; //导入依赖的package包/类
/**
 * Find whether a given particle is an array. The logic for deciding
 * whether a given particle is an array is depending on their minOccurs
 * and maxOccurs counts. If Maxoccurs is greater than one (1) then the
 * content is an array.
 * Also no higher level element will have the maxOccurs greater than one
 *
 * @param particle
 * @throws SchemaCompilationException
 */
private boolean isArray(XmlSchemaParticle particle) throws SchemaCompilationException {
    long minOccurs = particle.getMinOccurs();
    long maxOccurs = particle.getMaxOccurs();

    if (maxOccurs < minOccurs) {
        throw new SchemaCompilationException();
    } else {
        return (maxOccurs > 1);
    }

}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:22,代码来源:SchemaCompiler.java


示例18: hasResultRowName

import org.apache.ws.commons.schema.XmlSchemaParticle; //导入依赖的package包/类
private static boolean hasResultRowName(XmlSchemaComplexType wrapperSchemaComplexType) {
	XmlSchemaParticle wrapperSchemaParticle = wrapperSchemaComplexType.getParticle();
	// a single sequence must be there
	if (!(wrapperSchemaParticle instanceof XmlSchemaSequence)) {
		return false;
	}
	XmlSchemaSequence wrapperSchemaSequence = (XmlSchemaSequence) wrapperSchemaParticle;
	XmlSchemaObjectCollection objects = wrapperSchemaSequence.getItems(); 
	if (objects.getCount() != 1) {
		return false;
	}
	XmlSchemaObject schemaObject = objects.getItem(0); 
	if (!(schemaObject instanceof XmlSchemaElement)) {
		return false;
	}
	XmlSchemaElement schemaElement = (XmlSchemaElement) schemaObject;
	if (!((((XmlSchemaComplexType) schemaElement.getSchemaType())
			.getParticle()) instanceof XmlSchemaSequence)) {
		return false;
	}
	// cannot contain any attributes
	if (wrapperSchemaComplexType.getAttributes().getCount() > 0) {
		return false;
	}
	
	return true;
}
 
开发者ID:wso2,项目名称:carbon-data,代码行数:28,代码来源:WSDLToDataService.java


示例19: extractParticleWithRestriction

import org.apache.ws.commons.schema.XmlSchemaParticle; //导入依赖的package包/类
/**
 * Extract a particle from a complex type
 * returns null if it can't be extracted.
 */
private XmlSchemaParticle extractParticleWithRestriction(XmlSchemaComplexType complexType) {
    XmlSchemaParticle particle = complexType.getParticle();

    if (particle == null && complexType.getContentModel() != null
            && complexType.getContentModel().getContent() != null) {
        XmlSchemaContent content = complexType.getContentModel().getContent();
        if (content instanceof XmlSchemaComplexContentRestriction) {
            XmlSchemaComplexContentRestriction complexContent = (XmlSchemaComplexContentRestriction) content;
            particle = complexContent.getParticle();
        }
    }
    return particle;
}
 
开发者ID:inbloom,项目名称:secure-data-service,代码行数:18,代码来源:DidSchemaParser.java


示例20: getParticleByType

import org.apache.ws.commons.schema.XmlSchemaParticle; //导入依赖的package包/类
private XmlSchemaParticle getParticleByType(String name) {
    XmlSchemaParticle particle = null;
        for (XmlSchemaComplexType parentComplexType : complexTypes.values()) {
            if(parentComplexType.getName().equals(name)) {
                particle = extractParticle(parentComplexType);
                break;
            }
    }
    return particle;
}
 
开发者ID:inbloom,项目名称:secure-data-service,代码行数:11,代码来源:DidSchemaParser.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java CollectionLayout类代码示例发布时间:2022-05-22
下一篇:
Java UserAuthException类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap