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


Java XSModelGroupImpl.MODELGROUP_ALL属性代码示例

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


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

示例1: hasAllContent

protected boolean hasAllContent(XSParticleDecl particle) {
    // If the content is not empty, is the top node ALL?
    if (particle != null && particle.fType == XSParticleDecl.PARTICLE_MODELGROUP) {
        return ((XSModelGroupImpl)particle.fValue).fCompositor == XSModelGroupImpl.MODELGROUP_ALL;
    }

    return false;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:XSDAbstractParticleTraverser.java

示例2: getContentModel

/**
 * Get content model for the a given type
 *
 * @param typeDecl  get content model for which complex type
 * @return          a content model validator
 */
public XSCMValidator getContentModel(XSComplexTypeDecl typeDecl) {

    // for complex type with empty or simple content,
    // there is no content model validator
    short contentType = typeDecl.getContentType();
    if (contentType == XSComplexTypeDecl.CONTENTTYPE_SIMPLE ||
        contentType == XSComplexTypeDecl.CONTENTTYPE_EMPTY) {
        return null;
    }

    XSParticleDecl particle = (XSParticleDecl)typeDecl.getParticle();

    // if the content is element only or mixed, but no particle
    // is defined, return the empty content model
    if (particle == null)
        return fEmptyCM;

    // if the content model contains "all" model group,
    // we create an "all" content model, otherwise a DFA content model
    XSCMValidator cmValidator = null;
    if (particle.fType == XSParticleDecl.PARTICLE_MODELGROUP &&
        ((XSModelGroupImpl)particle.fValue).fCompositor == XSModelGroupImpl.MODELGROUP_ALL) {
        cmValidator = createAllCM(particle);
    }
    else {
        cmValidator = createDFACM(particle);
    }

    //now we are throught building content model and have passed sucessfully of the nodecount check
    //if set by the application
    fNodeFactory.resetNodeCount() ;

    // if the validator returned is null, it means there is nothing in
    // the content model, so we return the empty content model.
    if (cmValidator == null)
        cmValidator = fEmptyCM;

    return cmValidator;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:45,代码来源:CMBuilder.java

示例3: getContentModel

/**
 * Get content model for the a given type
 *
 * @param typeDecl  get content model for which complex type
 * @param forUPA    a flag indicating whether it is for UPA
 * @return          a content model validator
 */
public XSCMValidator getContentModel(XSComplexTypeDecl typeDecl, boolean forUPA) {

    // for complex type with empty or simple content,
    // there is no content model validator
    short contentType = typeDecl.getContentType();
    if (contentType == XSComplexTypeDecl.CONTENTTYPE_SIMPLE ||
        contentType == XSComplexTypeDecl.CONTENTTYPE_EMPTY) {
        return null;
    }

    XSParticleDecl particle = (XSParticleDecl)typeDecl.getParticle();

    // if the content is element only or mixed, but no particle
    // is defined, return the empty content model
    if (particle == null)
        return fEmptyCM;

    // if the content model contains "all" model group,
    // we create an "all" content model, otherwise a DFA content model
    XSCMValidator cmValidator = null;
    if (particle.fType == XSParticleDecl.PARTICLE_MODELGROUP &&
        ((XSModelGroupImpl)particle.fValue).fCompositor == XSModelGroupImpl.MODELGROUP_ALL) {
        cmValidator = createAllCM(particle);
    }
    else {
        cmValidator = createDFACM(particle, forUPA);
    }

    //now we are throught building content model and have passed sucessfully of the nodecount check
    //if set by the application
    fNodeFactory.resetNodeCount() ;

    // if the validator returned is null, it means there is nothing in
    // the content model, so we return the empty content model.
    if (cmValidator == null)
        cmValidator = fEmptyCM;

    return cmValidator;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:46,代码来源:CMBuilder.java


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