aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/geojson/Crs.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/geojson/Crs.java')
-rw-r--r--src/main/java/org/geojson/Crs.java56
1 files changed, 56 insertions, 0 deletions
diff --git a/src/main/java/org/geojson/Crs.java b/src/main/java/org/geojson/Crs.java
new file mode 100644
index 0000000..9aa203c
--- /dev/null
+++ b/src/main/java/org/geojson/Crs.java
@@ -0,0 +1,56 @@
+package org.geojson;
+
+import org.geojson.jackson.CrsType;
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
+
+public class Crs implements Serializable{
+
+ private CrsType type = CrsType.name;
+ private Map<String, Object> properties = new HashMap<String, Object>();
+
+ public CrsType getType() {
+ return type;
+ }
+
+ public void setType(CrsType type) {
+ this.type = type;
+ }
+
+ public Map<String, Object> getProperties() {
+ return properties;
+ }
+
+ public void setProperties(Map<String, Object> properties) {
+ this.properties = properties;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (!(o instanceof Crs)) {
+ return false;
+ }
+ Crs crs = (Crs)o;
+ if (properties != null ? !properties.equals(crs.properties) : crs.properties != null) {
+ return false;
+ }
+ return !(type != null ? !type.equals(crs.type) : crs.type != null);
+ }
+
+ @Override
+ public int hashCode() {
+ int result = type != null ? type.hashCode() : 0;
+ result = 31 * result + (properties != null ? properties.hashCode() : 0);
+ return result;
+ }
+
+ @Override
+ public String toString() {
+ return "Crs{" + "type='" + type + '\'' + ", properties=" + properties + '}';
+ }
+}