Examples of function()


Examples of org.opengis.filter.FilterFactory.function()

                b.function("min").param().literal(1).param().literal(2).build());
       
        assertEquals(ff.function("min", ff.literal(1), ff.literal(2)),
                b.function("min").literal(1).literal(2).build());

        assertEquals(ff.function("max", ff.literal(1), ff.property("x")),
                b.function("max").literal(1).property("x").build());
       
        assertEquals(ff.function("max", ff.literal(1), ff.property("x")),
                b.function("max").literal(1).param().property("x").build());
View Full Code Here

Examples of org.opengis.filter.FilterFactory.function()

                b.function("min").literal(1).literal(2).build());

        assertEquals(ff.function("max", ff.literal(1), ff.property("x")),
                b.function("max").literal(1).property("x").build());
       
        assertEquals(ff.function("max", ff.literal(1), ff.property("x")),
                b.function("max").literal(1).param().property("x").build());

    }
   
    @Test
View Full Code Here

Examples of org.opengis.filter.FilterFactory2.function()

    }

    private org.opengis.filter.Filter createGeometryTypeFilter( String geomName, String type )
            throws IllegalFilterException {
        FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(null);
        Function function = ff.function("geometryType", ff.property(geomName));
        return ff.equal(function, ff.literal(type)); //$NON-NLS-1$
    }

    private boolean writeToShapefile(SimpleFeatureCollection fc, SimpleFeatureType type, File file ) throws IOException {
       
View Full Code Here

Examples of org.opengis.filter.FilterFactory2.function()

        StyleBuilder sb = new StyleBuilder();
        Mark mark = sb.createMark("square");
        mark.setStroke(null);
        Graphic graphic = sb.createGraphic(null, mark, null);
        FilterFactory2 ff = sb.getFilterFactory();
        graphic.setSize(ff.function("env", ff.literal("test")));
        PointSymbolizer ps = sb.createPointSymbolizer(graphic);
        Style style = sb.createStyle(ps);

        try {
            EnvFunction.setGlobalValue("test", 10);
View Full Code Here

Examples of org.opengis.filter.FilterFactory2.function()

        // setup a point layer with the right geometry trnasformation
        Style style = SLD.createPointStyle("circle", Color.BLUE, Color.BLUE, 1f, 10f);
        PointSymbolizer ps = (PointSymbolizer) style.featureTypeStyles().get(0).rules().get(0).symbolizers().get(0);
        FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(null);
        ps.setGeometry(ff.function("convert", ff.property("wkt"), ff.literal(Point.class)));

        // setup the map
        MapContent map = new MapContent();
        Layer layer = new FeatureLayer(features, style);
        map.addLayer(layer);
View Full Code Here

Examples of org.opengis.filter.FilterFactory2.function()

    public void testVocabFunction() {
        URL file = getClass().getResource("/test-data/minoc_lithology_mapping.properties");
        assertNotNull(file);
       
        FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(null);
        Function function = ff.function("Vocab", ff.literal("1LIST"), ff.literal(DataUtilities
                .urlToFile(file).getPath()));

        Object value = function.evaluate(null);
        assertEquals(
                "urn:cgi:classifier:CGI:SimpleLithology:2008:calcareous_carbonate_sedimentary_rock",
View Full Code Here

Examples of org.opengis.filter.FilterFactory2.function()

    }

    @Test
    public void testNoVocabFunction() {
        FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(null);
        Function function = ff.function("Vocab", ff.literal("a"), ff.literal("urn:1234"));

        try {
            function.evaluate(null);
            fail("Should not be able to get this far");
        } catch (Throwable expected) {
View Full Code Here

Examples of org.rstudio.studio.client.common.icons.code.CodeIcons.function()

      case VARIABLE:
         return icons.variable();
      case FUNCTION:
      case CONSTRUCTOR:
      case DESTRUCTOR:
         return icons.function();
      case CLASS:
      case STRUCT:
         return icons.clazz();
      case NAMESPACE:
         return icons.namespace();
View Full Code Here

Examples of org.sonar.server.debt.DebtModelXMLExporter.RuleDebt.function()

    rule = rules.get(1);
    assertThat(rule.ruleKey().repository()).isEqualTo("squid");
    assertThat(rule.ruleKey().rule()).isEqualTo("AvoidNPE");
    assertThat(rule.subCharacteristicKey()).isEqualTo("COMPILER");
    assertThat(rule.function()).isEqualTo("LINEAR");
    assertThat(rule.coefficient()).isEqualTo("2h");
    assertThat(rule.offset()).isNull();
  }

  @Test
View Full Code Here

Examples of org.springmodules.validation.valang.parser.ValangParser.function()

     */
    protected Function parseFunction(String expression, Map functionsByName) {
        ValangParser parser = new ValangParser(new StringReader(expression));
        parser.setFunctionsByName(functionsByName);
        try {
            return parser.function(new TargetBeanFunction());
        } catch (ParseException pe) {
            logger.error("Could not parse valang expression '" + expression + "' to a function", pe);
            throw new IllegalArgumentException("Could not parse valang expression '" + expression + "' to a function");
        }
    }
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.