Package org.geotools.feature

Examples of org.geotools.feature.NameImpl


     * @param ftStyles
     */
    private static void genericizeftStyles( List<FeatureTypeStyle> ftStyles ) {
        for( FeatureTypeStyle featureTypeStyle : ftStyles ) {
            featureTypeStyle.featureTypeNames().clear();
            featureTypeStyle.featureTypeNames().add(new NameImpl(SLDs.GENERIC_FEATURE_TYPENAME));
        }
    }
View Full Code Here


                    ErrorManager.get().displayError(Messages.StyleEditor_error, Messages.StyleEditor_theme_failure);
                    return;
                } else {
                    //set the FeatureTypeName to the current layer name
                    newFTS.featureTypeNames().clear();
                    newFTS.featureTypeNames().add( new NameImpl( SLDs.GENERIC_FEATURE_TYPENAME ));
                    //get the style
                    Style style = getStyle();
                    //ensure the style has an SLD
                    if (style == null) throw new RuntimeException("Style is null"); //$NON-NLS-1$
                   
View Full Code Here

     */
    public List<Name> getNames() throws IOException {
        String[] typeNames = getTypeNames();
        List<Name> names = new ArrayList<Name>(typeNames.length);
        for (String typeName : typeNames) {
            names.add(new NameImpl(typeName));
        }
        return names;
    }
View Full Code Here

            for (String script : scriptDirectory.list(new FilenameFilter() {
                public boolean accept(File f, String name) {
                    return name.endsWith(".js");
                }
            })) {
                result.add(new NameImpl(JS_NAMESPACE, script.substring(0, script.length() - 3)));
            }
        }

        return result;
    }
View Full Code Here

    public SextanteProcessFactory() {
        Sextante.initialize();
       
        Set<Name> result = new HashSet<Name>();
        for (String name : (Set<String>) Sextante.getAlgorithms().keySet()) {
            result.add(new NameImpl(SEXTANTE_NAMESPACE, name));
        }
        names = Collections.unmodifiableSet(result);
    }
View Full Code Here

       
        //profile.add(name(XS.ANYTYPE)); //Map.class
    }

    static Name name(QName qName) {
        return new NameImpl(qName.getNamespaceURI(), qName.getLocalPart());
    }
View Full Code Here

        assertTrue(built.getNativeBoundingBox().getWidth() > 0);
        assertTrue(built.getNativeBoundingBox().getHeight() > 0);
    }
   
    Name toName(QName qname) {
        return new NameImpl(qname.getNamespaceURI(), qname.getLocalPart());
    }
View Full Code Here

    }
   
    public static Name name(CodeType code) {
        // mushy translation, code type seems to never have a code space in practice
        if(code.getCodeSpace() != null) {
            return new NameImpl(code.getCodeSpace(), code.getValue());
        } else {
            String[] parsed = code.getValue().trim().split(":");
            if(parsed.length == 1) {
                return new NameImpl(parsed[0]);
            } else {
                return new NameImpl(parsed[0], parsed[1]);
            }
        }
    }
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

                // unlikely to happen, requires someone making modifications on the workspaces
                // with a layer page open in another tab/window
                throw new RuntimeException("Could not find workspace " + workspaceName);
            }
            String nsURI = ns.getURI();
            layer = getCatalog().getLayerByName(new NameImpl(nsURI, layerName));
        } else {
            layer = getCatalog().getLayerByName(layerName);
        }
       
        if(layer == null) {
View Full Code Here

TOP

Related Classes of org.geotools.feature.NameImpl

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.