本文整理了Java中org.eclipse.xsd.XSDParticle.getMinOccurs()
方法的一些代码示例,展示了XSDParticle.getMinOccurs()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSDParticle.getMinOccurs()
方法的具体详情如下:
包路径:org.eclipse.xsd.XSDParticle
类名称:XSDParticle
方法名:getMinOccurs
[英]Returns the value of the 'Min Occurs' attribute. The default value is "1"
.
This represents the min occurs infoset property.
[中]返回“Min Occurs”属性的值。默认值为[$0$]。
这表示min occursinfoset属性。
代码示例来源:origin: geoserver/geoserver
if (ce.getContainer() instanceof XSDParticle) {
XSDParticle part = (XSDParticle) ce.getContainer();
at.setMinOccurs(part.getMinOccurs());
at.setMaxOccurs(part.getMaxOccurs());
代码示例来源: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: geotools/geotools
if (particle.getMinOccurs() == 0) {
代码示例来源:origin: geotools/geotools
int min = particle.getMinOccurs();
int max = particle.getMaxOccurs();
代码示例来源:origin: geotools/geotools
int minOccurs = particle.getMinOccurs();
int maxOccurs = particle.getMaxOccurs();
if (maxOccurs == -1) {
代码示例来源:origin: geotools/geotools
XSDFactory.eINSTANCE.createXSDParticle();
substitutedChildParticle.setMaxOccurs(childParticle.getMaxOccurs());
substitutedChildParticle.setMinOccurs(childParticle.getMinOccurs());
XSDElementDeclaration wrapper =
XSDFactory.eINSTANCE.createXSDElementDeclaration();
代码示例来源:origin: geotools/geotools
throw new RuntimeException();
int minOccurs = particle.getMinOccurs();
int maxOccurs = particle.getMaxOccurs();
if (maxOccurs == -1) {
代码示例来源:origin: org.geotools.xsd/gt-core
public void visit(XSDParticle particle) {
XSDElementDeclaration decl = (XSDElementDeclaration) particle.getContent();
if (decl.isElementDeclarationReference()) {
decl = decl.getResolvedElementDeclaration();
}
if (decl == fElement) {
minOccurs.add(new Integer(particle.getMinOccurs()));
}
}
};
代码示例来源:origin: org.geotools/gt2-xml-core
public void visit(XSDParticle particle) {
XSDElementDeclaration decl = (XSDElementDeclaration) particle.getContent();
if (decl.isElementDeclarationReference()) {
decl = decl.getResolvedElementDeclaration();
}
if (decl == fElement) {
minOccurs.add(new Integer(particle.getMinOccurs()));
}
}
};
代码示例来源: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
int min = ((XSDParticle) xsdWildcard.getContainer()).getMinOccurs();
if (min == XSDParticle.UNBOUNDED)
int min = ((XSDParticle) xsdWildcard.getContainer()).getMinOccurs();
result.append(String.valueOf(min));
代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui
if (hasMinOccurs)
int min = ((XSDParticle) xsdModelGroup.getContainer()).getMinOccurs();
if (min == XSDParticle.UNBOUNDED)
int min = ((XSDParticle) xsdModelGroup.getContainer()).getMinOccurs();
result.append(String.valueOf(min));
代码示例来源:origin: org.eclipse.emf/org.eclipse.xsd.edit
@Override
public String getText(Object object)
{
XSDParticle xsdParticle = ((XSDParticle)object);
XSDParticleContent xsdParticleContent = getDelegate(xsdParticle);
if (xsdParticleContent != null)
{
return itemDelegator.getText(xsdParticleContent);
}
else
{
return
xsdParticle.getMinOccurs() +
".." +
(xsdParticle.getMaxOccurs() == -1 ? "unbounded" : Integer.toString(xsdParticle.getMaxOccurs()));
}
}
代码示例来源:origin: org.eclipse.xsd/org.eclipse.xsd
return xsdModelGroup.getParticles().isEmpty() && xsdParticle.getMinOccurs() == 0;
代码示例来源:origin: org.eclipse/org.eclipse.xsd
return xsdModelGroup.getParticles().isEmpty() && xsdParticle.getMinOccurs() == 0;
代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui
public void execute()
{
Element element = component.getElement();
try
{
beginRecording(element);
String currentMin = element.getAttribute(XSDConstants.MINOCCURS_ATTRIBUTE);
removeMinOccursAttribute = (currentMin == null) ? true : false;
if (component instanceof XSDParticle)
{
oldMinOccurs = ((XSDParticle) component).getMinOccurs();
((XSDParticle) component).setMinOccurs(newMinOccurs);
}
else if (component instanceof XSDAttributeUse)
{
oldMinOccurs = (((XSDAttributeUse) component).getUse() == XSDAttributeUseCategory.REQUIRED_LITERAL ? 1 : 0);
if (newMinOccurs == 1)
((XSDAttributeUse) component).setUse(XSDAttributeUseCategory.REQUIRED_LITERAL);
else
((XSDAttributeUse) component).setUse(XSDAttributeUseCategory.OPTIONAL_LITERAL);
}
}
finally
{
endRecording();
}
}
代码示例来源:origin: org.eclipse.xsd/org.eclipse.xsd
return getComponentLabel(xsdParticle.getTerm()) + "[" + xsdParticle.getMinOccurs() + "," + xsdParticle.getMaxOccurs() + "]";
代码示例来源:origin: org.geotools.xsd/gt-gml2
int min = particle.getMinOccurs();
int max = particle.getMaxOccurs();
代码示例来源:origin: org.eclipse/org.eclipse.xsd
return getComponentLabel(xsdParticle.getTerm()) + "[" + xsdParticle.getMinOccurs() + "," + xsdParticle.getMaxOccurs() + "]";
代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui
particle.setMinOccurs(parentParticle.getMinOccurs());
parentParticle.unsetMinOccurs();
内容来源于网络,如有侵权,请联系作者删除!