Package org.opengis.feature.type

Examples of org.opengis.feature.type.Name


        // if simple content, then there will be no type name in the xpath, e.g. when gml:name
        // is
        // feature chained the path stays as gml:name.. but if it's a complex type with complex
        // content, e.g. gsml:specification the path will be
        // gsml:specification/gsml:GeologicUnit/<some leaf attribute to filter by>       
        Name nextElementName = nextFMapping.getTargetFeature().getName();
        // starting index for the next search
        int startPos = -1;           
        if (Types.equals(nextElementName, steps.get(0).getName())) {
            // simple contents where nested element name is the same as the nesting element
            startPos = 0;
View Full Code Here


    private Expression getClientPropertyExpression(AttributeMapping mapping, Step lastStep) {
        Expression exp = null;
        if (lastStep.isXmlAttribute()) {
            Map<Name, Expression> clientProperties = mapping.getClientProperties();
            QName lastStepQName = lastStep.getName();
            Name lastStepName;
            if (lastStepQName.getPrefix() != null
                    && lastStepQName.getPrefix().length() > 0
                    && (lastStepQName.getNamespaceURI() == null || lastStepQName.getNamespaceURI()
                            .length() == 0)) {
                String prefix = lastStepQName.getPrefix();
View Full Code Here

        // <sourceExpression>
        // <OCQL>LINK_ONE</OCQL>
        // </sourceExpression>
        // </AttributeMapping>

        Name typeName = Types.typeName("http://example.com", "FirstParentFeature");
        FeatureType featureType = dataAccess.getSchema(typeName);
        assertNotNull(featureType);

        FeatureSource fSource = (FeatureSource) dataAccess.getFeatureSource(typeName);
        FeatureCollection features = (FeatureCollection) fSource.getFeatures();
View Full Code Here

        assertFalse(access.isDeleteSupported());
        assertSame(driver, access.getDriver());

        // Checking proper coverage name
        final List<Name> names = access.getNames(null);
        final Name coverageName = names.get(0);
        assertEquals(1, names.size());
        assertEquals(TestCoverageSourceDescriptor.TEST_NAME, coverageName);

        final CoverageSource source = access.access(TestCoverageSourceDescriptor.TEST_NAME, null,
                AccessType.READ_ONLY, null, null);
View Full Code Here

        // adding GridCoverages to the results list
        //
        // //
        Set<SampleDimension> sampleDims = null;
        for (FieldType fieldType : fieldTypes) {
            final Name name = fieldType.getName();
            sampleDims = fieldType.getSampleDimensions();
            if (rangeType != null) {
                final FieldType ft = rangeType.getFieldType(name.getLocalPart());
                if (ft != null)
                    sampleDims = ft.getSampleDimensions();
            }
        }
        final GridSampleDimension[] sampleDimensions = sampleDims
View Full Code Here

         * default? I will add them, but don't really know what's the expected
         * behavior
         */
        List<PropertyName> atts = new ArrayList<PropertyName>(attributes);
        Collection<PropertyDescriptor> attTypes = schema.getDescriptors();
        Name attName;
       
        for (PropertyDescriptor pd : attTypes) {
            //attName = pd.getName().getLocalPart();
            attName = pd.getName();

            // DJB: This geometry check was commented out. I think it should
            // actually be back in or
            // you get ALL the attributes back, which isn't what you want.
            // ALX: For rasters I need even the "grid" attribute.

            // DJB:geos-469, we do not grab all the geometry columns.
            // for symbolizers, if a geometry is required it is either
            // explicitly named
            // ("<Geometry><PropertyName>the_geom</PropertyName></Geometry>")
            // or the default geometry is assumed (no <Geometry> element).
            // I've modified the style attribute extractor so it tracks if the
            // default geometry is used. So, we no longer add EVERY geometry
            // column to the query!!

            if ((attName.getLocalPart().equalsIgnoreCase("grid"))
                    && !attributeNames.contains(attName.getLocalPart())
                    || (attName.getLocalPart().equalsIgnoreCase("params"))
                    && !attributeNames.contains(attName.getLocalPart())
                    ) {  
                atts.add(filterFactory.property (attName));
                if (LOGGER.isLoggable(Level.FINE))
                    LOGGER.fine("added attribute " + attName);
            }
View Full Code Here

        AttributeDescriptor originalTarget = mapping.getTargetFeature();
        int maxOccurs = originalTarget.getMaxOccurs();
        int minOccurs = originalTarget.getMinOccurs();
        boolean nillable = originalTarget.isNillable();
        Object defaultValue = originalTarget.getDefaultValue();
        Name name = originalTarget.getName();

        // create a new descriptor with the wrapped type and set it to the mapping
        ComplexFeatureTypeFactoryImpl typeFactory = new ComplexFeatureTypeFactoryImpl();
        AttributeDescriptor descriptor = typeFactory.createAttributeDescriptor(this, name,
                minOccurs, maxOccurs, nillable, defaultValue);
View Full Code Here

        AttributeDescriptor originalTarget = mapping.getTargetFeature();
        int maxOccurs = originalTarget.getMaxOccurs();
        int minOccurs = originalTarget.getMinOccurs();
        boolean nillable = originalTarget.isNillable();
        Object defaultValue = originalTarget.getDefaultValue();
        Name name = originalTarget.getName();

        // create a new descriptor with the wrapped type and set it to the mapping
        ComplexFeatureTypeFactoryImpl typeFactory = new ComplexFeatureTypeFactoryImpl();
        AttributeDescriptor descriptor = typeFactory.createAttributeDescriptor(this, name,
                minOccurs, maxOccurs, nillable, defaultValue);
View Full Code Here

    public void testQueryCapabilities() throws Exception {
        URL url = TestData.url(STATE_POP);
       
        Map params = new KVP( URLP.key,url );
        DataStore dataStore = factory.createDataStore( params );
        Name typeName = dataStore.getNames().get(0);
        SimpleFeatureSource featureSource = dataStore.getFeatureSource( typeName);
       
        QueryCapabilities caps = featureSource.getQueryCapabilities();
       
        SortBy[] sortBy = new SortBy[]{SortBy.NATURAL_ORDER,};
View Full Code Here

    }

    private AttributeDescriptor getTargetDescriptor(TypeMapping dto, CoordinateReferenceSystem crs)
            throws IOException {
        String prefixedTargetName = dto.getTargetElementName();
        Name targetNodeName = Types.degloseName(prefixedTargetName, namespaces);

        AttributeDescriptor targetDescriptor = typeRegistry.getDescriptor(targetNodeName, crs);
        if (targetDescriptor == null) {
            throw new NoSuchElementException("descriptor " + targetNodeName
                    + " not found in parsed schema");
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.