Java Code Examples for com.sun.org.apache.xerces.internal.impl.xs.XSComplexTypeDecl#getParticle()

The following examples show how to use com.sun.org.apache.xerces.internal.impl.xs.XSComplexTypeDecl#getParticle() . 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: XSDHandler.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private void expandRelatedComplexTypeComponents(XSComplexTypeDecl type, Vector componentList, String namespace, Map<String, Vector> dependencies) {
    addRelatedType(type.getBaseType(), componentList, namespace, dependencies);
    expandRelatedAttributeUsesComponents(type.getAttributeUses(), componentList, namespace, dependencies);
    final XSParticle particle = type.getParticle();
    if (particle != null) {
        expandRelatedParticleComponents(particle, componentList, namespace, dependencies);
    }
}
 
Example 2
Source File: XSDHandler.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
private void expandRelatedComplexTypeComponents(XSComplexTypeDecl type, Vector componentList, String namespace, Map<String, Vector> dependencies) {
    addRelatedType(type.getBaseType(), componentList, namespace, dependencies);
    expandRelatedAttributeUsesComponents(type.getAttributeUses(), componentList, namespace, dependencies);
    final XSParticle particle = type.getParticle();
    if (particle != null) {
        expandRelatedParticleComponents(particle, componentList, namespace, dependencies);
    }
}
 
Example 3
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 4
Source File: XSDHandler.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
private void expandRelatedComplexTypeComponents(XSComplexTypeDecl type, Vector componentList, String namespace, Map<String, Vector> dependencies) {
    addRelatedType(type.getBaseType(), componentList, namespace, dependencies);
    expandRelatedAttributeUsesComponents(type.getAttributeUses(), componentList, namespace, dependencies);
    final XSParticle particle = type.getParticle();
    if (particle != null) {
        expandRelatedParticleComponents(particle, componentList, namespace, dependencies);
    }
}
 
Example 5
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 6
Source File: XSDHandler.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
private void expandRelatedComplexTypeComponents(XSComplexTypeDecl type, Vector componentList, String namespace, Map<String, Vector> dependencies) {
    addRelatedType(type.getBaseType(), componentList, namespace, dependencies);
    expandRelatedAttributeUsesComponents(type.getAttributeUses(), componentList, namespace, dependencies);
    final XSParticle particle = type.getParticle();
    if (particle != null) {
        expandRelatedParticleComponents(particle, componentList, namespace, dependencies);
    }
}
 
Example 7
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 8
Source File: XSDHandler.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private void expandRelatedComplexTypeComponents(XSComplexTypeDecl type, Vector componentList, String namespace, Map<String, Vector> dependencies) {
    addRelatedType(type.getBaseType(), componentList, namespace, dependencies);
    expandRelatedAttributeUsesComponents(type.getAttributeUses(), componentList, namespace, dependencies);
    final XSParticle particle = type.getParticle();
    if (particle != null) {
        expandRelatedParticleComponents(particle, componentList, namespace, dependencies);
    }
}
 
Example 9
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;
}
 
Example 10
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 11
Source File: XSDHandler.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
private void expandRelatedComplexTypeComponents(XSComplexTypeDecl type, Vector componentList, String namespace, Map<String, Vector> dependencies) {
    addRelatedType(type.getBaseType(), componentList, namespace, dependencies);
    expandRelatedAttributeUsesComponents(type.getAttributeUses(), componentList, namespace, dependencies);
    final XSParticle particle = type.getParticle();
    if (particle != null) {
        expandRelatedParticleComponents(particle, componentList, namespace, dependencies);
    }
}
 
Example 12
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 13
Source File: XSDHandler.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private void expandRelatedComplexTypeComponents(XSComplexTypeDecl type, Vector componentList, String namespace, Map<String, Vector> dependencies) {
    addRelatedType(type.getBaseType(), componentList, namespace, dependencies);
    expandRelatedAttributeUsesComponents(type.getAttributeUses(), componentList, namespace, dependencies);
    final XSParticle particle = type.getParticle();
    if (particle != null) {
        expandRelatedParticleComponents(particle, componentList, namespace, dependencies);
    }
}
 
Example 14
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 15
Source File: XSDHandler.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
private void expandRelatedComplexTypeComponents(XSComplexTypeDecl type, Vector componentList, String namespace, Map<String, Vector> dependencies) {
    addRelatedType(type.getBaseType(), componentList, namespace, dependencies);
    expandRelatedAttributeUsesComponents(type.getAttributeUses(), componentList, namespace, dependencies);
    final XSParticle particle = type.getParticle();
    if (particle != null) {
        expandRelatedParticleComponents(particle, componentList, namespace, dependencies);
    }
}
 
Example 16
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 17
Source File: XSDHandler.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
private void expandRelatedComplexTypeComponents(XSComplexTypeDecl type, Vector componentList, String namespace, Map<String, Vector> dependencies) {
    addRelatedType(type.getBaseType(), componentList, namespace, dependencies);
    expandRelatedAttributeUsesComponents(type.getAttributeUses(), componentList, namespace, dependencies);
    final XSParticle particle = type.getParticle();
    if (particle != null) {
        expandRelatedParticleComponents(particle, componentList, namespace, dependencies);
    }
}
 
Example 18
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 19
Source File: XSDHandler.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private void expandRelatedComplexTypeComponents(XSComplexTypeDecl type, Vector componentList, String namespace, Map<String, Vector> dependencies) {
    addRelatedType(type.getBaseType(), componentList, namespace, dependencies);
    expandRelatedAttributeUsesComponents(type.getAttributeUses(), componentList, namespace, dependencies);
    final XSParticle particle = type.getParticle();
    if (particle != null) {
        expandRelatedParticleComponents(particle, componentList, namespace, dependencies);
    }
}
 
Example 20
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;
}