package org.maptalks.javasdk.db;
import java.util.List;
import java.util.Map;


public class Layer {
	public static final String TYPE_DB_TABLE = "db_table";
	public static final String TYPE_DB_VIEW = "db_view";
	public static final String TYPE_DB_SPATIAL_TABLE = "db_spatial_table";
	public static final String TYPE_DB_SPATIAL_VIEW = "db_spatial_view";
	public static final String TYPE_FILE_SHP = "file_shp";
    //---------¶,propertiesе
    /**
     * mysqlݱ, innodbmyISAM
     */
    public static final String PROPERTY_MYSQL_ENGINE="engine";
    public static final String PROPERTY_MYSQL_ENGINE_DEFAULT="MyISAM";
    /**
     * shapefileencoding
     */
    public static final String PROPERTY_SHP_ENCODING="encoding";
    public static final String PROPERTY_SHP_ENCODING_DEFAULT="utf-8";
    /**
     * DBFб,Զŷָ,ĬΪ,
     */
    public static final String PROPERTY_SHP_PROPERTY ="property";
    public static final String PROPERTY_SHP_PROPERTY_DEFAULT =null;
    /**
     * ShapeFile
     */
    public static final String PROPERTY_SHP_CRS="crs";

    /**
     * Ƿ
     */
    public static final String PROPERTY_CREATE_INDEX="createindex";
    public static final boolean PROPERTY_CREATE_INDEX_DEFAULT=true;
	// ------------------------------------------------------

	private String id;
	private String name;
	private String type = TYPE_DB_TABLE;
	private String source;
    private Map<String, Object> properties;
	private List<LayerField> fields;

	public String getId() {
		return id;
	}

	public void setId(final String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(final String name) {
		this.name = name;
	}


	public List<LayerField> getFields() {
		return fields;
	}

	public void setFields(List<LayerField> fields) {
		this.fields = fields;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getSource() {
		return source;
	}

	public void setSource(String source) {
		this.source = source;
	}

    public Map<String, Object> getProperties() {
        return properties;
    }

    public void setProperties(Map<String, Object> properties) {
        this.properties = properties;
    }
}

@@ -421,11 +421,20 @@
 ----
-%C2%B6%EE%B3%A3,
+%E4%BB%A5%E4%B8%8B%E5%AE%9A%E4%B9%89%E4%BA%86%E9%85%8D%E7%BD%AE%E9%A1%B9%E5%B8%B8%E9%87%8F,%E5%8D%B3
 prop
@@ -443,9 +443,17 @@
 ties
-%D0%B5
+%E5%B1%9E%E6%80%A7%E4%B8%AD%E7%9A%84%E9%85%8D%E7%BD%AE%E9%A1%B9%E5%90%8D%E7%A7%B0
 %0A   
@@ -473,17 +473,22 @@
 ysql
-%DD%B1
+%E7%9A%84%E6%95%B0%E6%8D%AE%E8%A1%A8%E5%BC%95%E6%93%8E
 , innodb
 myIS
@@ -483,16 +483,17 @@
 , innodb
+%E6%88%96
 myISAM%0A 
@@ -657,16 +657,17 @@
 hapefile
+%E7%9A%84
 encoding
@@ -829,20 +829,36 @@
   * 
-DBF%D0%B1,%D4%B6%C5%B7%D6%B8,%C4%AC%CE%AA,
+%E8%BD%BD%E5%85%A5%E7%9A%84DBF%E5%B1%9E%E6%80%A7%E5%88%97%E8%A1%A8,%E5%B1%9E%E6%80%A7%E4%BB%A5%E9%80%97%E5%8F%B7%E5%88%86%E9%9A%94,%E9%BB%98%E8%AE%A4%E4%B8%BA%E7%A9%BA,%E5%8D%B3%E4%B8%8D%E8%BD%BD%E5%85%A5
 %0A   
@@ -1020,16 +1020,21 @@
 hapeFile
+%E7%9A%84%E5%9D%90%E6%A0%87%E7%B1%BB%E5%9E%8B
 %0A     */
@@ -1109,9 +1109,14 @@
   * 
-%C7%B7
+%E6%98%AF%E5%90%A6%E5%BB%BA%E7%AB%8B%E7%B4%A2%E5%BC%95
 %0A   

convert Layer.java to UTF-8