Package org.apache.sis.internal.storage
Enum CodeType
- All Implemented Interfaces:
Serializable,Comparable<CodeType>
Heuristic rules for determining whether an authority code seems to be actually a file path,
or a code defined in the URN namespace, or a simple code.
- Since:
- 0.8
- Version:
- 0.8
- Author:
- Martin Desruisseaux (IRD, Geomatys)
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe code is a filename like"/path/to/file"or"C:\path\to\file".The code is an URL in the"http://www.opengis.net"namespace.The code is not defined in the URN namespace but is nevertheless presumed to be an authority code.Cannot resolve whether the code is a local file like"myfile.wkt"or an identifier without authority like"4326".The code is a URL like"http:"or"file:", with the exception of HTTP in the "www.opengis.net" domain.The code is an authority code defined in the"urn:"namespace. -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal booleanWhether the code may be understood by theCRS.forCode(String). -
Method Summary
-
Enum Constant Details
-
FILE
The code is a filename like"/path/to/file"or"C:\path\to\file". Could also be a directory name. -
URL
The code is a URL like"http:"or"file:", with the exception of HTTP in the "www.opengis.net" domain. The latter case is identified byHTTP_OGCinstead of this enum. -
URN
The code is an authority code defined in the"urn:"namespace. -
HTTP_OGC
The code is an URL in the"http://www.opengis.net"namespace. -
IDENTIFIER
The code is not defined in the URN namespace but is nevertheless presumed to be an authority code. Example:"EPSG:4326". -
UNKNOWN
Cannot resolve whether the code is a local file like"myfile.wkt"or an identifier without authority like"4326". Such code without cannot be decoded byCRS.forCode(String), but may be understood by a more specific authority factory.
-
-
Field Details
-
isCRS
public final boolean isCRSWhether the code may be understood by theCRS.forCode(String). A value oftruedoes not guaranteed the the code is valid. It only said that there is some chances that the code is valid.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
guess
Infers the type for the given authority code.- Parameters:
codeOrPath- the code or file path.- Returns:
- whether the given argument seems to be a file path, URL, URN of authority code.
-