Package org.opengis.filter.expression

Examples of org.opengis.filter.expression.PropertyName.evaluate()


                }
                else {
                    propertyName = ff.property( name.getLocalPart() );
                }
               
                if ( propertyName.evaluate( featureType ) == null ) {
                    String msg = "No such property: " + property.getName();
                    throw new WFSException( msg );
                }
            }
        } catch (IOException e) {
View Full Code Here


                }
                else {
                    propertyName = ff.property( name.getLocalPart() );
                }
               
                if ( propertyName.evaluate( featureType ) == null ) {
                    String msg = "No such property: " + name;
                    throw new WFSException(element, msg );
                }
            }
        } catch (IOException e) {
View Full Code Here

                         metaPropNames = new ArrayList<PropertyName>();
                       
                        for (Iterator iter = propertyNames.iterator(); iter.hasNext();) {
                            PropertyName propName = createPropertyName((String) iter.next(), ns);
       
                            if ( propName.evaluate(meta.getFeatureType()) == null) {
                                String mesg = "Requested property: " + propName + " is " + "not available "
                                    + "for " + meta.getPrefixedName() + ".  ";
                               
                                if (meta.getFeatureType() instanceof SimpleFeatureType) {
                                    List<AttributeTypeInfo> atts = meta.attributes();
View Full Code Here

    void validateSortBy(List<SortBy> sortBys, FeatureTypeInfo meta, final GetFeatureRequest request)
            throws IOException {
        FeatureType featureType = meta.getFeatureType();
        for (SortBy sortBy : sortBys) {
            PropertyName name = sortBy.getPropertyName();
            if (name.evaluate(featureType) == null) {
                throw new WFSException(request, "Illegal property name: " + name.getPropertyName()
                        + " for feature type " + meta.prefixedName(), "InvalidParameterValue");
            }
        }
    }
View Full Code Here

                }
               
                if ( name != null ) {
                    // check against feataure type to make sure its
                    // a geometric type
                    AttributeDescriptor att = (AttributeDescriptor) name.evaluate(featureType);
                    if ( !( att instanceof GeometryDescriptor ) ) {
                        throw new WFSException(request, "Property " + name
                                + " is not geometric in feature type " + meta.prefixedName(),
                                "InvalidParameterValue");
                    }
View Full Code Here

            PropertyName propertyName = filterFactory.property(request.getValueReference(),
                    getNamespaceSupport());
            PropertyName propertyNameNoIndexes = filterFactory.property(request.getValueReference()
                    .replaceAll("\\[.*\\]", ""), getNamespaceSupport());
            AttributeDescriptor descriptor = (AttributeDescriptor) propertyNameNoIndexes
                    .evaluate(featureType.getFeatureType());
            if (descriptor == null) {
                throw new WFSException(request, "No such attribute: " + request.getValueReference());
            }

View Full Code Here

                            String targetPropertyName = targetPropertyType.getPropertyName();
                            final PropertyName expr = ff.property(targetPropertyName);
                            Collections.sort(list, new Comparator<Object>() {
                                @Override
                                public int compare(Object o1, Object o2) {
                                    Object v1 = expr.evaluate(o1);
                                    Object v2 = expr.evaluate(o2);
                                    String m1 = marshalValue(v1);
                                    String m2 = marshalValue(v2);
                                    return m1 == null ? (m2 == null ? 0 : -1) : (m2 == null ? 1
                                            : m1.compareTo(m2));
View Full Code Here

                            final PropertyName expr = ff.property(targetPropertyName);
                            Collections.sort(list, new Comparator<Object>() {
                                @Override
                                public int compare(Object o1, Object o2) {
                                    Object v1 = expr.evaluate(o1);
                                    Object v2 = expr.evaluate(o2);
                                    String m1 = marshalValue(v1);
                                    String m2 = marshalValue(v2);
                                    return m1 == null ? (m2 == null ? 0 : -1) : (m2 == null ? 1
                                            : m1.compareTo(m2));
                                }
View Full Code Here

            throw new IOException(typeName + " is not a supported type");
        }
   
        // do we have such attribute?
        final PropertyName property = rd.translateProperty(attributeName);
        AttributeDescriptor ad = (AttributeDescriptor) property.evaluate(rd.getFeatureType());
        if(ad == null) {
            return new CloseableIteratorAdapter<String>(new ArrayList<String>().iterator());
        }

        // build the query against csw:record
View Full Code Here

        final Set<String> values = new HashSet<String>();
        getRecords(q, Transaction.AUTO_COMMIT, rd.getOutputSchema()).accepts(new FeatureVisitor() {
           
            @Override
            public void visit(Feature feature) {
                Property prop = (Property) property.evaluate(feature);
                if (prop != null)
                    try {
                        values.add( new String(((String) prop.getValue()).getBytes("ISO-8859-1"), "UTF-8" ) );
                    } catch (UnsupportedEncodingException e) {
                        throw new RuntimeException(e);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.