Enumerations are not a feature of the Java language, but the concept can still be modeled. Modeling Enumerations in OSS through Java interfaces involves defining variables that are static and final. The restriction feature allows for the definition of type that is comprised of a subset of another type. The subset of strings is represented with the use of another XML feature called enumerations. The enumeration facet limits a simple type to a set of distinct values.
Simple types are the only types that can be restricted and are perfect for enumerations.
However, unlike complexTypes, simpleTypes can not be extended to add these additional values. The interface must be extensible to allow for extensions of the enumeration. The use of substitution groups would be a solution to this problem. Substitution groups allow elements to be substituted for other elements. For example, if another state is to be added to OrderState, then in the derived schema, a new simpleType would be defined as NewOrderState.