@Override public void encode(ContentHandler output) throws Exception { Object value = ((PropertyType) object).getValue(); output.startElement(WFS.NAMESPACE, VALUE, "wfs:" + VALUE, new AttributesImpl()); if (value instanceof Geometry) { Encoder encoder = new Encoder(new org.geotools.gml2.GMLConfiguration()); encoder.setInline(true); encoder.encode(value, org.geotools.gml2.GML._Geometry, output); } else { String s = value.toString(); output.characters(s.toCharArray(), 0, s.length()); } output.endElement(WFS.NAMESPACE, VALUE, "wfs:" + VALUE); } };
QName newTypeName = guessValueType(property.getValue()); XSDTypeDefinition type = (newTypeName != null) ? index.getTypeDefinition(newTypeName) : null; particle.setContent(value); properties.add(new Object[] {particle, property.getValue()}); } else { new Object[] { Schemas.getChildElementParticle(element.getType(), "Value", false), property.getValue() }; properties.add(p);
PropertyType property = (PropertyType) update.getProperty().get(0); assertEquals("street\nline2\nline3\n", property.getValue());