当前位置: 首页>>代码示例>>Java>>正文


Java XSConstants.WILDCARD属性代码示例

本文整理汇总了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;
}
 
开发者ID:dsukhoroslov,项目名称:bagri,代码行数:40,代码来源:XmlModeler.java

示例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");
    }
}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:31,代码来源:PSVIWriter.java

示例3: getType

/**
 * Get the type of the object, i.e ELEMENT_DECLARATION.
 */
public short getType() {
    return XSConstants.WILDCARD;
}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:6,代码来源:XSWildcardDecl.java


注:本文中的org.apache.xerces.xs.XSConstants.WILDCARD属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。