Package org.locationtech.geogig.storage

Examples of org.locationtech.geogig.storage.FieldType


     *
     * @param opt
     * @param data
     */
    public static void write(Optional<Object> opt, DataOutput data) throws IOException {
        FieldType type = FieldType.forValue(opt);
        if (serializers.containsKey(type)) {
            serializers.get(type).write(opt.orNull(), data);
        } else {
            throw new IllegalArgumentException("The specified type (" + type + ") is not supported");
        }
View Full Code Here


     * Returns a string representation of the passed field value
     *
     * @param opt
     */
    public static String asString(Optional<Object> opt) {
        final FieldType type = FieldType.forValue(opt);
        if (serializers.containsKey(type)) {
            return serializers.get(type).toString(opt.orNull());
        } else {
            throw new IllegalArgumentException("The specified type is not supported: " + type);
        }
View Full Code Here

                        for (int index = 0; index < values.size(); index++) {
                            Optional<Object> value = values.get(index);
                            PropertyDescriptor attrib = (PropertyDescriptor) attribs.toArray()[index];
                            String stringValue = "";
                            if (value.isPresent()) {
                                FieldType attributeType = FieldType.forBinding(attrib.getType()
                                        .getBinding());
                                switch (attributeType) {
                                case DATE:
                                    stringValue = new SimpleDateFormat("MM/dd/yyyy z")
                                            .format((java.sql.Date) value.get());
View Full Code Here

TOP

Related Classes of org.locationtech.geogig.storage.FieldType

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.