/** * Creates a new SRID instance from a given value. * @param exp Either "variable" or a numeric non-negative SRID value * @return SRID instance */ public static SRID valueOf(final String exp) { final SRID instance = new SRID(); if (VARIABLE.equalsIgnoreCase(exp)) { instance.variable = Boolean.TRUE; } else { instance.value = Integer.valueOf(exp); if (instance.value < 0) { throw new IllegalArgumentException( "The value of the SRID attribute MUST be a non-negative integer or the special value 'variable'"); } } return instance; }
/** * Creates a new SRID instance from a given value. * @param exp Either "variable" or a numeric non-negative SRID value * @return SRID instance */ public static SRID valueOf(final String exp) { final SRID instance = new SRID(); if (VARIABLE.equalsIgnoreCase(exp)) { instance.variable = Boolean.TRUE; } else { instance.value = Integer.valueOf(exp); if (instance.value < 0) { throw new IllegalArgumentException( "The value of the SRID attribute MUST be a non-negative integer or the special value 'variable'"); } } return instance; }
/** * Constructor. * * @param dimension dimension * @param type type * @param srid SRID */ protected Geospatial(final Dimension dimension, final Type type, final SRID srid) { this.dimension = dimension; this.type = type; this.srid = srid == null ? new SRID() : srid; this.srid.setDimension(dimension); }
/** * Constructor. * * @param dimension dimension * @param type type * @param srid SRID */ protected Geospatial(final Dimension dimension, final Type type, final SRID srid) { this.dimension = dimension; this.type = type; this.srid = srid == null ? new SRID() : srid; this.srid.setDimension(dimension); }