The following stereotypes of UML classes and data types are mapped to J2SE objects as below:
UML | OGC Purpose | Java mapping |
---|---|---|
<<DataType>> |
A descriptor of a set of values that lack identity (independent existence and the possibility of side effects). A DataType is a class with no operations whose primary purpose is to hold the information. | Interface |
<<CodeList>> |
A flexible enumeration that uses string values for expressing a list of potential values. | org.opengis.util.CodeList extends
java.lang.Enum* |
<<Union>> |
Contains a list of attributes where only one of those attributes can be present at any time. | none |
<<Abstract>> |
A polymorphic object class that cannot be instantiated. | Interface |
CharacterString |
A sequence of characters. | java.lang.String |
Integer |
An integer number. | int |
Double |
A double precision floating point number. | double |
Boolean |
A value specifying TRUE or FALSE. | boolean |
DateTime |
A character string as specified by ISO 19108, which comprises year, month, day and time of the day to the appropriate level of precision. | java.util.Date |
Sequence<DataType> |
A sequence type of collection, which contains an ordered list of values with the specified data type. | Array or
java.util.List |
* For platform earlier than J2SE 1.5, the CodeList
class will defines the same attributes than Enum
but will not
extends Enum
.
OpenGIS's Mandatory, Conditional and
Optional attributes are marked using custom @mandatory
,
@conditional
and @optional
javadoc tags respectively.