本文整理了Java中org.eclipse.xsd.XSDElementDeclaration.setConstraint()
方法的一些代码示例,展示了XSDElementDeclaration.setConstraint()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSDElementDeclaration.setConstraint()
方法的具体详情如下:
包路径:org.eclipse.xsd.XSDElementDeclaration
类名称: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));
内容来源于网络,如有侵权,请联系作者删除!