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


Java XSConstants.MODEL_GROUP属性代码示例

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

}
 
开发者ID:SentinelDataHub,项目名称:dhus-core,代码行数:23,代码来源:SentinelXsdDumpMetadata.java

示例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;
}
 
开发者ID:dsukhoroslov,项目名称:bagri,代码行数:40,代码来源:XmlModeler.java

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

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

示例5: getType

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


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