本文整理汇总了Java中org.apache.xerces.impl.dv.XSSimpleType.VARIETY_ATOMIC属性的典型用法代码示例。如果您正苦于以下问题:Java XSSimpleType.VARIETY_ATOMIC属性的具体用法?Java XSSimpleType.VARIETY_ATOMIC怎么用?Java XSSimpleType.VARIETY_ATOMIC使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.apache.xerces.impl.dv.XSSimpleType
的用法示例。
在下文中一共展示了XSSimpleType.VARIETY_ATOMIC属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: containsQName
private boolean containsQName(XSSimpleType type) {
if (type.getVariety() == XSSimpleType.VARIETY_ATOMIC) {
short primitive = type.getPrimitiveKind();
return (primitive == XSSimpleType.PRIMITIVE_QNAME ||
primitive == XSSimpleType.PRIMITIVE_NOTATION);
}
else if (type.getVariety() == XSSimpleType.VARIETY_LIST) {
return containsQName((XSSimpleType)type.getItemType());
}
else if (type.getVariety() == XSSimpleType.VARIETY_UNION) {
XSObjectList members = type.getMemberTypes();
for (int i = 0; i < members.getLength(); i++) {
if (containsQName((XSSimpleType)members.item(i)))
return true;
}
}
return false;
}
示例2: printVariety
void printVariety(short variety){
switch(variety){
case XSSimpleType.VARIETY_ATOMIC:
System.err.println("'variety' \t\t\t: ATOMIC");
break;
case XSSimpleType.VARIETY_LIST:
System.err.println("'variety' \t\t\t: LIST");
break;
case XSSimpleType.VARIETY_UNION:
System.err.println("'variety' \t\t\t: UNION");
break;
default:
System.err.println("Invalid value of 'Variety' property , it should be one of atomic, list or union.");
break;
}
}
示例3: checkNotationType
/**
* Element/Attribute traversers call this method to check whether
* the type is NOTATION without enumeration facet
*/
void checkNotationType(String refName, XSTypeDefinition typeDecl, Element elem) {
if (typeDecl.getTypeCategory() == XSTypeDefinition.SIMPLE_TYPE &&
((XSSimpleType)typeDecl).getVariety() == XSSimpleType.VARIETY_ATOMIC &&
((XSSimpleType)typeDecl).getPrimitiveKind() == XSSimpleType.PRIMITIVE_NOTATION) {
if ((((XSSimpleType)typeDecl).getDefinedFacets() & XSSimpleType.FACET_ENUMERATION) == 0) {
reportSchemaError("enumeration-required-notation", new Object[]{typeDecl.getName(), refName, DOMUtil.getLocalName(elem)}, elem);
}
}
}