GMLFeatureWriter extends AbstractGMLObjectWriter { public void export( Feature feature ) throws XMLStreamException, UnknownCRSException, TransformationException { export( feature, referenceExportStrategy.getResolveOptions() ); } GMLFeatureWriter( GMLStreamWriter gmlStreamWriter ); void export( Feature feature ); void export( Property prop ); void export( TypedObjectNode node, GmlXlinkOptions resolveState ); void export( final TimeSlice timeSlice, final GmlXlinkOptions resolveState );  }
@Test public void testDecimalPropertyEncodedFaithfully() throws XMLStreamException, UnknownCRSException, TransformationException { final String formattedInputValue = "0.00000009"; final XMLOutputFactory outputFactory = XMLOutputFactory.newInstance(); outputFactory.setProperty( "javax.xml.stream.isRepairingNamespaces", new Boolean( true ) ); final XMLMemoryStreamWriter memoryWriter = new XMLMemoryStreamWriter(); final XMLStreamWriter writer = memoryWriter.getXMLStreamWriter(); final GMLStreamWriter exporter = createGMLStreamWriter( GML_2, writer ); final GMLFeatureWriter featureWriter = exporter.getFeatureWriter(); final PropertyType decimalPt = new SimplePropertyType( new QName( "property" ), 1, 1, DECIMAL, null, null ); final PrimitiveType pt = new PrimitiveType( DECIMAL ); final TypedObjectNode value = new PrimitiveValue( formattedInputValue, pt ); final Property prop = new GenericProperty( decimalPt, value ); featureWriter.export( prop ); writer.flush(); writer.close(); assertEquals( "<property>0.00000009</property>\n", memoryWriter.toString() ); }