Package org.geotools.xs.bindings

Examples of org.geotools.xs.bindings.XSDateTimeBinding


        protected String encodeDateTime(Date date) {
            if (date != null) {
                Calendar c = Calendar.getInstance();
                c.setTime(date);
                return new XSDateTimeBinding().encode(c, null);
            } else {
                return null;
            }
        }
View Full Code Here


    private String convertToISODate(String date) {
        Date dateValue = (Date) Converters.convert(date, Date.class);
        Calendar c = Calendar.getInstance();
        c.setTime(dateValue);
        String isoDate = new XSDateTimeBinding().encode(c, null);
        return isoDate;
    }
View Full Code Here

            this.rel = rel;
        }
       
        public void initialize(String param){
            try {
                myDate = ((Calendar) new XSDateTimeBinding().parse(null, param )).getTime();
            } catch (Exception e) {
                throw new RuntimeException( e );
            }
        }
View Full Code Here

     */
    public Object parse(InstanceComponent instance, Object value) throws Exception {
        //JD: for the moment we will just handle the easy ones of date and datetime
        Date date = null;
        try {
            Timestamp c = new XSDateTimeBinding().parse(instance, value);
            if (c != null) {
                date = new Date(c.getTime());
            }
        }
        catch(Exception e) {}
View Full Code Here

        protected String encodeDateTime(Date date) {
            if (date != null) {
                Calendar c = Calendar.getInstance();
                c.setTime(date);
                return new XSDateTimeBinding().encode(c, null);
            } else {
                return null;
            }
        }
View Full Code Here

        protected String encodeDateTime(Date date) {
            if (date != null) {
                Calendar c = Calendar.getInstance();
                c.setTime(date);
                return new XSDateTimeBinding().encode(c, null);
            } else {
                return null;
            }
        }
View Full Code Here

        protected String encodeDateTime(Date date) {
            if (date != null) {
                Calendar c = Calendar.getInstance();
                c.setTime(date);
                return new XSDateTimeBinding().encode(c, null);
            } else {
                return null;
            }
        }
View Full Code Here

TOP

Related Classes of org.geotools.xs.bindings.XSDateTimeBinding

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.