MemoryFeatureStore implements FeatureStore { @Override public GMLObject getObjectById( String id ) { return storedFeatures.getObjectById( id ); } MemoryFeatureStore( AppSchema schema, ICRS storageCRS, MemoryFeatureStoreMetadata metadata,
                        ConnectionProvider lockConnection ); @Override void destroy(); @Override AppSchema getSchema(); @Override boolean isMapped( QName ftName ); @Override FeatureInputStream query( Query query ); @Override FeatureInputStream query( final Query[] queries ); @Override int queryHits( org.deegree.feature.persistence.query.Query query ); @Override int[] queryHits( Query[] queries ); @Override GMLObject getObjectById( String id ); @Override synchronized FeatureStoreTransaction acquireTransaction(); @Override LockManager getLockManager(); @Override Envelope getEnvelope( QName ftName ); @Override Envelope calcEnvelope( QName ftName ); @Override boolean isAvailable(); ICRS getStorageCRS(); @Override ResourceMetadata<? extends Resource> getMetadata(); @Override void init();  }
@Test public void testGetObjectByIdFeature() { Object o = store.getObjectById( "PHILOSOPHER_7" ); Assert.assertTrue( o instanceof Feature ); }
@Test public void testGetObjectByIdGeometry1() { Object o = store.getObjectById( "MULTIPOLYGON_1" ); Assert.assertTrue( o instanceof Geometry ); }
@Test public void testGetObjectByIdGeometry2() throws FileNotFoundException, XMLStreamException, UnknownCRSException, TransformationException { Object o = store.getObjectById( "RING_1" ); Assert.assertTrue( o instanceof Ring ); XMLOutputFactory outputFactory = XMLOutputFactory.newInstance(); outputFactory.setProperty( "javax.xml.stream.isRepairingNamespaces", new Boolean( true ) ); OutputStream out = new FileOutputStream( System.getProperty( "java.io.tmpdir" ) + File.separatorChar + "exported_ring.gml" ); XMLStreamWriter writer = outputFactory.createXMLStreamWriter( out ); writer.setDefaultNamespace( "http: GMLStreamWriter gmlStream = GMLOutputFactory.createGMLStreamWriter( GMLVersion.GML_31, writer ); gmlStream.write( (Geometry) o ); }