本文整理汇总了Java中com.sun.xml.internal.xsom.XSParticle.isRepeated方法的典型用法代码示例。如果您正苦于以下问题:Java XSParticle.isRepeated方法的具体用法?Java XSParticle.isRepeated怎么用?Java XSParticle.isRepeated使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sun.xml.internal.xsom.XSParticle
的用法示例。
在下文中一共展示了XSParticle.isRepeated方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isApplicable
import com.sun.xml.internal.xsom.XSParticle; //导入方法依赖的package包/类
public boolean isApplicable(XSComplexType ct) {
if( !bgmBuilder.getGlobalBinding().isChoiceContentPropertyEnabled() )
return false;
if( ct.getBaseType()!=schemas.getAnyType() )
// My reading of the spec is that if a complex type is
// derived from another complex type by extension,
// its top level model group is always a sequence
// that combines the base type content model and
// the extension defined in the new complex type.
return false;
XSParticle p = ct.getContentType().asParticle();
if(p==null)
return false;
XSModelGroup mg = getTopLevelModelGroup(p);
if( mg.getCompositor()!=XSModelGroup.CHOICE )
return false;
if( p.isRepeated() )
return false;
return true;
}
示例2: particle
import com.sun.xml.internal.xsom.XSParticle; //导入方法依赖的package包/类
public void particle( XSParticle p ) {
if(getLocalPropCustomization(p)!=null
|| builder.getLocalDomCustomization(p)!=null) {
// if a property customization is specfied,
// check that value and turn around.
check(p);
mark(p);
return;
}
XSTerm t = p.getTerm();
if(p.isRepeated() && (t.isModelGroup() || t.isModelGroupDecl())) {
// a repeated model group gets its own property
mark(p);
return;
}
if(forcedProps.contains(p)) {
// this particle must become a property
mark(p);
return;
}
outerParticle = p;
t.visit(this);
}