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


Java XSParticle.getTerm方法代码示例

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


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

示例1: groupProcessing

import com.sun.xml.xsom.XSParticle; //导入方法依赖的package包/类
private void groupProcessing(
	Value value,
	XSElementDecl xsDecl,
	SOAPElement element,
	SOAPEnvelope envelope,
	boolean first,
	XSModelGroup modelGroup,
	XSSchemaSet sSet,
	String messageNamespace )
	throws SOAPException
{

	XSParticle[] children = modelGroup.getChildren();
	XSTerm currTerm;
	for( XSParticle child : children ) {
		currTerm = child.getTerm();
		if ( currTerm.isModelGroup() ) {
			groupProcessing( value, xsDecl, element, envelope, first, currTerm.asModelGroup(), sSet, messageNamespace );
		} else {
			termProcessing( value, element, envelope, first, currTerm, child.getMaxOccurs(), sSet, messageNamespace );
		}
	}
}
 
开发者ID:jolie,项目名称:jolie,代码行数:24,代码来源:SoapProtocol.java

示例2: findModelGroups

import com.sun.xml.xsom.XSParticle; //导入方法依赖的package包/类
private static Collection<? extends XSDeclaration> findModelGroups(final XSComplexType complexType) {
	XSContentType contentType = complexType.getExplicitContent();
	if (contentType == null) {
		contentType = complexType.getContentType();
	}
	final XSParticle particle = contentType.asParticle();
	if (particle != null && !particle.isRepeated()) {
		final XSTerm term = particle.getTerm();
		if (term instanceof XSModelGroupDecl) {
			return Collections.singletonList((XSModelGroupDecl)term);
		} else {
			final XSModelGroup modelGroup = term.asModelGroup();
			return modelGroup != null ? findModelGroups(modelGroup) : Collections.<XSModelGroupDecl>emptyList();
		}
	} else {
		return Collections.emptyList();
	}
}
 
开发者ID:mklemm,项目名称:jaxb2-rich-contract-plugin,代码行数:19,代码来源:GroupInterfaceGenerator.java

示例3: setDocComment

import com.sun.xml.xsom.XSParticle; //导入方法依赖的package包/类
private static void setDocComment(FieldOutline fo, FieldInfo attrInfo) {
    XSComponent xsComp = fo.getPropertyInfo().getSchemaComponent();
    if (xsComp != null && xsComp instanceof XSParticle) {
        XSParticle xsParticle = (XSParticle) xsComp;
        XSTerm xsTerm = xsParticle.getTerm();
        XSElementDecl elemndecl = xsTerm.asElementDecl();
        if (elemndecl.getDefaultValue() != null) {
            attrInfo.setValue(elemndecl.getDefaultValue().value);
            attrInfo.setFixedValue(false);
        } else if (elemndecl.getFixedValue() != null) {
            attrInfo.setValue(elemndecl.getFixedValue().value);
            attrInfo.setFixedValue(true);
        }

        String attrDoc = ModelBuilder.getDocumentation(xsTerm);
        attrInfo.setDocComment(attrDoc);
    }
}
 
开发者ID:agodet,项目名称:wadlcodegenerator,代码行数:19,代码来源:ClassModelBuilder.java

示例4: addSchemaElements

import com.sun.xml.xsom.XSParticle; //导入方法依赖的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

示例5: isMultiValued

import com.sun.xml.xsom.XSParticle; //导入方法依赖的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

示例6: hasAnnotation

import com.sun.xml.xsom.XSParticle; //导入方法依赖的package包/类
public static BIDeclaration hasAnnotation(ClassOutline classOutline, JFieldVar field, QName qname) {
    CPropertyInfo propertyInfo = classOutline.target.getProperty(field.name());
    if (propertyInfo == null || !(propertyInfo.getSchemaComponent() instanceof XSParticle)) {
        return null;
    }
    XSParticle particle = (XSParticle)propertyInfo.getSchemaComponent();
    if (particle.getTerm() == null) {
        return null;
    }
    XSAnnotation annotation = particle.getTerm().getAnnotation(false);
    
    return hasAnnotation(annotation, qname);
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:14,代码来源:ProcessorUtils.java

示例7: _valueToDocument

import com.sun.xml.xsom.XSParticle; //导入方法依赖的package包/类
private static void _valueToDocument( Value value, Element element, Document doc, XSType type )
{
	if ( type.isSimpleType() ) {
		element.appendChild( doc.createTextNode( value.strValue() ) );
	} else if ( type.isComplexType() ) {
		String name;
		Value currValue;
		XSComplexType complexType = type.asComplexType();

		// Iterate over attributes
		Collection< ? extends XSAttributeUse > attributeUses = complexType.getAttributeUses();
		for( XSAttributeUse attrUse : attributeUses ) {
			name = attrUse.getDecl().getName();
			if ( (currValue=getAttributeOrNull( value, name )) != null ) {
				element.setAttribute( name, currValue.strValue() );
			}
		}

		XSContentType contentType = complexType.getContentType();
		XSParticle particle = contentType.asParticle();
		if ( contentType.asSimpleType() != null ) {
			element.appendChild( doc.createTextNode( value.strValue() ) );
		} else if ( particle != null ) {
			XSTerm term = particle.getTerm();
			XSModelGroupDecl modelGroupDecl;
			XSModelGroup modelGroup = null;
			if ( (modelGroupDecl=term.asModelGroupDecl()) != null ) {
				modelGroup = modelGroupDecl.getModelGroup();
			} else if ( term.isModelGroup() ) {
				modelGroup = term.asModelGroup();
			}
			if ( modelGroup != null ) {
				_valueToDocument( value, element, doc, modelGroup );
			}
		}
	}
}
 
开发者ID:jolie,项目名称:jolie,代码行数:38,代码来源:XmlUtils.java

示例8: loadComplexType

import com.sun.xml.xsom.XSParticle; //导入方法依赖的package包/类
private TypeDefinition loadComplexType( XSComplexType complexType, boolean lazy, TypeDefinition lazyType )
	throws ConversionException
{
	XSParticle particle;
	XSContentType contentType;
	contentType = complexType.getContentType();

	if ( (particle = contentType.asParticle()) == null ) {
		return null;//createAnyOrUndefined( complexType.getName(), complexType );

	}

	TypeInlineDefinition jolieType;

	if ( lazy ) {
		jolieType = (TypeInlineDefinition) lazyType;
	} else {
		jolieType = createComplexType( complexType, complexType.getName().replace("-","_") + TYPE_SUFFIX, particle );
	}

	if ( contentType.asSimpleType() != null ) {
		checkStrictModeForSimpleType( contentType );

	} else if ( (particle = contentType.asParticle()) != null ) {
		XSTerm term = particle.getTerm();
		XSModelGroupDecl modelGroupDecl = null;
		XSModelGroup modelGroup = null;
		modelGroup = getModelGroup( modelGroupDecl, term );


		if ( modelGroup != null ) {
			groupProcessing( modelGroup, particle, jolieType );
		}
	}
	return jolieType;


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

示例9: hasAnnotation

import com.sun.xml.xsom.XSParticle; //导入方法依赖的package包/类
public static BIDeclaration hasAnnotation(ClassOutline classOutline, JFieldVar field, QName qname) {
    CPropertyInfo propertyInfo = classOutline.target.getProperty(field.name());
    if (propertyInfo == null || !(propertyInfo.getSchemaComponent() instanceof XSParticle)) {
        return null;
    }
    XSParticle particle = (XSParticle)propertyInfo.getSchemaComponent();
    if (particle.getTerm() == null) {
        return null;
    }
    XSAnnotation annotation = particle.getTerm().getAnnotation(false);

    return hasAnnotation(annotation, qname);
}
 
开发者ID:Evolveum,项目名称:midpoint,代码行数:14,代码来源:ProcessorUtils.java

示例10: findElementDecls

import com.sun.xml.xsom.XSParticle; //导入方法依赖的package包/类
private List<PropertyUse> findElementDecls(final XSModelGroupDecl modelGroup) {
	final List<PropertyUse> elementDecls = new ArrayList<>();
	for (final XSParticle child : modelGroup.getModelGroup()) {
		XSTerm term = child.getTerm();
		if (term instanceof XSElementDecl) {
			elementDecls.add(new PropertyUse(term));
		} else if (term instanceof XSModelGroupDecl && ((XSModelGroupDecl)term).getName().equals(modelGroup.getName())) {
			elementDecls.addAll(findElementDecls((XSModelGroupDecl)term));
		}
	}
	return elementDecls;
}
 
开发者ID:mklemm,项目名称:jaxb2-rich-contract-plugin,代码行数:13,代码来源:GroupInterfaceGenerator.java

示例11: createGroup

import com.sun.xml.xsom.XSParticle; //导入方法依赖的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

示例12: isNullableNillable

import com.sun.xml.xsom.XSParticle; //导入方法依赖的package包/类
private boolean isNullableNillable(FieldOutline fieldOutline) {
	CPropertyInfo propertyInfo = fieldOutline.getPropertyInfo();
	XSComponent schemaComponent = propertyInfo.getSchemaComponent();
	if (schemaComponent instanceof XSParticle) {
		XSParticle particle = (XSParticle) schemaComponent;
		if (particle.getMinOccurs().equals(new BigInteger("0"))
				&& particle.getTerm() instanceof XSElementDecl) {
			XSElementDecl elementDecl = (XSElementDecl) particle.getTerm();
			if (elementDecl.isNillable()) {
				return true;
			}
		}
	}
	return false;
}
 
开发者ID:destin,项目名称:SO-answers,代码行数:16,代码来源:NullableNillablePlugin.java


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