本文整理汇总了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;
}
示例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;
}
示例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;
}