protected final AttributeType findType(XSDTypeDefinition xsdType) { Name name = name(xsdType); if (imports != null) { for (Iterator itr = imports.values().iterator(); itr.hasNext();) { Schema imported = (Schema) itr.next(); if (imported.containsKey(name)) { return (AttributeType) imported.get(name); } } } throw new IllegalStateException("Could not find imported type: " + name); }
private Class mapTypeName(String typeName) { // try xs simple type Schema xsTypeMappingProfile = XS.getInstance().getTypeMappingProfile(); NameImpl name = new NameImpl(XS.NAMESPACE, typeName); if (xsTypeMappingProfile.containsKey(name)) { AttributeType type = xsTypeMappingProfile.get(name); if (type.getBinding() != null) { return type.getBinding(); } } // try gml geometry types Geometries g = Geometries.getForName(typeName); if (g != null) { return g.getBinding(); } // default return String.class; } }
private Class mapTypeName(String typeName) { //try xs simple type Schema xsTypeMappingProfile = XS.getInstance().getTypeMappingProfile(); NameImpl name = new NameImpl(XS.NAMESPACE, typeName); if (xsTypeMappingProfile.containsKey(name)) { AttributeType type = xsTypeMappingProfile.get(name); if (type.getBinding() != null) { return type.getBinding(); } } //try gml geometry types Geometries g = Geometries.getForName(typeName); if (g != null) { return g.getBinding(); } //default return String.class; }