Package org.opengis.feature

Examples of org.opengis.feature.Attribute


        else if (object instanceof FeatureCollectionType) {
            list.add(new Object[]{WFS.FeatureCollection, object});
        }
        else if (object instanceof Attribute) {
            //encoding a ValueCollection
            Attribute att = (Attribute) object;
            list.add(new Object[]{particle(att), att.getValue()});
        }

        return list;
    }
View Full Code Here


        this.position = position;
        return position <= children.size();
    }

    public NodePointer getNodePointer() {
        Attribute attribute = (Attribute) children.get(position - 1);
        Name name = attribute.getDescriptor().getName();
        QName qname = new QName(name.getNamespaceURI(), name.getLocalPart());
        return new AttributeNodePointer(pointer, attribute, qname);
    }
View Full Code Here

            // we only work against feature, not feature type
            return object instanceof Attribute && xpath.matches("@(\\w+:)?id");
        }

        public Object get(Object object, String xpath, Class target) {
            Attribute feature = (Attribute) object;
            return feature.getIdentifier().toString();
        }
View Full Code Here

        Collection schema = type.getDescriptors();

        int index = 0;
        for (Iterator itr = content.iterator(); itr.hasNext();) {
            Attribute att = (Attribute) itr.next();

            // att shall not be null
            if (att == null) {
                throw new NullPointerException("Attribute at index " + index
                        + " is null. Attributes "
                        + "can't be null. Do you mean Attribute.get() == null?");
            }

            // and has to be of one of the allowed types
            AttributeType attType = att.getType();
            boolean contains = false;
            for (Iterator sitr = schema.iterator(); sitr.hasNext();) {
                AttributeDescriptor ad = (AttributeDescriptor) sitr.next();
                if (ad.getType().equals(attType)) {
                    contains = true;
View Full Code Here

            int min = ad.getMinOccurs();
            int max = ad.getMaxOccurs();
            int occurences = 0;

            for (Iterator citr = remaining.iterator(); citr.hasNext();) {
                Attribute a = (Attribute) citr.next();
                if (a.getName().equals(ad.getName())) {
                    occurences++;
                    citr.remove();
                }
            }
View Full Code Here

               
                // check the feature id is the same as the id attribute
                assertEquals(id, f.getIdentifier().getID());
               
                // the other thing we always have in these records is the type
                Attribute type = (Attribute) f.getProperty("type");
                assertNotNull(type);
                assertNotNull(type.getValue());
            }
        } finally {
            fi.close();
        }
    }
View Full Code Here

        addElement( recordDescriptor.getBoundingBoxPropertyName(), Collections.singletonList((Object)geom), userData, -1);
       
                  
        for (List<TreeNode> nodes : root.children.values()) { 
            for (TreeNode node : nodes) { 
                Attribute att = buildNode(node);
                fb.append(substitutionMap.get(att.getName()), att);
            }
        }

        boxes.clear();
        root = new TreeBranch();
View Full Code Here

                    ab.add(null, entry.getValue(), descriptor.getName());

                }

                Attribute att = ab.build();

                if (leaf.userData != null) {
                    for (Entry<String, Object> entry : leaf.value.entrySet()) {
                        ((ComplexAttribute) att).getProperty(entry.getKey()).getUserData()
                                .putAll(leaf.userData);
                    }
                }

                return att;
            }
            else {
               
                SimpleTreeLeaf leaf = (SimpleTreeLeaf)node;      
               
                ab.setDescriptor(node.descriptor);
                Attribute att = ab.buildSimple(null, leaf.value);

                if (leaf.userData != null) {
                    att.getUserData().putAll(leaf.userData);
                }

                return att;
            }                           
           
View Full Code Here

                                if (list.get(i) instanceof Attribute) {
                                    Logger.d("Feature " + (Attribute) list.get(i));
                                }
                            }*/
                    Iterator<Properties> iterator1 = properties.iterator();
                    Attribute attribute;
                    while (iterator1.hasNext()) {
                        attribute = (Attribute) iterator1.next();
                        if (attribute != null) {
                            Logger.d("Property " + attribute.getName() + ":" + attribute.getValue());
                        }
                    }
                           /* Map<Object, Object> objectMap = simpleFeature.getUserData();
                            Set<Map.Entry<Object, Object>> set = objectMap.entrySet();
                            Iterator<Map.Entry<Object, Object>> iterator1 = set.iterator();
View Full Code Here

TOP

Related Classes of org.opengis.feature.Attribute

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.