Package org.opengis.feature.type

Examples of org.opengis.feature.type.Name


            Object associated = association.getValue();

            // check for feature
            if (associated instanceof SimpleFeature) {
                SimpleFeature feature = (SimpleFeature) associated;
                Name typeName = feature.getType().getName();
                QName name = new QName(typeName.getNamespaceURI(), typeName
                        .getLocalPart());

                List properties = new ArrayList();

                // return a comment which is hte xlink href
View Full Code Here


                QueryType queryType = (QueryType) request.getQuery().get(fcIndex);
               
                // may have multiple type names in each query, so add them all
                for (QName name : (List<QName>) queryType.getTypeName()) {
                    // get a feature type name from the query
                    Name featureTypeName = new NameImpl(name.getNamespaceURI(), name.getLocalPart());
                    FeatureTypeInfo meta = catalog.getFeatureTypeByName(featureTypeName);
                   
                    if (meta == null) {
                        throw new WFSException("Could not find feature type " + featureTypeName
                                + " in the GeoServer catalog");
                    }
                   
                    // add it to the map
                    Set<FeatureTypeInfo> metas = ns2metas.get(featureTypeName.getNamespaceURI());
                   
                    if (metas == null) {
                        metas = new HashSet<FeatureTypeInfo>();
                        ns2metas.put(featureTypeName.getNamespaceURI(), metas);
                    }
                    metas.add(meta);
                }
            } else {
                FeatureType featureType = ((FeatureCollection) featureCollections.get(fcIndex)).getSchema();
View Full Code Here

                final List<LayerInfo> allLayers = wmsConfig.getLayers();
                layers = new ArrayList<LayerInfo>();
               
                String namespace = wmsConfig.getNamespaceByPrefix(request.getNamespace());
                for (LayerInfo layer : allLayers) {
                    Name name = layer.getResource().getQualifiedName();
                    if(name.getNamespaceURI().equals(namespace)){
                        layers.add(layer);
                    }
                }
            }else{
                layers = wmsConfig.getLayers();
View Full Code Here

                // getting to the coverage name without reading the whole coverage seems to
                // be hard stuff, let's have the catalog builder to the heavy lifting
                CatalogBuilder builder = new CatalogBuilder(getCatalog());
                builder.setStore(store);
                CoverageInfo ci = builder.buildCoverage();
                Name name = ci.getQualifiedName();
                resources.put(name.getLocalPart(), new Resource(name));
            }
           
            // lookup all configured layers, mark them as published in the resources
            List<ResourceInfo> configuredTypes = getCatalog().getResourcesByStore(store, ResourceInfo.class);
            for (ResourceInfo type : configuredTypes) {
View Full Code Here

   
    if (feature == null)
      throw new IllegalStateException( "Cannot assign the id when the feature has not been assigned to the LIMB." );
   
   
    Name layerName = feature.getType().getName();
    String layerNamespace = this.catalog.getNamespacePrefix( layerName.getNamespaceURI() );
   
    String layerId;
    if (layerNamespace == null)
    {
      layerId = layerName.getLocalPart();
    }
    else
    {
      layerId = layerNamespace + ":" + layerName.getLocalPart();
    }
   
    limb.setFeatureId( feature.getIdentifier().getID() );
    limb.setLayerId( layerId );
  }
View Full Code Here

     * @throws Exception
     */
    public static SpatialFilter create(Query query, int numHits,
            Element filterExpr, Pair<FeatureSource<SimpleFeatureType, SimpleFeature>, SpatialIndex> sourceAccessor, Parser parser) throws Exception
    {
        Name geometryColumn = sourceAccessor.one().getSchema().getGeometryDescriptor().getName();
        // -- parse Filter and report any validation issues
        String string = Xml.getString(filterExpr);
        if(Log.isDebugEnabled(Geonet.SEARCH_ENGINE))
            Log.debug(Geonet.SEARCH_ENGINE,"Filter string is :\n"+string);

View Full Code Here

                    .getFeatures(createFilter(_featureSource));
            FeatureIterator<SimpleFeature> iterator = features.features();

            HashSet<String> matches = new HashSet<String>();
            try {
                final Name idColumn = SpatialIndexWriter.findIdColumn(_featureSource);
                while (iterator.hasNext()) {
                    SimpleFeature feature = iterator.next();
                    matches
                            .add((String) feature
                                    .getAttribute(idColumn));
View Full Code Here

   
    @JSStaticFunction
    public static Process get(Scriptable processNameObj) {
        Process jsProcess = null;
        String[] parts = processNameObj.toString().split(":");
        Name name = new NameImpl(parts[0], parts[1]);
        ProcessFactory factory = Processors.createProcessFactory(name);
        if (factory != null) {
            org.geotools.process.Process process = factory.create(name);
            Scriptable scope = ScriptableObject.getTopLevelScope(processNameObj);
            jsProcess = new Process(scope, factory.getTitle(name),
View Full Code Here

        return l;
    }

    LayerInfo createLayerFromResource(JSONObj ref, WorkspaceInfo ws, Catalog cat) throws IOException {
        String storeName = ref.str("store");
        Name resourceName = new NameImpl(ref.str("name"));

        CatalogBuilder builder = new CatalogBuilder(cat);

        StoreInfo store = findStore(ws.getName(), storeName, cat);

        if( store instanceof DataStoreInfo){
            DataStoreInfo dataStore = (DataStoreInfo) store;
            builder.setStore(dataStore);

            // create from the resource
            FeatureTypeInfo ft = null;
            try {
                ft = builder.buildFeatureType(resourceName);
            }
            catch(Exception e) {
                Throwables.propagateIfInstanceOf(e, IOException.class);
                Throwables.propagate(e);
            }

            DataAccess data = dataStore.getDataStore(null);

            FeatureSource source = data.getFeatureSource(resourceName);
            builder.setupBounds(ft, source);

            return builder.buildLayer(ft);
        }
        else if (store instanceof CoverageStoreInfo) {
            CoverageStoreInfo covStore = (CoverageStoreInfo) store;
            builder.setStore(covStore);

            CoverageInfo cov = null;
            try {
                cov = builder.buildCoverage(resourceName.getLocalPart());
            } catch (Exception e) {
                Throwables.propagateIfInstanceOf(e, IOException.class);
                Throwables.propagate(e);
            }
View Full Code Here

        Feature lines1B = feature(linesType, idL2, "StringProp2_1", new Integer(1000),
                "LINESTRING (1 1, 2 2)");
        delete(lines1);
        // insert(lines2);
        WorkingTree workTree = repo.workingTree();
        Name name = lines1.getType().getName();
        String parentPath = name.getLocalPart();
        @SuppressWarnings("unused")
        Node ref = workTree.insert(parentPath, lines1B);
        geogig.command(AddOp.class).call();
        RevCommit commit2 = geogig.command(CommitOp.class).setAll(true).call();
View Full Code Here

TOP

Related Classes of org.opengis.feature.type.Name

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.