/** @see org.geoserver.catalog.ResourceInfo#getQualifiedName() */ public Name getQualifiedName() { return delegate.getQualifiedName(); }
return dataAccess.getFeatureSource(info.getQualifiedName()); } else { fs = dataStore.getFeatureSource(info.getQualifiedName());
@Test public void testEmptyBounds() throws Exception { // test the bounds of a single point Catalog cat = getCatalog(); FeatureTypeInfo fti = cat.getFeatureTypeByName(toString(MockData.POINTS)); assertEquals( Point.class, fti.getFeatureType().getGeometryDescriptor().getType().getBinding()); assertEquals(1, fti.getFeatureSource(null, null).getCount(Query.ALL)); CatalogBuilder cb = new CatalogBuilder(cat); cb.setStore(cat.getStoreByName(MockData.CGF_PREFIX, DataStoreInfo.class)); FeatureTypeInfo built = cb.buildFeatureType(fti.getQualifiedName()); cb.setupBounds(built); assertTrue(built.getNativeBoundingBox().getWidth() > 0); assertTrue(built.getNativeBoundingBox().getHeight() > 0); }
@Override public void dispose(FeatureTypeInfo info, DataAccess<? extends FeatureType, ? extends Feature> dataAccess, Name temporaryName) throws IOException { ElasticLayerConfiguration layerConfig; layerConfig = (ElasticLayerConfiguration) info.getMetadata().get(KEY); if (layerConfig != null) { layerConfig.getAttributes().remove(info.getName()); ((ElasticDataStore) dataAccess).getDocTypes().remove(info.getQualifiedName()); } }
ft -> ns.equals( ft.getQualifiedName() .getNamespaceURI())) .map(ft -> ft.getStore().getWorkspace().getName())
/** * Returns the GML version used in the feature type's definition. * * <p>The method recursively climbs up the type hierarchy of the provided feature type, until it * finds AbstractFeatureType. Then, the GML version is determined by looking at the namespace * URI. * * <p>Please note that this method does not differentiate between GML 2 and GML 3.1.1, but * assumes that "http://www.opengis.net/gml" namespace always refers to GML 3.1.1. * * @param ftInfo the feature type info * @return the GML version used in the feature type definition * @throws IOException if the underlying datastore instance cannot be retrieved */ String findGmlVersion(FeatureTypeInfo ftInfo) throws IOException { ProgressListener listener = new NullProgressListener(); Name qName = ftInfo.getQualifiedName(); FeatureType fType = ftInfo.getStore().getDataStore(listener).getSchema(qName); return findFeatureTypeGmlVersion(fType); }
@Test public void testDefaultStyle() throws Exception { List<org.geoserver.catalog.FeatureTypeInfo> typeInfos = getCatalog().getFeatureTypes(); for (org.geoserver.catalog.FeatureTypeInfo info : typeInfos) { if (info.getQualifiedName().getNamespaceURI().equals(MockData.CITE_URI) && info.getFeatureType().getGeometryDescriptor() != null) testDefaultStyle(info.getFeatureSource(null, null)); } }
getCatalog() .getResourceByName( featureType.getQualifiedName(), FeatureTypeInfo.class); calculateBounds(resource);
featureType.getQualifiedName(), FeatureTypeInfo.class); if (resource.getNativeBoundingBox().isEmpty() || resource.getMetadata().get("recalculate-bounds") != null) {
getCatalog() .getResourceByName( featureType.getQualifiedName(), FeatureTypeInfo.class); calculateBounds(resource);