Examples of FeatureTypeConstraint


Examples of org.geotools.styling.FeatureTypeConstraint

               
                FeatureTypeConstraint[] featureTypeConstraints = layer.getLayerFeatureConstraints();
                if (featureTypeConstraints != null) {
                  List<Filter> filters = new ArrayList<Filter>();
          for (int j=0;j<featureTypeConstraints.length; j++) {
            FeatureTypeConstraint featureTypeConstraint =  featureTypeConstraints[j];
            filters.add(featureTypeConstraint.getFilter());
          };
          combined = filterFac.and(combined, filterFac.and(filters));
                }
                combinedList[i] = combined;
            }       
View Full Code Here

Examples of org.geotools.styling.FeatureTypeConstraint

            layerStyles = ((UserLayer) layer).getUserStyles();
        }

        // DJB: TODO: this needs to do the whole thing, not just names
        if (ftcs != null) {
            FeatureTypeConstraint ftc;
            final int length = ftcs.length;

            for (int t = 0; t < length; t++) {
                ftc = ftcs[t];

                if (ftc.getFeatureTypeName() != null) {
                    String ftc_name = ftc.getFeatureTypeName();

                    // taken from lite renderer
                    boolean matches;

                    try {
View Full Code Here

Examples of org.geotools.styling.FeatureTypeConstraint

            layerStyles = ((UserLayer) layer).getUserStyles();
        }

        // DJB: TODO: this needs to do the whole thing, not just names
        if (ftcs != null) {
            FeatureTypeConstraint ftc;
            final int length = ftcs.length;

            for (int t = 0; t < length; t++) {
                ftc = ftcs[t];

                if (ftc.getFeatureTypeName() != null) {
                    String ftc_name = ftc.getFeatureTypeName();

                    // taken from lite renderer
                    boolean matches;

                    try {
View Full Code Here

Examples of org.geotools.styling.FeatureTypeConstraint

        sld.setAbstract("Example Style Layer Descriptor");

        UserLayer layer = sf.createUserLayer();
        layer.setName("layer");

        FeatureTypeConstraint constraint = sf.createFeatureTypeConstraint("Feature",
                Filter.INCLUDE, null);

        layer.layerFeatureConstraints().add(constraint);

        Style style = sf.createStyle();
View Full Code Here

Examples of org.geotools.styling.FeatureTypeConstraint

        if (unset) {
            return null;
        }

        Extent[] ea = (Extent[]) extents.toArray(new Extent[extents.size()]);
        FeatureTypeConstraint constraint = sf.createFeatureTypeConstraint(featureTypeName, filter,
                ea);

        if (parent == null) {
            reset();
        }
View Full Code Here

Examples of org.geotools.styling.FeatureTypeConstraint

        assertSimpleStyle(collector);

        UserLayer layer = (UserLayer) collector.layers.get(0);
        assertEquals("http://geoserver.org/geoserver/ows", layer.getRemoteOWS().getOnlineResource());
        assertEquals("WFS", layer.getRemoteOWS().getService());
        FeatureTypeConstraint constraint = layer.getLayerFeatureConstraints()[0];
        assertEquals("states", constraint.getFeatureTypeName());
        assertEquals(tenMillionPeople, constraint.getFilter());
    }
View Full Code Here

Examples of org.geotools.styling.FeatureTypeConstraint

    UserLayer layer = sf.createUserLayer();
    layer.setName("layer");
   
    //
    // define constraint limited what features the sld applies to
    FeatureTypeConstraint constraint = sf.createFeatureTypeConstraint("Feature", Filter.INCLUDE,
            null);
   
    layer.layerFeatureConstraints().add(constraint);
   
    //
View Full Code Here

Examples of org.geotools.styling.FeatureTypeConstraint

    sld.setAbstract("Example Style Layer Descriptor");
   
    UserLayer layer = styleFactory.createUserLayer();
    layer.setName("layer");
   
    FeatureTypeConstraint constraint = styleFactory.createFeatureTypeConstraint("Feature",
            Filter.INCLUDE, null);
   
    layer.layerFeatureConstraints().add(constraint);
   
    Style style = styleFactory.createStyle();
View Full Code Here

Examples of org.geotools.styling.FeatureTypeConstraint

    public void visit(FeatureTypeConstraint ftc) {
        String typeName = ftc.getFeatureTypeName();
        Filter filter = copy(ftc.getFilter());
        Extent[] extents = copy(ftc.getExtents());
        FeatureTypeConstraint copy = sf.createFeatureTypeConstraint(typeName, filter, extents);

        if (STRICT && !copy.equals(ftc)) {
            throw new IllegalStateException("Was unable to duplicate provided FeatureTypeConstraint:" + ftc);
        }
        pages.push(copy);
    }
View Full Code Here

Examples of org.geotools.styling.FeatureTypeConstraint

    }

    public void testNormal() throws Exception {
        SLDMockData.featureTypeConstraint(document, document);

        FeatureTypeConstraint ftc = (FeatureTypeConstraint) parse();
        assertNotNull(ftc);

        assertEquals("theFeatureTypeName", ftc.getFeatureTypeName());
        assertNotNull(ftc.getFilter());
        assertEquals(2, ftc.getExtents().length);
    }
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.