01: package com.vividsolutions.jump.datastore;
02:
03: /**
04: * Represents an ID used by DataStores to refer to a
05: * particular Spatial Reference System.
06: * Often an integer value.
07: */
08: public class SpatialReferenceSystemID {
09:
10: private String sridString = null;
11:
12: public SpatialReferenceSystemID() {
13: }
14:
15: public SpatialReferenceSystemID(String sridString) {
16: this .sridString = sridString;
17: }
18:
19: public SpatialReferenceSystemID(int srid) {
20: this .sridString = Integer.toString(srid);
21: }
22:
23: public int getInt() {
24: if (sridString == null)
25: return -1;
26: // could do something cleverer here, like try and extract an integer
27: return Integer.parseInt(sridString);
28: }
29:
30: public String getString() {
31: return sridString;
32: }
33:
34: public boolean isNull() {
35: return sridString == null;
36: }
37: }
|