Package org.opengis.feature.type

Examples of org.opengis.feature.type.Name


                    if (featuresPrinted < maxfeatures) {
                        writer.println("--------------------------------------------");

                        for(AttributeDescriptor descriptor : types) {
                            final Name name = descriptor.getName();
                            if (Geometry.class.isAssignableFrom(descriptor.getType().getBinding())) {
                                // writer.println(types[j].getName() + " =
                                // [GEOMETRY]");

                                // DJB: changed this to print out WKT - its very
View Full Code Here


        RegionatingStrategy regionatingStrategy = null;
        String stratname = (String) mapContext.getRequest().getFormatOptions()
                .get("regionateBy");
        if (("auto").equals(stratname)) {
            Catalog catalog = mapContext.getRequest().getWMS().getGeoServer().getCatalog();
            Name name = layer.getFeatureSource().getName();
            stratname = catalog.getFeatureTypeByName(name).getMetadata().get( "kml.regionateStrategy",String.class );
            if (stratname == null || "".equals( stratname ) ){
                stratname = "best_guess";
                LOGGER.log(
                        Level.FINE,
View Full Code Here

        //note the current time
        Date started = Calendar.getInstance().getTime();
       
        //load the process factory
        CodeType ct = request.getIdentifier();
        Name processName = Ows11Util.name(ct);
        ProcessFactory pf = Processors.createProcessFactory(processName);
        if ( pf == null ) {
            throw new WPSException( "No such process: " + processName );
        }
       
View Full Code Here

       
        return pds;
    }
   
    void processDescription( CodeType id, ProcessDescriptionsType pds ) {
        Name name = Ows11Util.name(id);
        ProcessFactory pf = Processors.createProcessFactory(name);
        if ( pf == null ) {
            throw new WPSException( "No such process: " + id.getValue() );
        }
       
View Full Code Here

                LiteralInputType literal = wpsf.createLiteralInputType();
                input.setLiteralData( literal );
               
                //map the java class to an xml type name
                if ( !String.class.equals( lppio.getType() ) ) {
                    Name typeName = xsp.name( lppio.getType() );
                    if ( typeName != null ) {
                        literal.setDataType( Ows11Util.type( typeName.getLocalPart() ) );       
                    }   
                }
                literal.setAnyValue( owsf.createAnyValueType() );

                //TODO: output the default value
View Full Code Here

                LiteralOutputType literal = wpsf.createLiteralOutputType();
                output.setLiteralOutput(literal);
               
                //map the java class to an xml type name
                if ( !String.class.equals( lppio.getType() ) ) {
                    Name typeName = xsp.name( lppio.getType() );
                    if ( typeName != null ) {
                        literal.setDataType( Ows11Util.type( typeName.getLocalPart() ) );       
                    }   
                }
            }
            else {
                //handle the complex data case
View Full Code Here

        Class clazz = value.getClass();
        List profiles = Arrays.asList(new Object[] { new XSProfile(), new GML3Profile() });

        for (Iterator it = profiles.iterator(); it.hasNext();) {
            TypeMappingProfile profile = (TypeMappingProfile) it.next();
            Name name = profile.name(clazz);

            if (name != null) {
                return new QName(name.getNamespaceURI(), name.getLocalPart());
            }
        }

        return null;
    }
View Full Code Here

                XSDElementDeclaration element = factory.createXSDElementDeclaration();
                element.setName(attribute.getLocalName());
                element.setNillable(attribute.isNillable());

                Name typeName = attribute.getType().getName();
                // skip if it's XS.AnyType. It's not added to XS.Profile, because
                // a lot of types extend XS.AnyType causing it to be the returned
                // binding.. I could make it so that it checks against all profiles
                // but would that slow things down? At the moment, it returns the
                // first matching one, so it doesn't go through all profiles.
                if (!(typeName.getLocalPart().equals(XS.ANYTYPE.getLocalPart()) && typeName
                        .getNamespaceURI().equals(XS.NAMESPACE))) {
                    if (attribute.getType() instanceof ComplexType) {
                        // If non-simple complex property not in schema, recurse.
                        // Note that abstract types will of course not be resolved; these must be
                        // configured at global level, so they can be found by the
                        // encoder.
                        if (schema.resolveTypeDefinition(typeName.getNamespaceURI(), typeName
                                .getLocalPart()) == null) {
                            buildComplexSchemaContent((ComplexType) attribute.getType(), schema,
                                    factory);
                        }
                    } else {
                        Class binding = attribute.getType().getBinding();
                        typeName = findTypeName(binding);
                        if (typeName == null) {
                            throw new NullPointerException("Could not find a type for property: "
                                    + attribute.getName() + " of type: " + binding.getName());

                        }
                    }
                }

                XSDTypeDefinition type = schema.resolveTypeDefinition(typeName.getNamespaceURI(),
                        typeName.getLocalPart());
                element.setTypeDefinition(type);

                XSDParticle particle = factory.createXSDParticle();
                particle.setMinOccurs(attribute.getMinOccurs());
                particle.setMaxOccurs(attribute.getMaxOccurs());
View Full Code Here

    }
   
    Name findTypeName(Class binding) {
        for (Iterator p = profiles.iterator(); p.hasNext();) {
            TypeMappingProfile profile = (TypeMappingProfile) p.next();
            Name name = profile.name(binding);

            if (name != null) {
                return name;
            }
        }
View Full Code Here

            element.setName(attribute.getLocalName());
            element.setNillable(attribute.isNillable());

           
            Class binding = attribute.getType().getBinding();
            Name typeName = findTypeName(binding);

            if (typeName == null) {
                throw new NullPointerException("Could not find a type for property: "
                    + attribute.getName() + " of type: " + binding.getName());
            }

            XSDTypeDefinition type = index.getTypeDefinition( new QName( typeName.getNamespaceURI(), typeName.getLocalPart() ) );
            if ( type == null ) {
                throw new IllegalStateException( "Could not find type: " + typeName );
            }
            //XSDTypeDefinition type = schema.resolveTypeDefinition(typeName.getNamespaceURI(),
            //        typeName.getLocalPart());
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.