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


Java XSParticle.isRepeated方法代码示例

本文整理汇总了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;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:27,代码来源:ChoiceContentComplexTypeBuilder.java

示例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);
        }
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:29,代码来源:DefaultParticleBinder.java


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