Java Code Examples for com.sun.org.apache.xerces.internal.impl.xs.XSComplexTypeDecl#CONTENTTYPE_SIMPLE

The following examples show how to use com.sun.org.apache.xerces.internal.impl.xs.XSComplexTypeDecl#CONTENTTYPE_SIMPLE . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CMBuilder.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * 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;
}
 
Example 2
Source File: CMBuilder.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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;
}
 
Example 3
Source File: CMBuilder.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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;
}
 
Example 4
Source File: CMBuilder.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * 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;
}
 
Example 5
Source File: CMBuilder.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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;
}
 
Example 6
Source File: CMBuilder.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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;
}
 
Example 7
Source File: CMBuilder.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * 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;
}
 
Example 8
Source File: CMBuilder.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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;
}
 
Example 9
Source File: CMBuilder.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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;
}
 
Example 10
Source File: CMBuilder.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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;
}
 
Example 11
Source File: CMBuilder.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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;
}