private SchemaType closestBuiltin(SchemaType sType) { while (!sType.isBuiltinType()) sType = sType.getBaseType(); return sType; }
String getBaseClass(SchemaType sType) { SchemaType baseType = findBaseType(sType.getBaseType()); switch (sType.getSimpleVariety()) { case SchemaType.NOT_SIMPLE: // non-simple-content: inherit from base type impl if (!XmlObject.type.equals(baseType)) return baseType.getFullJavaImplName(); return "org.apache.xmlbeans.impl.values.XmlComplexContentImpl"; case SchemaType.ATOMIC: // We should only get called for restrictions assert(! sType.isBuiltinType()); return getAtomicRestrictionType(sType); case SchemaType.LIST: return "org.apache.xmlbeans.impl.values.XmlListImpl"; case SchemaType.UNION: return "org.apache.xmlbeans.impl.values.XmlUnionImpl"; default: throw new IllegalStateException(); } }
if (type.isBuiltinType()) continue; if (type.getFullJavaName() == null)
if (sType.getBaseType().isBuiltinType()) allSeenTypes.add(sType.getBaseType());
private static String notes(SchemaType sType) { if (sType.isBuiltinType()) return " (builtin)"; if (sType.isSimpleType()) { switch (sType.getSimpleVariety()) { case SchemaType.LIST: return " (list)"; case SchemaType.UNION: return " (union)"; default: if (sType.getEnumerationValues() != null) return " (enumeration)"; return ""; } } switch (sType.getContentType()) { case SchemaType.MIXED_CONTENT: return " (mixed)"; case SchemaType.SIMPLE_CONTENT: return " (complex)"; default: return ""; } }
private SchemaType closestBuiltin(SchemaType sType) { while (!sType.isBuiltinType()) sType = sType.getBaseType(); return sType; }
private SchemaType closestBuiltin(SchemaType sType) { while (!sType.isBuiltinType()) sType = sType.getBaseType(); return sType; }
while (!baseType.isSimpleType() && !baseType.isBuiltinType())
case SchemaComponent.TYPE: SchemaType type = (SchemaType)comp; if (type.isBuiltinType())
public static String getNaturalJavaClassName(SchemaType st) { SchemaType schemaType = st; String result = null; if (st.getBaseEnumType() != null && !hasBase(st)) { return st.getFullJavaName().replace('$', '.') + ".Enum"; } else if (st.isSimpleType() && !st.isBuiltinType()) { schemaType = st.getBaseType(); while (schemaType != null && !schemaType.isBuiltinType()) { schemaType = schemaType.getBaseType(); } } if (schemaType != null && schemaType.isBuiltinType()) { result = BUILTIN_TYPES_MAP.get(schemaType.getFullJavaName()); } else if (schemaType != null) { result = schemaType.getFullJavaName().replace('$', '.'); } return result; } private static boolean hasBase(SchemaType sType) {
String getBaseClass(SchemaType sType) { SchemaType baseType = findBaseType(sType.getBaseType()); switch (sType.getSimpleVariety()) { case SchemaType.NOT_SIMPLE: // non-simple-content: inherit from base type impl if (!XmlObject.type.equals(baseType)) return baseType.getFullJavaImplName(); return "org.apache.xmlbeans.impl.values.XmlComplexContentImpl"; case SchemaType.ATOMIC: // We should only get called for restrictions assert(! sType.isBuiltinType()); return getAtomicRestrictionType(sType); case SchemaType.LIST: return "org.apache.xmlbeans.impl.values.XmlListImpl"; case SchemaType.UNION: return "org.apache.xmlbeans.impl.values.XmlUnionImpl"; default: throw new IllegalStateException(); } }
String getBaseClass(SchemaType sType) { SchemaType baseType = findBaseType(sType.getBaseType()); switch (sType.getSimpleVariety()) { case SchemaType.NOT_SIMPLE: // non-simple-content: inherit from base type impl if (!XmlObject.type.equals(baseType)) return baseType.getFullJavaImplName(); return "org.apache.xmlbeans.impl.values.XmlComplexContentImpl"; case SchemaType.ATOMIC: // We should only get called for restrictions assert(! sType.isBuiltinType()); return getAtomicRestrictionType(sType); case SchemaType.LIST: return "org.apache.xmlbeans.impl.values.XmlListImpl"; case SchemaType.UNION: return "org.apache.xmlbeans.impl.values.XmlUnionImpl"; default: throw new IllegalStateException(); } }
if (type.isBuiltinType()) continue; if (type.getFullJavaName() == null)
if (type.isBuiltinType()) continue; if (type.getFullJavaName() == null)
private static String notes(SchemaType sType) { if (sType.isBuiltinType()) return " (builtin)"; if (sType.isSimpleType()) { switch (sType.getSimpleVariety()) { case SchemaType.LIST: return " (list)"; case SchemaType.UNION: return " (union)"; default: if (sType.getEnumerationValues() != null) return " (enumeration)"; return ""; } } switch (sType.getContentType()) { case SchemaType.MIXED_CONTENT: return " (mixed)"; case SchemaType.SIMPLE_CONTENT: return " (complex)"; default: return ""; } }
private static String notes(SchemaType sType) { if (sType.isBuiltinType()) return " (builtin)"; if (sType.isSimpleType()) { switch (sType.getSimpleVariety()) { case SchemaType.LIST: return " (list)"; case SchemaType.UNION: return " (union)"; default: if (sType.getEnumerationValues() != null) return " (enumeration)"; return ""; } } switch (sType.getContentType()) { case SchemaType.MIXED_CONTENT: return " (mixed)"; case SchemaType.SIMPLE_CONTENT: return " (complex)"; default: return ""; } }
while (!baseType.isSimpleType() && !baseType.isBuiltinType())
while (!baseType.isSimpleType() && !baseType.isBuiltinType())
case SchemaComponent.TYPE: SchemaType type = (SchemaType)comp; if (type.isBuiltinType())
case SchemaComponent.TYPE: SchemaType type = (SchemaType)comp; if (type.isBuiltinType())