Class CharacterSet
- java.lang.Object
-
- org.opengis.util.CodeList<CharacterSet>
-
- org.opengis.metadata.identification.CharacterSet
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<CharacterSet>
@UML(identifier="MD_CharacterSetCode", specification=ISO_19115) public final class CharacterSet extends CodeList<CharacterSet>
Name of the character coding standard used for the resource.- Since:
- 2.1
- Version:
- 3.0
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.opengis.util.CodeList
CodeList.Filter
-
-
Field Summary
Fields Modifier and Type Field Description static CharacterSet
BIG_5
Traditional Chinese code set used in Taiwan, Hong Kong, and other areas.private java.lang.String
charset
The JavaCharset
name (nevernull
).static CharacterSet
EBCDIC
IBM mainframe code set.static CharacterSet
EUC_JP
Japanese code set used on UNIX based machines.static CharacterSet
EUC_KR
Korean code set.static CharacterSet
GB2312
Simplified Chinese code set.static CharacterSet
ISO_8859_1
ISO/IEC 8859-1, Information technology.static CharacterSet
ISO_8859_10
ISO/IEC 8859-10, Information technology.static CharacterSet
ISO_8859_11
ISO/IEC 8859-11, Information technology.static CharacterSet
ISO_8859_12
A future ISO/IEC 8-bit single-byte coded graphic character set.static CharacterSet
ISO_8859_13
ISO/IEC 8859-13, Information technology.static CharacterSet
ISO_8859_14
ISO/IEC 8859-14, Information technology.static CharacterSet
ISO_8859_15
ISO/IEC 8859-15, Information technology.static CharacterSet
ISO_8859_16
ISO/IEC 8859-16, Information technology.static CharacterSet
ISO_8859_2
ISO/IEC 8859-2, Information technology.static CharacterSet
ISO_8859_3
ISO/IEC 8859-3, Information technology.static CharacterSet
ISO_8859_4
ISO/IEC 8859-4, Information technology.static CharacterSet
ISO_8859_5
ISO/IEC 8859-5, Information technology.static CharacterSet
ISO_8859_6
ISO/IEC 8859-6, Information technology.static CharacterSet
ISO_8859_7
ISO/IEC 8859-7, Information technology.static CharacterSet
ISO_8859_8
ISO/IEC 8859-8, Information technology.static CharacterSet
ISO_8859_9
ISO/IEC 8859-9, Information technology.static CharacterSet
JIS
Japanese code set used for electronic transmission.private static long
serialVersionUID
Serial number for compatibility with different versions.static CharacterSet
SHIFT_JIS
Japanese code set used on MS-DOS based machines.static CharacterSet
UCS_2
16-bit fixed size Universal Character Set, based on ISO/IEC 10646.static CharacterSet
UCS_4
32-bit fixed size Universal Character Set, based on ISO/IEC 10646.static CharacterSet
US_ASCII
United States ASCII code set (ISO 646 US).static CharacterSet
UTF_16
16-bit variable size UCS Transfer Format, based on ISO/IEC 10646.static CharacterSet
UTF_7
7-bit variable size UCS Transfer Format, based on ISO/IEC 10646.static CharacterSet
UTF_8
8-bit variable size UCS Transfer Format, based on ISO/IEC 10646.private static java.util.List<CharacterSet>
VALUES
List of all enumerations of this type.
-
Constructor Summary
Constructors Modifier Constructor Description private
CharacterSet(java.lang.String name)
Constructs an enum with identical name and charset.private
CharacterSet(java.lang.String name, java.lang.String charset)
Constructs an enum with the given name.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CharacterSet[]
family()
Returns the list of enumerations of the same kind than this enum.java.lang.String[]
names()
Returns all the names of this code.java.nio.charset.Charset
toCharset()
Converts the Character Set to a java Charset, if it can.static CharacterSet
valueOf(java.lang.String code)
Returns the character set that matches the given string, or returns a new one if none match it.static CharacterSet[]
values()
Returns the list ofCharacterSet
s.-
Methods inherited from class org.opengis.util.CodeList
compareTo, equals, identifier, name, ordinal, readResolve, toString, valueOf, valueOf
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
Serial number for compatibility with different versions.- See Also:
- Constant Field Values
-
VALUES
private static final java.util.List<CharacterSet> VALUES
List of all enumerations of this type. Must be declared before any enum declaration.
-
UCS_2
@UML(identifier="ucs2", obligation=CONDITIONAL, specification=ISO_19115) public static final CharacterSet UCS_2
16-bit fixed size Universal Character Set, based on ISO/IEC 10646.
-
UCS_4
@UML(identifier="ucs4", obligation=CONDITIONAL, specification=ISO_19115) public static final CharacterSet UCS_4
32-bit fixed size Universal Character Set, based on ISO/IEC 10646.
-
UTF_7
@UML(identifier="utf7", obligation=CONDITIONAL, specification=ISO_19115) public static final CharacterSet UTF_7
7-bit variable size UCS Transfer Format, based on ISO/IEC 10646.
-
UTF_8
@UML(identifier="utf8", obligation=CONDITIONAL, specification=ISO_19115) public static final CharacterSet UTF_8
8-bit variable size UCS Transfer Format, based on ISO/IEC 10646.
-
UTF_16
@UML(identifier="utf16", obligation=CONDITIONAL, specification=ISO_19115) public static final CharacterSet UTF_16
16-bit variable size UCS Transfer Format, based on ISO/IEC 10646.
-
ISO_8859_1
@UML(identifier="8859part1", obligation=CONDITIONAL, specification=ISO_19115) public static final CharacterSet ISO_8859_1
ISO/IEC 8859-1, Information technology. 8-bit single-byte coded graphic character sets - Part 1: Latin alphabet No. 1.
-
ISO_8859_2
@UML(identifier="8859part2", obligation=CONDITIONAL, specification=ISO_19115) public static final CharacterSet ISO_8859_2
ISO/IEC 8859-2, Information technology. 8-bit single-byte coded graphic character sets - Part 2: Latin alphabet No. 2.
-
ISO_8859_3
@UML(identifier="8859part3", obligation=CONDITIONAL, specification=ISO_19115) public static final CharacterSet ISO_8859_3
ISO/IEC 8859-3, Information technology. 8-bit single-byte coded graphic character sets - Part 3: Latin alphabet No. 3.
-
ISO_8859_4
@UML(identifier="8859part4", obligation=CONDITIONAL, specification=ISO_19115) public static final CharacterSet ISO_8859_4
ISO/IEC 8859-4, Information technology. 8-bit single-byte coded graphic character sets - Part 4: Latin alphabet No. 4.
-
ISO_8859_5
@UML(identifier="8859part5", obligation=CONDITIONAL, specification=ISO_19115) public static final CharacterSet ISO_8859_5
ISO/IEC 8859-5, Information technology. 8-bit single-byte coded graphic character sets - Part 5: Latin/Cyrillic alphabet.
-
ISO_8859_6
@UML(identifier="8859part6", obligation=CONDITIONAL, specification=ISO_19115) public static final CharacterSet ISO_8859_6
ISO/IEC 8859-6, Information technology. 8-bit single-byte coded graphic character sets - Part 6: Latin/Arabic alphabet.
-
ISO_8859_7
@UML(identifier="8859part7", obligation=CONDITIONAL, specification=ISO_19115) public static final CharacterSet ISO_8859_7
ISO/IEC 8859-7, Information technology. 8-bit single-byte coded graphic character sets - Part 7: Latin/Greek alphabet.
-
ISO_8859_8
@UML(identifier="8859part8", obligation=CONDITIONAL, specification=ISO_19115) public static final CharacterSet ISO_8859_8
ISO/IEC 8859-8, Information technology. 8-bit single-byte coded graphic character sets - Part 8: Latin/Hebrew alphabet.
-
ISO_8859_9
@UML(identifier="8859part9", obligation=CONDITIONAL, specification=ISO_19115) public static final CharacterSet ISO_8859_9
ISO/IEC 8859-9, Information technology. 8-bit single-byte coded graphic character sets - Part 9: Latin alphabet No. 5.
-
ISO_8859_10
@UML(identifier="8859part10", obligation=CONDITIONAL, specification=ISO_19115) public static final CharacterSet ISO_8859_10
ISO/IEC 8859-10, Information technology. 8-bit single-byte coded graphic character sets - Part 10: Latin alphabet No. 6.
-
ISO_8859_11
@UML(identifier="8859part11", obligation=CONDITIONAL, specification=ISO_19115) public static final CharacterSet ISO_8859_11
ISO/IEC 8859-11, Information technology. 8-bit single-byte coded graphic character sets - Part 11: Latin/Thai alphabet.
-
ISO_8859_12
@UML(identifier="8859part12", obligation=CONDITIONAL, specification=ISO_19115) public static final CharacterSet ISO_8859_12
A future ISO/IEC 8-bit single-byte coded graphic character set.
-
ISO_8859_13
@UML(identifier="8859part13", obligation=CONDITIONAL, specification=ISO_19115) public static final CharacterSet ISO_8859_13
ISO/IEC 8859-13, Information technology. 8-bit single-byte coded graphic character sets - Part 13: Latin alphabet No. 7.
-
ISO_8859_14
@UML(identifier="8859part14", obligation=CONDITIONAL, specification=ISO_19115) public static final CharacterSet ISO_8859_14
ISO/IEC 8859-14, Information technology. 8-bit single-byte coded graphic character sets - Part 14: Latin alphabet No. 8 (Celtic).
-
ISO_8859_15
@UML(identifier="8859part15", obligation=CONDITIONAL, specification=ISO_19115) public static final CharacterSet ISO_8859_15
ISO/IEC 8859-15, Information technology. 8-bit single-byte coded graphic character sets - Part 15: Latin alphabet No. 9.
-
ISO_8859_16
@UML(identifier="8859part16", obligation=CONDITIONAL, specification=ISO_19115) public static final CharacterSet ISO_8859_16
ISO/IEC 8859-16, Information technology. 8-bit single-byte coded graphic character sets - Part 16: Latin alphabet No. 10.
-
JIS
@UML(identifier="jis", obligation=CONDITIONAL, specification=ISO_19115) public static final CharacterSet JIS
Japanese code set used for electronic transmission.
-
SHIFT_JIS
@UML(identifier="shiftJIS", obligation=CONDITIONAL, specification=ISO_19115) public static final CharacterSet SHIFT_JIS
Japanese code set used on MS-DOS based machines.
-
EUC_JP
@UML(identifier="eucJP", obligation=CONDITIONAL, specification=ISO_19115) public static final CharacterSet EUC_JP
Japanese code set used on UNIX based machines.
-
US_ASCII
@UML(identifier="usAscii", obligation=CONDITIONAL, specification=ISO_19115) public static final CharacterSet US_ASCII
United States ASCII code set (ISO 646 US).
-
EBCDIC
@UML(identifier="ebcdic", obligation=CONDITIONAL, specification=ISO_19115) public static final CharacterSet EBCDIC
IBM mainframe code set.
-
EUC_KR
@UML(identifier="eucKR", obligation=CONDITIONAL, specification=ISO_19115) public static final CharacterSet EUC_KR
Korean code set.
-
BIG_5
@UML(identifier="big5", obligation=CONDITIONAL, specification=ISO_19115) public static final CharacterSet BIG_5
Traditional Chinese code set used in Taiwan, Hong Kong, and other areas.
-
GB2312
@UML(identifier="GB2312", obligation=CONDITIONAL, specification=ISO_19115) public static final CharacterSet GB2312
Simplified Chinese code set.
-
charset
private final java.lang.String charset
The JavaCharset
name (nevernull
).
-
-
Constructor Detail
-
CharacterSet
private CharacterSet(java.lang.String name, java.lang.String charset)
Constructs an enum with the given name. The new enum is automatically added to the list returned byvalues()
.- Parameters:
name
- The enum name. This name must not be in use by an other enum of this type.charset
- The JavaCharset
name, ornull
if none.
-
CharacterSet
private CharacterSet(java.lang.String name)
Constructs an enum with identical name and charset. This is needed forCodeList.valueOf(Class, String)
reflection.
-
-
Method Detail
-
toCharset
public java.nio.charset.Charset toCharset() throws java.nio.charset.UnsupportedCharsetException
Converts the Character Set to a java Charset, if it can.- Returns:
- The Java Charset.
- Throws:
java.nio.charset.UnsupportedCharsetException
- If no support for the charset is available.- See Also:
- Supported encodings
-
names
public java.lang.String[] names()
Returns all the names of this code. The returned array contains the following elements, with duplicated values and null values removed:- The programmatic name
- The UML identifier
- The charset name
Those names are typically equal except for the case (programmatic names are upper case while UML names are lower case) and special characters like
'-'
.- Overrides:
names
in classCodeList<CharacterSet>
- Returns:
- All names of this code constant. This array is never null and never empty.
- Since:
- 2.3
-
values
public static CharacterSet[] values()
Returns the list ofCharacterSet
s.- Returns:
- The list of codes declared in the current JVM.
-
family
public CharacterSet[] family()
Returns the list of enumerations of the same kind than this enum.- Specified by:
family
in classCodeList<CharacterSet>
- Returns:
- The codes of the same kind than this code.
-
valueOf
public static CharacterSet valueOf(java.lang.String code)
Returns the character set that matches the given string, or returns a new one if none match it.- Parameters:
code
- The name of the code to fetch or to create.- Returns:
- A code matching the given name.
-
-