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

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

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

XSDElementDeclaration.setConstraint介绍

暂无

代码示例

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

simpleElementDeclarationWithAnonymousType./*{@link XSDElementDeclaration#setConstraint */setConstraint/*}*/(/*{@link */XSDConstraint/*}*/.FIXED_LITERAL);
simpleElementDeclarationWithAnonymousType./*{@link XSDElementDeclaration#setLexicalValue */setLexicalValue/*}*/("12ab");

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

simpleElementDeclarationWithAnonymousType./*{@link XSDElementDeclaration#setConstraint */setConstraint/*}*/(/*{@link */XSDConstraint/*}*/.FIXED_LITERAL);
simpleElementDeclarationWithAnonymousType./*{@link XSDElementDeclaration#setLexicalValue */setLexicalValue/*}*/("12ab");

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

protected XSDElementDeclaration buildGlobalElement(XSDSchema xsdSchema, EStructuralFeature eStructuralFeature)
{
 XSDElementDeclaration xsdElementDeclaration = XSDFactory.eINSTANCE.createXSDElementDeclaration();
 xsdElementDeclaration.setName(extendedMetaData.getName(eStructuralFeature));
 EClassifier eType = eStructuralFeature.getEType();
 XSDTypeDefinition xsdTypeDefinition = xsdSchema.resolveTypeDefinitionURI(getURI(eType));
 handleImport(xsdSchema, xsdTypeDefinition);
 xsdElementDeclaration.setTypeDefinition(xsdTypeDefinition);
 if (isWrapperType(eType))
 {
  xsdElementDeclaration.setNillable(true);
 }
 String defaultValue = eStructuralFeature.getDefaultValueLiteral();
 if (defaultValue != null)
 {
  xsdElementDeclaration.setConstraint(XSDConstraint.DEFAULT_LITERAL);
  xsdElementDeclaration.setLexicalValue(defaultValue);
 }
 xsdSchema.getContents().add(xsdElementDeclaration);
 map(xsdElementDeclaration, eStructuralFeature);
 if (eStructuralFeature.eIsSet(EcorePackage.Literals.ETYPED_ELEMENT__EGENERIC_TYPE))
 {
  createEcoreAnnotation(xsdElementDeclaration, "type", getGenericType(xsdSchema, eStructuralFeature.getEGenericType()));
 }
 buildAnnotations(xsdElementDeclaration, eStructuralFeature);
 return xsdElementDeclaration;
}

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

if (defaultValue != null)
 xsdElementDeclaration.setConstraint(XSDConstraint.DEFAULT_LITERAL);
 xsdElementDeclaration.setLexicalValue(transformDefaultValue((XSDSimpleTypeDefinition)xsdElementDeclaration.getTypeDefinition(), defaultValue));

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

if (defaultValue != null)
 xsdElementDeclaration.setConstraint(XSDConstraint.DEFAULT_LITERAL);
 xsdElementDeclaration.setLexicalValue(defaultValue);

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

if (defaultValue != null)
 xsdElementDeclaration.setConstraint(XSDConstraint.DEFAULT_LITERAL);
 xsdElementDeclaration.setLexicalValue(transformDefaultValue((XSDSimpleTypeDefinition)xsdTypeDefinition, defaultValue));

相关文章

微信公众号

最新文章

更多

XSDElementDeclaration类方法