Package org.geotools.data.solr

Examples of org.geotools.data.solr.SolrDataStore


            DataAccess<? extends FeatureType, ? extends Feature> dataAccess, Name temporaryName)
            throws IOException {
        SolrLayerConfiguration configuration = (SolrLayerConfiguration) info.getMetadata().get(
                SolrLayerConfiguration.KEY);
        if (configuration != null) {
            SolrDataStore dataStore = (SolrDataStore) dataAccess;
            dataStore.setSolrConfigurations(configuration);
        }
        // we never use the temp name
        return false;
    }
View Full Code Here


    public void dispose(FeatureTypeInfo info,
            DataAccess<? extends FeatureType, ? extends Feature> dataAccess, Name temporaryName)
            throws IOException {
        SolrLayerConfiguration configuration = (SolrLayerConfiguration) info.getMetadata().get(
                SolrLayerConfiguration.KEY);
        SolrDataStore dataStore = (SolrDataStore) dataAccess;
        dataStore.getSolrConfigurations().remove(configuration.getLayerName());
    }
View Full Code Here

            FeatureTypeInfo typeInfo;
            Boolean isNew = true;
            if (layerInfo == null) {
                // New
                DataStoreInfo dsInfo = catalog.getStore(ri.getStore().getId(), DataStoreInfo.class);
                SolrDataStore ds = (SolrDataStore) dsInfo.getDataStore(null);
                CatalogBuilder builder = new CatalogBuilder(catalog);
                builder.setStore(dsInfo);
                ds.setSolrConfigurations(layerConfiguration);
                typeInfo = builder.buildFeatureType(ds.getFeatureSource(ri.getQualifiedName()));
                typeInfo.getMetadata().put(SolrLayerConfiguration.KEY, layerConfiguration);
                layerInfo = builder.buildLayer(typeInfo);
            } else {
                // Update
                isNew = false;
View Full Code Here

                tempMap.clear();
                solrLayerConfiguration = new SolrLayerConfiguration(new ArrayList<SolrAttribute>());
                solrLayerConfiguration.setLayerName(ri.getName());
                ri.getMetadata().put(SolrLayerConfiguration.KEY, solrLayerConfiguration);
            }
            SolrDataStore dataStore = (SolrDataStore) ((DataStoreInfo) ri.getStore())
                    .getDataStore(new NullProgressListener());
            ArrayList<SolrAttribute> attributes = dataStore
                    .getSolrAttributes(solrLayerConfiguration.getLayerName());
            for (SolrAttribute at : attributes) {
                if (tempMap.containsKey(at.getName())) {
                    SolrAttribute prev = tempMap.get(at.getName());
                    prev.setEmpty(at.getEmpty());
View Full Code Here

TOP

Related Classes of org.geotools.data.solr.SolrDataStore

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.