public AttributeType get(Object key) { if (profile.contains(key)) { return parent.get(key); } return null; }
private synchronized Map<Name, AttributeType> contents() { if (contents == null) { contents = new LinkedHashMap(); for (Iterator i = profile.iterator(); i.hasNext(); ) { Object key = i.next(); contents.put(key, parent.get(key)); } } return contents; } }
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); }
@Override protected Schema buildTypeMappingProfile(Schema typeSchema) { // reuse the regular gml3 type mapping profile bindings, but override // the namespace uri Schema gml3Profile = org.geotools.gml3.GML.getInstance().getTypeMappingProfile(); Set profile = new LinkedHashSet(); for (Name n : gml3Profile.keySet()) { n = new NameImpl(NAMESPACE, n.getLocalPart()); if (typeSchema.get(n) != null) { profile.add(n); } } return typeSchema.profile(profile); }
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; } }
public AttributeType get(Object key) { if( profile.contains( key )){ return parent.get( key ); } return null; }
public Object get(Object key) { if( profile.contains( key )){ return parent.get( key ); } return null; }
private synchronized Map<Name,AttributeType> contents(){ if( contents == null){ contents = new LinkedHashMap(); for( Iterator i=profile.iterator();i.hasNext();){ Object key = i.next(); contents.put( key, parent.get(key)); } } return contents; } }
private synchronized Map contents(){ if( contents == null){ contents = new LinkedHashMap(); for( Iterator i=profile.iterator();i.hasNext();){ Object key = i.next(); contents.put( key, parent.get(key)); } } return contents; } }
@Override protected Schema buildTypeMappingProfile(Schema typeSchema) { //reuse the regular gml3 type mapping profile bindings, but override // the namespace uri Schema gml3Profile = org.geotools.gml3.GML.getInstance().getTypeMappingProfile(); Set profile = new LinkedHashSet(); for (Name n : gml3Profile.keySet()) { n = new NameImpl(NAMESPACE, n.getLocalPart()); if (typeSchema.get(n) != null) { profile.add(n); } } return typeSchema.profile(profile); }
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; }