/** Sets up a profile which uniquely maps a set of java classes to a schema element. */ protected Schema buildTypeMappingProfile(Schema typeSchema) { return typeSchema.profile(Collections.EMPTY_SET); }
public Schema profile(Set<Name> profile) { if (!this.profile.containsAll(profile)) { Set<Name> set = new TreeSet<Name>(profile); set.removeAll(this.profile); throw new IllegalArgumentException("Unable to profile the following names: " + set); } return parent.profile(profile); }
@Override protected Schema buildTypeMappingProfile(Schema typeSchema) { Set profile = new LinkedHashSet(); profile.add(name(GML.PointPropertyType)); profile.add(name(GML.MultiPointPropertyType)); profile.add(name(GML.LineStringPropertyType)); profile.add(name(GML.MultiLineStringPropertyType)); profile.add(name(GML.PolygonPropertyType)); profile.add(name(GML.MultiPolygonPropertyType)); profile.add(name(GML.GeometryPropertyType)); return typeSchema.profile(profile); }
@Override public Schema buildTypeMappingProfile(Schema typeSchema) { // set with guaranteed iteration order, so that we can put deprecated elements only // after the ones that replaced them Set profile = new LinkedHashSet(); // basic profile.add(name(GML.MeasureType)); // geomtetries profile.add(name(GML.PointPropertyType)); profile.add(name(GML.MultiPointPropertyType)); profile.add(name(GML.LineStringPropertyType)); profile.add(name(GML.MultiLineStringPropertyType)); profile.add(name(GML.CurvePropertyType)); profile.add(name(GML.MultiCurvePropertyType)); profile.add(name(GML.SurfacePropertyType)); profile.add(name(GML.MultiSurfacePropertyType)); // register polygon and multipolygon only after surface, the iteration order // will make sure surface is found before in any encoding attempt, this way we // are still able to handle polygons, but we don't use them by default profile.add(name(GML.PolygonPropertyType)); profile.add(name(GML.MultiPolygonPropertyType)); // profile.add( new NameImpl( GML.NAMESPACE, GML.AbstractGeometryType ) ); profile.add(name(GML.GeometryPropertyType)); profile.add(name(GML.MultiGeometryPropertyType)); return typeSchema.profile(profile); }
@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); }
@Override protected Schema buildTypeMappingProfile(Schema schema) { Set proper = new HashSet(); proper.add(name(BYTE)); // Byte.class proper.add(name(HEXBINARY)); // byte[].class proper.add(name(SHORT)); // Short.class proper.add(name(INT)); // Integer.class proper.add(name(FLOAT)); // Float.class proper.add(name(LONG)); // Long.class proper.add(name(QNAME)); // Qname.class proper.add(name(DATE)); // java.sql.Date.class proper.add(name(DATETIME)); // java.sql.Timestamp.class proper.add(name(TIME)); // java.sql.Time.class proper.add(name(BOOLEAN)); // Boolean.class proper.add(name(DOUBLE)); // Double.class proper.add(name(STRING)); // String.class proper.add(name(INTEGER)); // BigInteger.class proper.add(name(DECIMAL)); // BigDecimal.class proper.add(name(ANYURI)); // URI.class Schema profile = schema.profile(proper); return profile; }
public Schema profile(Namespace profile) { return parent.profile( profile ); }
public Schema profile(Set<Name> profile) { if( !this.profile.containsAll( profile ) ){ Set<Name> set = new TreeSet<Name>( profile ); set.removeAll( this.profile ); throw new IllegalArgumentException("Unable to profile the following names: "+set ); } return parent.profile( profile ); }
@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); }
@Override public Schema buildTypeMappingProfile(Schema typeSchema) { // set with guaranteed iteration order, so that we can put deprecated elements only // after the ones that replaced them Set profile = new LinkedHashSet(); //basic profile.add(name(GML.MeasureType)); //geomtetries profile.add(name(GML.PointPropertyType)); profile.add(name(GML.MultiPointPropertyType)); profile.add(name(GML.LineStringPropertyType)); profile.add(name(GML.MultiLineStringPropertyType)); profile.add(name(GML.CurvePropertyType)); profile.add(name(GML.MultiCurvePropertyType)); profile.add(name(GML.SurfacePropertyType)); profile.add(name(GML.MultiSurfacePropertyType)); // register polygon and multipolygon only after surface, the iteration order // will make sure surface is found before in any encoding attempt, this way we // are still able to handle polygons, but we don't use them by default profile.add(name(GML.PolygonPropertyType)); profile.add(name(GML.MultiPolygonPropertyType)); //profile.add( new NameImpl( GML.NAMESPACE, GML.AbstractGeometryType ) ); profile.add(name(GML.GeometryPropertyType)); profile.add(name(GML.MultiGeometryPropertyType)); return typeSchema.profile( profile ); }