public ResourceInfo getInfo() { return delegate.getInfo(); }
@Test public void testSetupMetadataResourceInfoException() throws Exception { FeatureTypeInfo ftInfo = createMock(FeatureTypeInfo.class); expect(ftInfo.getTitle()).andReturn("foo"); expect(ftInfo.getDescription()).andReturn("foo"); expect(ftInfo.getKeywords()).andReturn(null); replay(ftInfo); FeatureSource fs = createMock(FeatureSource.class); expect(fs.getInfo()).andThrow(new UnsupportedOperationException()); replay(fs); CatalogBuilder cb = new CatalogBuilder(getCatalog()); cb.setupMetadata(ftInfo, fs); }
rinfo = featureSource.getInfo(); } catch (Exception ignore) { if (LOGGER.isLoggable(Level.FINE)) {
@Override public ResourceInfo getInfo() { return originalFeatureSource.getInfo(); }
@Test public void testMetadataFromFeatueSource() throws Exception { CatalogBuilder cb = new CatalogBuilder(getCatalog()); cb.setStore(cb.buildDataStore("fooStore")); FeatureType ft = createMock(FeatureType.class); expect(ft.getName()).andReturn(new NameImpl("foo")).anyTimes(); expect(ft.getCoordinateReferenceSystem()).andReturn(null).anyTimes(); expect(ft.getGeometryDescriptor()).andReturn(null).anyTimes(); replay(ft); ResourceInfo rInfo = createMock(ResourceInfo.class); expect(rInfo.getTitle()).andReturn("foo title"); expect(rInfo.getDescription()).andReturn("foo description"); expect(rInfo.getKeywords()) .andReturn(new LinkedHashSet<String>(Arrays.asList("foo", "bar", "baz", ""))) .anyTimes(); replay(rInfo); FeatureSource fs = createMock(FeatureSource.class); expect(fs.getSchema()).andReturn(ft).anyTimes(); expect(fs.getInfo()).andReturn(rInfo).anyTimes(); expect(fs.getName()).andReturn(ft.getName()).anyTimes(); replay(fs); FeatureTypeInfo ftInfo = cb.buildFeatureType(fs); assertEquals("foo title", ftInfo.getTitle()); assertEquals("foo description", ftInfo.getDescription()); assertTrue(ftInfo.getKeywords().contains(new Keyword("foo"))); assertTrue(ftInfo.getKeywords().contains(new Keyword("bar"))); assertTrue(ftInfo.getKeywords().contains(new Keyword("baz"))); }
public ResourceInfo getInfo() { return delegate.getInfo(); }
CoordinateReferenceSystem sourceCRS = featureSource.getInfo().getCRS();
public ResourceInfo getInfo() { return delegate.getInfo(); }
@Override public ResourceInfo getInfo() { return source.getInfo(); }
@Override public ResourceInfo getInfo() { return source.getInfo(); }
public ResourceInfo getInfo() { return fsource.getInfo(); }