本文整理汇总了Java中org.apache.xerces.xs.XSConstants.WILDCARD属性的典型用法代码示例。如果您正苦于以下问题:Java XSConstants.WILDCARD属性的具体用法?Java XSConstants.WILDCARD怎么用?Java XSConstants.WILDCARD使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.apache.xerces.xs.XSConstants
的用法示例。
在下文中一共展示了XSConstants.WILDCARD属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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;
}
示例2: 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");
}
}
示例3: getType
/**
* Get the type of the object, i.e ELEMENT_DECLARATION.
*/
public short getType() {
return XSConstants.WILDCARD;
}