Package org.opengis.filter

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


    }
   
    public void testEncodeTemporal() throws Exception {
        ByteArrayOutputStream os = new ByteArrayOutputStream();
        FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();
        Filter filter = ff.after(ff.property("date"), ff.literal(new Date()));
        org.geotools.filter.v2_0.FESConfiguration configuration = new org.geotools.filter.v2_0.FESConfiguration();
        org.geotools.xml.Encoder encoder = new org.geotools.xml.Encoder(configuration);
        encoder.encode(filter, org.geotools.filter.v2_0.FES.Filter, os);
       
        DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
View Full Code Here


    DateFormat FORMAT = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ");
    Date date1 = FORMAT.parse("2001-07-05T12:08:56.235-0700");
    Instant temporalInstant = new DefaultInstant(new DefaultPosition(date1));

    // Simple check if property is after provided temporal instant
    Filter after = ff.after(ff.property("date"), ff.literal(temporalInstant));

    // can also check of property is within a certain period
    Date date2 = FORMAT.parse("2001-07-04T12:08:56.235-0700");
    Instant temporalInstant2 = new DefaultInstant(new DefaultPosition(date2));
    Period period = new DefaultPeriod(temporalInstant, temporalInstant2);
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.