org.eclipse.xsd.XSDParticle.isSetMinOccurs()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(1.6k)|赞(0)|评价(0)|浏览(105)

本文整理了Java中org.eclipse.xsd.XSDParticle.isSetMinOccurs()方法的一些代码示例,展示了XSDParticle.isSetMinOccurs()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSDParticle.isSetMinOccurs()方法的具体详情如下:
包路径:org.eclipse.xsd.XSDParticle
类名称:XSDParticle
方法名:isSetMinOccurs

XSDParticle.isSetMinOccurs介绍

[英]Returns whether the value of the ' org.eclipse.xsd.XSDParticle#getMinOccurs' attribute is set.
[中]返回“org”的值。日食xsd。已设置XSDParticle#getMinOccurs属性。

代码示例

代码示例来源:origin: geotools/geotools

public void visit(XSDParticle particle) {
    XSDElementDeclaration decl = (XSDElementDeclaration) particle.getContent();
    if (decl.isElementDeclarationReference()) {
      decl = decl.getResolvedElementDeclaration();
    }
    if (decl == fElement) {
      if (particle.isSetMinOccurs()) {
        minOccurs.add(Integer.valueOf(particle.getMinOccurs()));
      } else if (particle.getContainer() instanceof XSDModelGroup
          && particle.getContainer().getContainer()
              instanceof XSDParticle) {
        particle = (XSDParticle) particle.getContainer().getContainer();
        minOccurs.add(Integer.valueOf(particle.getMinOccurs()));
      } else {
        minOccurs.add(1);
      }
    }
  }
};

代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui

public static int getMinOccurs(XSDConcreteComponent component)
{
 int minOccur = -2;
 if (component != null)
 {
  Object o = component.getContainer();
  if (o instanceof XSDParticle)
  {
   if (((XSDParticle) o).isSetMinOccurs())
   {
    try
    {
     minOccur = ((XSDParticle) o).getMinOccurs();
    }
    catch (Exception e)
    {
    }
   }
  }
 }
 return minOccur;
}

代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui

XSDParticle parentParticle = (XSDParticle)parent;
if (parentParticle.isSetMinOccurs()) {
 particle.setMinOccurs(parentParticle.getMinOccurs());
 parentParticle.unsetMinOccurs();

相关文章