UML to Java mapping

UMLOGC PurposeJava mapping
<<Enumeration>> Data type whose instances form a list of named literal values. Both the enumeration name and its literal values are declared. Enumeration means a short list of well-understood potential values within a class. extends java.lang.Enum
<<CodeList>> A flexible enumeration useful for expressing a long list of potential values. If the elements of the list are completely known, an enumeration should be used; if the only likely values of the elements are known, a code list should be used. extends CodeList
<<Union>> Contains a list of attributes where only one of those attributes can be present at any time. none. Create a common super-class instead.
<<Type>> Class used for specification of a domain of instances (objects), together with the operations applicable to the objects. A type may have attributes and associations. Java interface
<<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. Java interface
<<Abstract>> A polymorphic object class that cannot be instantiated. Java interface
<<Interface>> Named set of operations that characterize the behaviour of an element.. Java interface
Constructor Cast an object into an object of another type. A createFoo() method in a Factory interface.
Set<DataType> A finite set. Each object is considered to be in the set only once. java.util.Set
Sequence<DataType> A sequence type of collection, which contains an ordered finite list of values (possibly with repeated values) of the specified data type. Small array, or java.util.List if the sequence is likely to be big.
CharacterString A sequence of characters. java.lang.String in the general case, or java.net.URI for reference to a file.
Integer An integer number. int if mandatory, or java.lang.Integer if optional.
Double A double precision floating point number. double if mandatory, or java.lang.Double if optional.
Boolean A value specifying TRUE or FALSE. boolean if mandatory, or java.lang.Boolean if optional.
Sign Sign + or -. int with value +1 ou -1
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
Scale A floating point number associated with a dimensionless unit. double if mandatory, or java.lang.Double if optional.
Length A floating point number associated with a linear unit. double with some getUnit() method (e.g. getAxisUnit()).
Angle A floating point number associated with an angular unit. double with some getUnit() method (e.g. getAngularUnit()).
Measure A floating point number associated with an arbitrary unit. double with a getUnit() method.
Record A structure of logically related elements. May be used as an implementation representation for features, by keeping a list of (name, value) pairs in a dictionary. This represents a generic storage structure for features. User-defined subclass of java.lang.Object
RecordType Description of a Record structure. java.lang.Class

 

Javadoc tags

Javadoc tagUsage
@author <editor>

The person who wrote the interface. This is not the person who wrote the specification. The term editor may be more appropriate for describing his task, but @author is the standard javadoc tag. Furthermore, the editor sometimes needs to extend the specification, in which case editor do some author work. The @author tag may be considered as a contact person for questions related to the Java expression of OGC/ISO specifications.

@departure <category>
<reason>

Documents a departure from OGC/ISO specifications. All those tags are collected in the departures page.

@unitof <quantity>

The method returns a double value which should be expressed in unit of Scale, Length or Angle. Some getUnit() method must be provided in addition to this method.

@todo <comment>

Somme open issue to revisit.