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


Java XSTerm.isElementDecl方法代码示例

本文整理汇总了Java中com.sun.xml.xsom.XSTerm.isElementDecl方法的典型用法代码示例。如果您正苦于以下问题:Java XSTerm.isElementDecl方法的具体用法?Java XSTerm.isElementDecl怎么用?Java XSTerm.isElementDecl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.sun.xml.xsom.XSTerm的用法示例。


在下文中一共展示了XSTerm.isElementDecl方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addSchemaElements

import com.sun.xml.xsom.XSTerm; //导入方法依赖的package包/类
private void addSchemaElements() {
	for (Map.Entry<String, XSComplexType> entry : schemaObject
			.getComplexTypes().entrySet()) {
		XSContentType content = entry.getValue().getContentType();
		XSParticle particle = content.asParticle();
		if (particle != null) {
			XSTerm term = particle.getTerm();
			if (term.isModelGroup()) {
				XSParticle[] particles = term.asModelGroup().getChildren();
				for (XSParticle p : particles) {
					XSTerm pterm = p.getTerm();
					if (pterm.isElementDecl()) {
						XSElementDecl e = pterm.asElementDecl();
						schemaElements.put(e.getName(), e);
					}
				}
			}
		}
	}
}
 
开发者ID:impactcentre,项目名称:iif-generic-soap-client,代码行数:21,代码来源:WsdlDocument.java

示例2: isMultiValued

import com.sun.xml.xsom.XSTerm; //导入方法依赖的package包/类
/**
 * Checks if "maxOccurs" of the element definition is greater than 1, i.e.,
 * if the SOAP message can contain several values for one input
 * 
 * @param inputName
 *            The element name
 * @return
 */
public boolean isMultiValued(String inputName) {
	for (Map.Entry<String, XSComplexType> entry : schemaObject
			.getComplexTypes().entrySet()) {
		XSContentType content = entry.getValue().getContentType();
		XSParticle particle = content.asParticle();
		if (particle != null) {
			XSTerm term = particle.getTerm();
			if (term.isModelGroup()) {
				XSParticle[] particles = term.asModelGroup().getChildren();
				for (XSParticle p : particles) {
					XSTerm pterm = p.getTerm();
					if (pterm.isElementDecl()) {
						XSElementDecl e = pterm.asElementDecl();
						if (e.getName().equals(inputName)) {
							return p.isRepeated();
						}
					}
				}
			}
		}
	}

	return false;
}
 
开发者ID:impactcentre,项目名称:iif-generic-soap-client,代码行数:33,代码来源:WsdlDocument.java

示例3: termProcessing

import com.sun.xml.xsom.XSTerm; //导入方法依赖的package包/类
private void termProcessing( Value value, SOAPElement element, SOAPEnvelope envelope, boolean first,
	XSTerm currTerm, int getMaxOccur,
	XSSchemaSet sSet, String messageNamespace )
	throws SOAPException
{

	if ( currTerm.isElementDecl() ) {
		ValueVector vec;
		XSElementDecl currElementDecl = currTerm.asElementDecl();
		String name = currElementDecl.getName();
		String prefix = (first) ? getPrefix( currElementDecl ) : getPrefixOrNull( currElementDecl );
		SOAPElement childElement;
		if ( (vec = value.children().get( name )) != null ) {
			int k = 0;
			while( vec.size() > 0 && (getMaxOccur > k || getMaxOccur == XSParticle.UNBOUNDED) ) {
				if ( prefix == null ) {
					childElement = element.addChildElement( name );
				} else {
					childElement = element.addChildElement( name, prefix );
				}
				Value v = vec.remove( 0 );
				valueToTypedSOAP(
					v,
					currElementDecl,
					childElement,
					envelope,
					false,
					sSet,
					messageNamespace );
				k++;
			}
		}
	}

}
 
开发者ID:jolie,项目名称:jolie,代码行数:36,代码来源:SoapProtocol.java

示例4: createGroup

import com.sun.xml.xsom.XSTerm; //导入方法依赖的package包/类
private void createGroup(XSModelGroupDecl modelGroupDecl) {
	EClass eClass = ecoreFactory.createEClass();
	eClass.setName(modelGroupDecl.getName());
	ePackage.getEClassifiers().add(eClass);
	for (XSParticle particle : modelGroupDecl.getModelGroup().getChildren()) {
		XSTerm term = particle.getTerm();
		if (term.isElementDecl()) {
			String name = term.asElementDecl().getName();
			EClassifier subClass = ePackage.getEClassifier(name);
			if (subClass != null && subClass instanceof EClass) {
				((EClass) subClass).getESuperTypes().add(eClass);
			}
		}
	}
}
 
开发者ID:opensourceBIM,项目名称:BIMserver,代码行数:16,代码来源:XSDSchemaReader.java


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