Package org.geoserver.catalog

Examples of org.geoserver.catalog.ResourcePool$FeatureTypeCache


                item.add(new Label("name", attribute.getName()));
                item.add(new Label("minmax", attribute.getMinOccurs() + "/" + attribute.getMaxOccurs()));
                try {
                    // working around a serialization issue
                    FeatureTypeInfo typeInfo = (FeatureTypeInfo) model.getObject();
                    final ResourcePool resourcePool = GeoServerApplication.get().getCatalog().getResourcePool();
                    final FeatureType featureType = resourcePool.getFeatureType(typeInfo);
                    org.opengis.feature.type.PropertyDescriptor pd = featureType.getDescriptor(attribute.getName());
                    String typeName = "?";
                    String nillable = "?";
                    try {
                        typeName = pd.getType().getBinding().getSimpleName();
View Full Code Here


        @Override
        protected List<AttributeTypeInfo> load() {
            try {
                FeatureTypeInfo typeInfo = (FeatureTypeInfo) getDefaultModelObject();
                Catalog catalog = GeoServerApplication.get().getCatalog();
                final ResourcePool resourcePool = catalog.getResourcePool();
                return resourcePool.getAttributes(typeInfo);
            } catch (Exception e) {
                LOGGER.log(Level.SEVERE, "Grabbing the attribute list failed", e);
                String error = new ParamResourceModel("attributeListingFailed", FeatureResourceConfigurationPanel.this, e.getMessage()).getString();
                FeatureResourceConfigurationPanel.this.getPage().error(error);
                return Collections.emptyList();
View Full Code Here

        dataStoreInfo.setName("mockDataStore");
        dataStoreInfo.setEnabled(true);
        dataStoreInfo.setWorkspace(workspaceInfo);

        dataStore = new MemoryDataStore();
        ResourcePool resourcePool = new ResourcePool(catalog) {
            @Override
            public DataStore getDataStore(DataStoreInfo info) throws IOException {
                return dataStore;
            }
        };
View Full Code Here

    protected ResourcePool resourcePool;
    protected GeoServerResourceLoader resourceLoader;

    public CatalogImpl() {
        facade = new DefaultCatalogFacade(this);
        resourcePool = new ResourcePool(this);
    }
View Full Code Here

        if ( listeners == null ) {
            listeners = new ArrayList<CatalogListener>();
        }
       
        if ( resourcePool == null ) {
            resourcePool = new ResourcePool(this);
        }
    }
View Full Code Here

        context.registerComponentInstance(new WFSHandlerFactory(catalog, schemaBuilder));
        context.registerComponentInstance(catalog);
        context.registerComponentImplementation(PropertyTypePropertyExtractor.class);

        //seed the cache with entries from the catalog
        FeatureTypeCache featureTypeCache = (FeatureTypeCache) context
            .getComponentInstanceOfType(FeatureTypeCache.class);

        Collection featureTypes = catalog.getFeatureTypes();
        for (Iterator f = featureTypes.iterator(); f.hasNext();) {
            FeatureTypeInfo meta = (FeatureTypeInfo) f.next();
            if ( !meta.enabled() ) {
                continue;
            }

           
            FeatureType featureType =  null;
            try {
                featureType = meta.getFeatureType();
            } catch(Exception e) {
                LOGGER.log(Level.WARNING, "Could not load underlying feature type for type "
                        + meta.getName(), e);
                continue;
            }

            featureTypeCache.put(featureType);
        }
    }
View Full Code Here

        context.registerComponentInstance(catalog);
        context.registerComponentImplementation(PropertyTypePropertyExtractor.class);
       
        //TODO: this code is copied from the 1.1 configuration, FACTOR IT OUT!!!
        //seed the cache with entries from the catalog
        FeatureTypeCache featureTypeCache = (FeatureTypeCache) context
            .getComponentInstanceOfType(FeatureTypeCache.class);

        Collection featureTypes = catalog.getFeatureTypes();
        for (Iterator f = featureTypes.iterator(); f.hasNext();) {
            FeatureTypeInfo meta = (FeatureTypeInfo) f.next();
            if ( !meta.enabled() ) {
                continue;
            }

           
            FeatureType featureType =  null;
            try {
                featureType = meta.getFeatureType();
            } catch(Exception e) {
                LOGGER.log(Level.WARNING, "Could not load underlying feature type for type "
                        + meta.getName(), e);
                continue;
            }

            featureTypeCache.put(featureType);
        }
    }
View Full Code Here

     * </p>
     */
    public void configureContext(MutablePicoContainer container) {
        container.registerComponentInstance(Gml4wcsFactory.eINSTANCE);
       
        container.registerComponentInstance(new FeatureTypeCache());
        container.registerComponentImplementation(FeaturePropertyExtractor.class);

        //factories
        container.registerComponentInstance(CoordinateSequenceFactory.class, CoordinateArraySequenceFactory.instance());
        container.registerComponentImplementation(GeometryFactory.class);
View Full Code Here

     * </p>
     */
    public void configureContext(MutablePicoContainer container) {
        super.configureContext(container);

        container.registerComponentInstance(new FeatureTypeCache());
        container.registerComponentInstance(new XSDIdRegistry());

        //factories
        container.registerComponentInstance(CoordinateSequenceFactory.class,
            CoordinateArraySequenceFactory.instance());
View Full Code Here

        context.registerComponentInstance(catalog);
        context.registerComponentImplementation(PropertyTypePropertyExtractor.class);
       
        //TODO: this code is copied from the 1.1 configuration, FACTOR IT OUT!!!
        //seed the cache with entries from the catalog
        FeatureTypeCache featureTypeCache = (FeatureTypeCache) context
            .getComponentInstanceOfType(FeatureTypeCache.class);

        Collection featureTypes = catalog.getFeatureTypes();
        for (Iterator f = featureTypes.iterator(); f.hasNext();) {
            FeatureTypeInfo meta = (FeatureTypeInfo) f.next();
            if ( !meta.enabled() ) {
                continue;
            }

           
            FeatureType featureType =  null;
            try {
                featureType = meta.getFeatureType();
            } catch(Exception e) {
                LOGGER.log(Level.WARNING, "Could not load underlying feature type for type "
                        + meta.getName(), e);
                continue;
            }

            featureTypeCache.put(featureType);
        }
    }
View Full Code Here

TOP

Related Classes of org.geoserver.catalog.ResourcePool$FeatureTypeCache

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.