本文整理汇总了Java中com.sun.xml.xsom.XSTerm类的典型用法代码示例。如果您正苦于以下问题:Java XSTerm类的具体用法?Java XSTerm怎么用?Java XSTerm使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
XSTerm类属于com.sun.xml.xsom包,在下文中一共展示了XSTerm类的16个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: groupProcessing
import com.sun.xml.xsom.XSTerm; //导入依赖的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: groupProcessing
import com.sun.xml.xsom.XSTerm; //导入依赖的package包/类
private void groupProcessing( XSModelGroup modelGroup, XSParticle particle, TypeInlineDefinition jolieType )
throws ConversionException
{
XSModelGroup.Compositor compositor = modelGroup.getCompositor();
// We handle "all" and "sequence", but not "choice"
if ( compositor.equals( XSModelGroup.ALL ) || compositor.equals( XSModelGroup.SEQUENCE ) ) {
if ( compositor.equals( XSModelGroup.SEQUENCE ) ) {
log( Level.WARNING, WARNING_SEQUENCE );
}
XSParticle[] children = modelGroup.getChildren();
XSTerm currTerm;
for( int i = 0; i < children.length; i++ ) {
currTerm = children[i].getTerm();
if ( currTerm.isModelGroup() ) {
groupProcessing( currTerm.asModelGroup(), particle, jolieType );
} else {
// Create the new complex type for root types
navigateSubTypes( children[i], jolieType );
}
}
} else if ( compositor.equals( XSModelGroup.CHOICE ) ) {
throw new ConversionException( ERROR_CHOICE );
}
}
开发者ID:jolie,项目名称:jolie,代码行数:27,代码来源:XsdToJolieConverterImpl.java
示例3: findModelGroups
import com.sun.xml.xsom.XSTerm; //导入依赖的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
示例4: setDocComment
import com.sun.xml.xsom.XSTerm; //导入依赖的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
示例5: 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
示例6: 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
示例7: 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
示例8: _valueToDocument
import com.sun.xml.xsom.XSTerm; //导入依赖的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
示例9: loadComplexType
import com.sun.xml.xsom.XSTerm; //导入依赖的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
示例10: getModelGroup
import com.sun.xml.xsom.XSTerm; //导入依赖的package包/类
private XSModelGroup getModelGroup( XSModelGroupDecl modelGroupDecl, XSTerm term )
{
if ( (modelGroupDecl = term.asModelGroupDecl()) != null ) {
return modelGroupDecl.getModelGroup();
} else if ( term.isModelGroup() ) {
return term.asModelGroup();
} else {
return null;
}
}
开发者ID:jolie,项目名称:jolie,代码行数:11,代码来源:XsdToJolieConverterImpl.java
示例11: findElementDecls
import com.sun.xml.xsom.XSTerm; //导入依赖的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
示例12: 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
示例13: getTerm
import com.sun.xml.xsom.XSTerm; //导入依赖的package包/类
/** Obtains a reference as a term. */
XSTerm getTerm();
开发者ID:jolie,项目名称:jolie,代码行数:3,代码来源:Ref.java
示例14: getTerm
import com.sun.xml.xsom.XSTerm; //导入依赖的package包/类
public XSTerm getTerm() { return get(); }
开发者ID:jolie,项目名称:jolie,代码行数:2,代码来源:DelayedRef.java
示例15: getTerm
import com.sun.xml.xsom.XSTerm; //导入依赖的package包/类
public XSTerm getTerm() { return this; }
开发者ID:jolie,项目名称:jolie,代码行数:2,代码来源:ModelGroupDeclImpl.java
示例16: getTerm
import com.sun.xml.xsom.XSTerm; //导入依赖的package包/类
public XSTerm getTerm() { return term.getTerm(); }
开发者ID:jolie,项目名称:jolie,代码行数:2,代码来源:ParticleImpl.java
注:本文中的com.sun.xml.xsom.XSTerm类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论