本文整理汇总了Java中org.apache.xerces.xs.XSConstants.MODEL_GROUP属性的典型用法代码示例。如果您正苦于以下问题:Java XSConstants.MODEL_GROUP属性的具体用法?Java XSConstants.MODEL_GROUP怎么用?Java XSConstants.MODEL_GROUP使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.apache.xerces.xs.XSConstants
的用法示例。
在下文中一共展示了XSConstants.MODEL_GROUP属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: dumpParticle
private static void dumpParticle(String path, XSParticle particle)
{
XSTerm term = particle.getTerm();
switch (term.getType())
{
case XSConstants.ELEMENT_DECLARATION:
dumpElement(path, (XSElementDeclaration) term);
break;
case XSConstants.MODEL_GROUP:
XSModelGroup model_group = (XSModelGroup) term;
final XSObjectList particles = model_group.getParticles();
for (int ipar = 0; ipar < particles.getLength(); ipar++)
{
dumpParticle(path, (XSParticle) particles.item(ipar));
}
break;
default:
System.err.println(path + " - UNKNOWN");
}
}
示例2: processParticle
private Path processParticle(Path parent, String path, XSParticle xsParticle, Map<String, List<XSElementDeclaration>> substitutions,
List<XSElementDeclaration> parents) throws BagriException {
if (xsParticle == null) {
return parent;
}
XSTerm xsTerm = xsParticle.getTerm();
Path particle = parent;
switch (xsTerm.getType()) {
case XSConstants.ELEMENT_DECLARATION:
particle = processElement(parent, path, (XSElementDeclaration) xsTerm, substitutions, parents, xsParticle.getMinOccurs(), xsParticle.getMaxOccurs());
break;
case XSConstants.MODEL_GROUP:
// this is one of the globally defined groups
// (found in top-level declarations)
XSModelGroup xsGroup = (XSModelGroup) xsTerm;
// it also consists of particles
XSObjectList xsParticleList = xsGroup.getParticles();
for (int i = 0; i < xsParticleList.getLength(); i ++) {
XSParticle xsp = (XSParticle) xsParticleList.item(i);
particle = processParticle(parent, path, xsp, substitutions, parents);
}
//...
break;
case XSConstants.WILDCARD:
//...
break;
}
return particle;
}
示例3: expandRelatedParticleComponents
private void expandRelatedParticleComponents(XSParticle component, Vector componentList,
String namespace, Hashtable dependencies) {
XSTerm term = component.getTerm();
switch (term.getType()) {
case XSConstants.ELEMENT_DECLARATION :
addRelatedElement((XSElementDeclaration) term, componentList, namespace, dependencies);
break;
case XSConstants.MODEL_GROUP :
expandRelatedModelGroupComponents((XSModelGroup) term, componentList, namespace, dependencies);
break;
default:
break;
}
}
示例4: processPSVIParticle
private void processPSVIParticle(XSParticle part) {
if (part == null) {
sendElementEvent("psv:particle");
}
else {
sendIndentedElement("psv:particle");
sendElementEvent(
"psv:minOccurs",
String.valueOf(part.getMinOccurs()));
sendElementEvent(
"psv:maxOccurs",
part.getMaxOccurs() == SchemaSymbols.OCCURRENCE_UNBOUNDED
? "unbounded"
: String.valueOf(part.getMaxOccurs()));
sendIndentedElement("psv:term");
switch (part.getTerm().getType()) {
case XSConstants.ELEMENT_DECLARATION :
processPSVIElementDeclarationOrRef(
(XSElementDeclaration)part.getTerm());
break;
case XSConstants.MODEL_GROUP :
processPSVIModelGroup((XSModelGroup)part.getTerm());
break;
case XSConstants.WILDCARD :
processPSVIWildcard((XSWildcard)part.getTerm());
break;
}
sendUnIndentedElement("psv:term");
sendUnIndentedElement("psv:particle");
}
}
示例5: getType
/**
* Get the type of the object, i.e ELEMENT_DECLARATION.
*/
public short getType() {
return XSConstants.MODEL_GROUP;
}