Package org.opengis.cite.ogcapifeatures10.conformance.crs.query.crs

# Class CoordinateSystem

java.lang.Object
org.opengis.cite.ogcapifeatures10.conformance.crs.query.crs.CoordinateSystem

public class CoordinateSystem extends Object
Encapsulates an CRS from

Author:
  Lyn Goltz

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CoordinateSystem(String code)`
  Constructor for CoordinateSystem.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object o)`
  `String`
  `getAsHeaderValue()`
  getAsHeaderValue.
  `String`
  `getCode()`
  Getter for the field `code`.
  `String`
  `getCodeWithAuthority()`
  getCodeWithAuthority.
  `int`
  `getSrid()`
  srid from the passed crs
  `int`
  `hashCode()`
  `boolean`
  `isValid()`
  1.
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### CoordinateSystem

    public CoordinateSystem(String code)

    Constructor for CoordinateSystem.

    Parameters:
      `code` - the coordinate system, never `null`

- ## Method Details

  - ### getCode

    public String getCode()

    Getter for the field `code`.

    Returns:
      the code of the crs, never `null`

  - ### getAsHeaderValue

    public String getAsHeaderValue()

    getAsHeaderValue.

    Returns:
      the crs as header value (like <CODE>, never `null`

  - ### getSrid

    public int getSrid()
    srid from the passed crs
    Returns:
      the parsed srid, -1 if the crs is `null`

  - ### getCodeWithAuthority

    public String getCodeWithAuthority()

    getCodeWithAuthority.

    Returns:
      the code with the authority: EPSG:CODE, may be `null`

  - ### isValid

    public boolean isValid()

          1. For http-URIs (starting with http:) validate that the string conforms to the syntax specified
             by RFC 7230, section 2.7.1.
          2. For https-URIs (starting with https:) validate that the string conforms to the syntax specified
             by RFC 7230, section 2.7.2.
          3. For URNs (starting with urn:) validate that the string conforms to the syntax specified
             by RFC 8141, section 2.
          4. For OGC URNs (starting with urn:ogc:def:crs:) and OGC http-URIs (starting with http://www.opengis.net/def/crs/)
             validate that the string conforms to the syntax specified by OGC Name Type Specification - definitions - part 1 – basic name.

    Returns:
      `true` if the crs is valid, `false` otherwise

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### equals

    public boolean equals(Object o)
    Overrides:
      `equals` in class `Object`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`