本文整理汇总了Java中org.apache.xerces.impl.dv.XSSimpleType.getMemberTypes方法的典型用法代码示例。如果您正苦于以下问题:Java XSSimpleType.getMemberTypes方法的具体用法?Java XSSimpleType.getMemberTypes怎么用?Java XSSimpleType.getMemberTypes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.xerces.impl.dv.XSSimpleType
的用法示例。
在下文中一共展示了XSSimpleType.getMemberTypes方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getSimpleTypesString
import org.apache.xerces.impl.dv.XSSimpleType; //导入方法依赖的package包/类
private static String getSimpleTypesString(XSTypeDefinition et) {
StringBuffer typesHierarchy = new StringBuffer();
while (et != null && !"anySimpleType".equals(et.getName()) && !"anyType".equals(et.getName()) && et.getNamespace() != null) {
typesHierarchy.append(et.getNamespace().substring(et.getNamespace().lastIndexOf("/") + 1))
.append(":")
.append(et.getName())
.append(";");
if (et instanceof XSSimpleType) {
XSSimpleType simpleType = (XSSimpleType) et;
if (simpleType.getVariety() == XSSimpleTypeDefinition.VARIETY_LIST
|| simpleType.getVariety() == XSSimpleTypeDefinition.VARIETY_UNION) {
XSObjectList list = simpleType.getMemberTypes();
if (list.getLength() > 0) {
typesHierarchy.append("{");
for (int i = 0; i < list.getLength(); i++) {
typesHierarchy.append(getSimpleTypesString((XSTypeDefinition) list.item(i)));
}
typesHierarchy.append("}");
}
}
}
et = et.getBaseType();
}
return typesHierarchy.toString();
}
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:26,代码来源:XSDModelLoader.java
示例2: getSimpleTypesString
import org.apache.xerces.impl.dv.XSSimpleType; //导入方法依赖的package包/类
private static String getSimpleTypesString(XSTypeDefinition et) {
StringBuffer typesHierarchy = new StringBuffer();
while (et != null && !"anySimpleType".equals(et.getName()) && !"anyType".equals(et.getName()) && et.getNamespace() != null) {
typesHierarchy.append(et.getNamespace().substring(et.getNamespace().lastIndexOf("/") + 1)).append(":").append(et.getName()).append(";");
if (et instanceof XSSimpleType) {
XSSimpleType simpleType = (XSSimpleType) et;
if (simpleType.getVariety() == XSSimpleTypeDefinition.VARIETY_LIST
|| simpleType.getVariety() == XSSimpleTypeDefinition.VARIETY_UNION) {
XSObjectList list = simpleType.getMemberTypes();
if (list.getLength() > 0) {
typesHierarchy.append("{");
for (int i = 0; i < list.getLength(); i++) {
typesHierarchy.append(getSimpleTypesString((XSTypeDefinition) list.item(i)));
}
typesHierarchy.append("}");
}
}
}
et = et.getBaseType();
}
return typesHierarchy.toString();
}
示例3: containsQName
import org.apache.xerces.impl.dv.XSSimpleType; //导入方法依赖的package包/类
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;
}
示例4: isListDatatype
import org.apache.xerces.impl.dv.XSSimpleType; //导入方法依赖的package包/类
private boolean isListDatatype(XSSimpleType validator) {
if (validator.getVariety() == XSSimpleType.VARIETY_LIST)
return true;
if (validator.getVariety() == XSSimpleType.VARIETY_UNION) {
XSObjectList temp = validator.getMemberTypes();
for (int i = 0; i < temp.getLength(); i++) {
if (((XSSimpleType)temp.item(i)).getVariety() == XSSimpleType.VARIETY_LIST) {
return true;
}
}
}
return false;
}