org.openmdx.model1.code
Class ModelConstraints

java.lang.Object
  extended by org.openmdx.model1.code.ModelConstraints

public class ModelConstraints
extends Object

The ModelConstraints class contains the model constraints that are used by the class ModelConstraintsChecker_1


Field Summary
static String ABSTRACT_CLASSES_CANNOT_BE_SINGLETON
           
static String AGGREGATION_NONE_REQUIRES_NO_OR_UNIQUE_PRIMITIVE_OR_NON_UNIQUE_CLASS_QUALIFIER
           
static String AGGREGATION_NOT_EQUAL_NONE_REQUIRES_PRIMITIVE_TYPE_QUALIFIER_AND_SINGLE_MULTIPLICITY
           
static String ASSOCIATION_END_WITH_COMPLEX_QUALIFIER_MUST_BE_FROZEN
           
static String ASSOCIATIONS_CANNOT_BE_ABSTRACT
           
static String ASSOCIATIONS_CANNOT_BE_TYPES
           
static String ASSOCIATIONS_CONTAINMENT_RULES
           
static String ASSOCIATIONS_HAVE_NO_SUPERTYPES
           
static String ASSOCIATIONS_MUST_BE_BINARY
           
static String ASSOCIATIONS_MUST_BE_PUBLIC
           
static String ASSOCIATIONS_MUST_BE_ROOT_AND_LEAF
           
static String CAN_ONLY_IMPORT_PACKAGES_AND_CLASSES
           
static String CANNOT_BE_DERIVED_AND_CHANGEABLE
           
static String CANNOT_CONSTRAIN_THIS_ELEMENT
           
static String CANNOT_HAVE_MORE_THAN_ONE_QUALIFIER
           
static String CANNOT_HAVE_TWO_AGGREGATE_ENDS
           
static String CANNOT_HAVE_TWO_ORDERED_ENDS
           
static String CANNOT_IMPORT_NESTED_COMPONENTS
           
static String CANNOT_IMPORT_SELF
           
static String CHANGEABLE_REFERENCE_MUST_HAVE_CHANGEABLE_END
           
static String CIRCULAR_TYPE_DEPENCENCY_NOT_ALLOWED
           
static String CLASS_CONTAINMENT_RULES
           
static String CONSTANTS_TYPE_MUST_BE_PRIMITIVE
           
static String CONSTANTS_VALUE_MUST_MATCH_TYPE
           
static String CONSTRAINTS_LIMITED_TO_CONTAINER
           
static String CONTAINER_MUST_MATCH_EXPOSED_TYPE
           
static String CONTENT_NAMES_MUST_NOT_COLLIDE
           
static String CONTENTS_MUST_NOT_COLLIDE_WITH_SUPERTYPES
           
static String DATA_TYPE_CONTAINMENT_RULES
           
static String DATA_TYPES_CANNOT_BE_ABSTRACT
           
static String DATA_TYPES_HAVE_NO_SUPERTYPES
           
static String DIAMOND_RULE_MUST_BE_OBEYED
           
static String END_TYPE_MUST_BE_CLASS
           
static String END1_CLASS_QUALIFIER_REQUIRES_END2_NONE_OR_PRIMITIVE_QUALIFIER
           
static String ENDS_MUST_BE_UNIQUE
           
static String EXCEPTION_CONTAINMENT_RULES
           
static String EXCEPTIONS_HAVE_ONLY_OUT_PARAMETERS
           
static String FROZEN_ATTRIBUTES_CANNOT_BE_CHANGED
           
static String FROZEN_DEPENDENCIES_CANNOT_BE_CHANGED
           
static String FROZEN_ELEMENTS_CANNOT_BE_DELETED
           
static String IMPORTED_NAMESPACE_MUST_BE_VISIBLE
           
static String INVALID_MULTIPLICITY
           
static String LOWER_CANNOT_BE_NEGATIVE_OR_UNBOUNDED
           
static String LOWER_CANNOT_EXCEED_UPPER
           
static String MUST_BE_CONTAINED_UNLESS_PACKAGE
           
static String MUST_BE_UNORDERED_NONUNIQUE
           
static String MUST_HAVE_FIELDS
           
static String NESTED_PACKAGES_CANNOT_IMPORT
           
static String NO_SUBTYPES_ALLOWED_FOR_LEAF
           
static String NO_SUPERTYPES_ALLOWED_FOR_ROOT
           
static String NON_PRIMITIVE_QUALIFIER_MUST_HAVE_MULTIPLICITY_0_TO_N
           
static String ONE_ASSOCIATION_END_MUST_HAVE_AGGREGATION_NONE
           
static String OPERATION_ARGUMENTS_MUST_BE_PARAMETER
           
static String OPERATION_CONTAINMENT_RULES
           
static String OPERATION_EXCEPTION_MUST_BE_EXCEPTION
           
static String OPERATION_EXCEPTIONS_MUST_BE_VISIBLE
           
static String OPERATIONS_HAVE_AT_MOST_ONE_RETURN
           
static String PACKAGE_CONTAINMENT_RULES
           
static String PACKAGES_CANNOT_BE_ABSTRACT
           
static String PARAMETER_TYPE_MUST_BE_STRUCTURE_TYPE
           
static String PRIMITIVE_QUALIFIER_MUST_HAVE_MULTIPLICITY_0_OR_1_TO_1
           
static String PRIMITIVE_TYPE_BINARY_RESTRICTS_MULTIPLICITY
           
static String QUALIFIER_REQUIRES_NAVIGABILITY
           
static String REFERENCE_MULTIPLICITY_MUST_MATCH_END
           
static String REFERENCE_MUST_BE_INSTANCE_SCOPED
           
static String REFERENCE_TYPE_MUST_MATCH_END_TYPE
           
static String REFERENCED_END_MUST_BE_NAVIGABLE
           
static String REFERENCED_END_MUST_BE_VISIBLE
           
static String STEREOTYPE_STREAM_IMPLIES_PRIMITIVE_TYPE
           
static String STRUCTURE_FIELD_CONTAINMENT_RULES
           
static String SUPERTYPE_KIND_MUST_BE_SAME
           
static String SUPERTYPE_MUST_NOT_BE_SELF
           
static String SUPERTYPES_MUST_BE_VISIBLE
           
static String TYPE_MUST_BE_VISIBLE
           
static String UPPER_MUST_BE_POSITIVE
           
 
Constructor Summary
protected ModelConstraints()
           
 
Method Summary
static int fromString(String code)
          Returns the code of the passed code's string representation.
static int max()
          Returns the biggest defined integer constant or Integer.MIN_VALUE if no integer constant is defined.
static int min()
          Returns the smallest defined integer constant or Integer.MAX_VALUE if no integer constant is defined.
static String toString(int code)
          Returns a string representation of the passed code
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MUST_BE_CONTAINED_UNLESS_PACKAGE

public static final String MUST_BE_CONTAINED_UNLESS_PACKAGE
See Also:
Constant Field Values

FROZEN_ATTRIBUTES_CANNOT_BE_CHANGED

public static final String FROZEN_ATTRIBUTES_CANNOT_BE_CHANGED
See Also:
Constant Field Values

FROZEN_ELEMENTS_CANNOT_BE_DELETED

public static final String FROZEN_ELEMENTS_CANNOT_BE_DELETED
See Also:
Constant Field Values

FROZEN_DEPENDENCIES_CANNOT_BE_CHANGED

public static final String FROZEN_DEPENDENCIES_CANNOT_BE_CHANGED
See Also:
Constant Field Values

CONTENT_NAMES_MUST_NOT_COLLIDE

public static final String CONTENT_NAMES_MUST_NOT_COLLIDE
See Also:
Constant Field Values

SUPERTYPE_MUST_NOT_BE_SELF

public static final String SUPERTYPE_MUST_NOT_BE_SELF
See Also:
Constant Field Values

SUPERTYPE_KIND_MUST_BE_SAME

public static final String SUPERTYPE_KIND_MUST_BE_SAME
See Also:
Constant Field Values

CONTENTS_MUST_NOT_COLLIDE_WITH_SUPERTYPES

public static final String CONTENTS_MUST_NOT_COLLIDE_WITH_SUPERTYPES
See Also:
Constant Field Values

DIAMOND_RULE_MUST_BE_OBEYED

public static final String DIAMOND_RULE_MUST_BE_OBEYED
See Also:
Constant Field Values

NO_SUPERTYPES_ALLOWED_FOR_ROOT

public static final String NO_SUPERTYPES_ALLOWED_FOR_ROOT
See Also:
Constant Field Values

SUPERTYPES_MUST_BE_VISIBLE

public static final String SUPERTYPES_MUST_BE_VISIBLE
See Also:
Constant Field Values

NO_SUBTYPES_ALLOWED_FOR_LEAF

public static final String NO_SUBTYPES_ALLOWED_FOR_LEAF
See Also:
Constant Field Values

ASSOCIATIONS_CANNOT_BE_TYPES

public static final String ASSOCIATIONS_CANNOT_BE_TYPES
See Also:
Constant Field Values

TYPE_MUST_BE_VISIBLE

public static final String TYPE_MUST_BE_VISIBLE
See Also:
Constant Field Values

CLASS_CONTAINMENT_RULES

public static final String CLASS_CONTAINMENT_RULES
See Also:
Constant Field Values

ABSTRACT_CLASSES_CANNOT_BE_SINGLETON

public static final String ABSTRACT_CLASSES_CANNOT_BE_SINGLETON
See Also:
Constant Field Values

DATA_TYPE_CONTAINMENT_RULES

public static final String DATA_TYPE_CONTAINMENT_RULES
See Also:
Constant Field Values

DATA_TYPES_HAVE_NO_SUPERTYPES

public static final String DATA_TYPES_HAVE_NO_SUPERTYPES
See Also:
Constant Field Values

DATA_TYPES_CANNOT_BE_ABSTRACT

public static final String DATA_TYPES_CANNOT_BE_ABSTRACT
See Also:
Constant Field Values

REFERENCE_MULTIPLICITY_MUST_MATCH_END

public static final String REFERENCE_MULTIPLICITY_MUST_MATCH_END
See Also:
Constant Field Values

REFERENCE_MUST_BE_INSTANCE_SCOPED

public static final String REFERENCE_MUST_BE_INSTANCE_SCOPED
See Also:
Constant Field Values

CHANGEABLE_REFERENCE_MUST_HAVE_CHANGEABLE_END

public static final String CHANGEABLE_REFERENCE_MUST_HAVE_CHANGEABLE_END
See Also:
Constant Field Values

REFERENCE_TYPE_MUST_MATCH_END_TYPE

public static final String REFERENCE_TYPE_MUST_MATCH_END_TYPE
See Also:
Constant Field Values

REFERENCED_END_MUST_BE_NAVIGABLE

public static final String REFERENCED_END_MUST_BE_NAVIGABLE
See Also:
Constant Field Values

CONTAINER_MUST_MATCH_EXPOSED_TYPE

public static final String CONTAINER_MUST_MATCH_EXPOSED_TYPE
See Also:
Constant Field Values

REFERENCED_END_MUST_BE_VISIBLE

public static final String REFERENCED_END_MUST_BE_VISIBLE
See Also:
Constant Field Values

OPERATION_CONTAINMENT_RULES

public static final String OPERATION_CONTAINMENT_RULES
See Also:
Constant Field Values

OPERATIONS_HAVE_AT_MOST_ONE_RETURN

public static final String OPERATIONS_HAVE_AT_MOST_ONE_RETURN
See Also:
Constant Field Values

OPERATION_EXCEPTIONS_MUST_BE_VISIBLE

public static final String OPERATION_EXCEPTIONS_MUST_BE_VISIBLE
See Also:
Constant Field Values

EXCEPTION_CONTAINMENT_RULES

public static final String EXCEPTION_CONTAINMENT_RULES
See Also:
Constant Field Values

EXCEPTIONS_HAVE_ONLY_OUT_PARAMETERS

public static final String EXCEPTIONS_HAVE_ONLY_OUT_PARAMETERS
See Also:
Constant Field Values

ASSOCIATIONS_CONTAINMENT_RULES

public static final String ASSOCIATIONS_CONTAINMENT_RULES
See Also:
Constant Field Values

ASSOCIATIONS_HAVE_NO_SUPERTYPES

public static final String ASSOCIATIONS_HAVE_NO_SUPERTYPES
See Also:
Constant Field Values

ASSOCIATIONS_MUST_BE_ROOT_AND_LEAF

public static final String ASSOCIATIONS_MUST_BE_ROOT_AND_LEAF
See Also:
Constant Field Values

ASSOCIATIONS_CANNOT_BE_ABSTRACT

public static final String ASSOCIATIONS_CANNOT_BE_ABSTRACT
See Also:
Constant Field Values

ASSOCIATIONS_MUST_BE_PUBLIC

public static final String ASSOCIATIONS_MUST_BE_PUBLIC
See Also:
Constant Field Values

ASSOCIATIONS_MUST_BE_BINARY

public static final String ASSOCIATIONS_MUST_BE_BINARY
See Also:
Constant Field Values

END_TYPE_MUST_BE_CLASS

public static final String END_TYPE_MUST_BE_CLASS
See Also:
Constant Field Values

ENDS_MUST_BE_UNIQUE

public static final String ENDS_MUST_BE_UNIQUE
See Also:
Constant Field Values

CANNOT_HAVE_TWO_ORDERED_ENDS

public static final String CANNOT_HAVE_TWO_ORDERED_ENDS
See Also:
Constant Field Values

CANNOT_HAVE_TWO_AGGREGATE_ENDS

public static final String CANNOT_HAVE_TWO_AGGREGATE_ENDS
See Also:
Constant Field Values

PACKAGE_CONTAINMENT_RULES

public static final String PACKAGE_CONTAINMENT_RULES
See Also:
Constant Field Values

PACKAGES_CANNOT_BE_ABSTRACT

public static final String PACKAGES_CANNOT_BE_ABSTRACT
See Also:
Constant Field Values

IMPORTED_NAMESPACE_MUST_BE_VISIBLE

public static final String IMPORTED_NAMESPACE_MUST_BE_VISIBLE
See Also:
Constant Field Values

CAN_ONLY_IMPORT_PACKAGES_AND_CLASSES

public static final String CAN_ONLY_IMPORT_PACKAGES_AND_CLASSES
See Also:
Constant Field Values

CANNOT_IMPORT_SELF

public static final String CANNOT_IMPORT_SELF
See Also:
Constant Field Values

CANNOT_IMPORT_NESTED_COMPONENTS

public static final String CANNOT_IMPORT_NESTED_COMPONENTS
See Also:
Constant Field Values

NESTED_PACKAGES_CANNOT_IMPORT

public static final String NESTED_PACKAGES_CANNOT_IMPORT
See Also:
Constant Field Values

CANNOT_CONSTRAIN_THIS_ELEMENT

public static final String CANNOT_CONSTRAIN_THIS_ELEMENT
See Also:
Constant Field Values

CONSTRAINTS_LIMITED_TO_CONTAINER

public static final String CONSTRAINTS_LIMITED_TO_CONTAINER
See Also:
Constant Field Values

CONSTANTS_VALUE_MUST_MATCH_TYPE

public static final String CONSTANTS_VALUE_MUST_MATCH_TYPE
See Also:
Constant Field Values

CONSTANTS_TYPE_MUST_BE_PRIMITIVE

public static final String CONSTANTS_TYPE_MUST_BE_PRIMITIVE
See Also:
Constant Field Values

LOWER_CANNOT_BE_NEGATIVE_OR_UNBOUNDED

public static final String LOWER_CANNOT_BE_NEGATIVE_OR_UNBOUNDED
See Also:
Constant Field Values

LOWER_CANNOT_EXCEED_UPPER

public static final String LOWER_CANNOT_EXCEED_UPPER
See Also:
Constant Field Values

UPPER_MUST_BE_POSITIVE

public static final String UPPER_MUST_BE_POSITIVE
See Also:
Constant Field Values

MUST_BE_UNORDERED_NONUNIQUE

public static final String MUST_BE_UNORDERED_NONUNIQUE
See Also:
Constant Field Values

STRUCTURE_FIELD_CONTAINMENT_RULES

public static final String STRUCTURE_FIELD_CONTAINMENT_RULES
See Also:
Constant Field Values

MUST_HAVE_FIELDS

public static final String MUST_HAVE_FIELDS
See Also:
Constant Field Values

CANNOT_HAVE_MORE_THAN_ONE_QUALIFIER

public static final String CANNOT_HAVE_MORE_THAN_ONE_QUALIFIER
See Also:
Constant Field Values

NON_PRIMITIVE_QUALIFIER_MUST_HAVE_MULTIPLICITY_0_TO_N

public static final String NON_PRIMITIVE_QUALIFIER_MUST_HAVE_MULTIPLICITY_0_TO_N
See Also:
Constant Field Values

PRIMITIVE_QUALIFIER_MUST_HAVE_MULTIPLICITY_0_OR_1_TO_1

public static final String PRIMITIVE_QUALIFIER_MUST_HAVE_MULTIPLICITY_0_OR_1_TO_1
See Also:
Constant Field Values

OPERATION_ARGUMENTS_MUST_BE_PARAMETER

public static final String OPERATION_ARGUMENTS_MUST_BE_PARAMETER
See Also:
Constant Field Values

PARAMETER_TYPE_MUST_BE_STRUCTURE_TYPE

public static final String PARAMETER_TYPE_MUST_BE_STRUCTURE_TYPE
See Also:
Constant Field Values

STEREOTYPE_STREAM_IMPLIES_PRIMITIVE_TYPE

public static final String STEREOTYPE_STREAM_IMPLIES_PRIMITIVE_TYPE
See Also:
Constant Field Values

PRIMITIVE_TYPE_BINARY_RESTRICTS_MULTIPLICITY

public static final String PRIMITIVE_TYPE_BINARY_RESTRICTS_MULTIPLICITY
See Also:
Constant Field Values

CANNOT_BE_DERIVED_AND_CHANGEABLE

public static final String CANNOT_BE_DERIVED_AND_CHANGEABLE
See Also:
Constant Field Values

INVALID_MULTIPLICITY

public static final String INVALID_MULTIPLICITY
See Also:
Constant Field Values

ASSOCIATION_END_WITH_COMPLEX_QUALIFIER_MUST_BE_FROZEN

public static final String ASSOCIATION_END_WITH_COMPLEX_QUALIFIER_MUST_BE_FROZEN
See Also:
Constant Field Values

ONE_ASSOCIATION_END_MUST_HAVE_AGGREGATION_NONE

public static final String ONE_ASSOCIATION_END_MUST_HAVE_AGGREGATION_NONE
See Also:
Constant Field Values

AGGREGATION_NOT_EQUAL_NONE_REQUIRES_PRIMITIVE_TYPE_QUALIFIER_AND_SINGLE_MULTIPLICITY

public static final String AGGREGATION_NOT_EQUAL_NONE_REQUIRES_PRIMITIVE_TYPE_QUALIFIER_AND_SINGLE_MULTIPLICITY
See Also:
Constant Field Values

AGGREGATION_NONE_REQUIRES_NO_OR_UNIQUE_PRIMITIVE_OR_NON_UNIQUE_CLASS_QUALIFIER

public static final String AGGREGATION_NONE_REQUIRES_NO_OR_UNIQUE_PRIMITIVE_OR_NON_UNIQUE_CLASS_QUALIFIER
See Also:
Constant Field Values

QUALIFIER_REQUIRES_NAVIGABILITY

public static final String QUALIFIER_REQUIRES_NAVIGABILITY
See Also:
Constant Field Values

END1_CLASS_QUALIFIER_REQUIRES_END2_NONE_OR_PRIMITIVE_QUALIFIER

public static final String END1_CLASS_QUALIFIER_REQUIRES_END2_NONE_OR_PRIMITIVE_QUALIFIER
See Also:
Constant Field Values

OPERATION_EXCEPTION_MUST_BE_EXCEPTION

public static final String OPERATION_EXCEPTION_MUST_BE_EXCEPTION
See Also:
Constant Field Values

CIRCULAR_TYPE_DEPENCENCY_NOT_ALLOWED

public static final String CIRCULAR_TYPE_DEPENCENCY_NOT_ALLOWED
See Also:
Constant Field Values
Constructor Detail

ModelConstraints

protected ModelConstraints()
Method Detail

min

public static int min()
Returns the smallest defined integer constant or Integer.MAX_VALUE if no integer constant is defined.

Returns:
an int

max

public static int max()
Returns the biggest defined integer constant or Integer.MIN_VALUE if no integer constant is defined.

Returns:
an int

toString

public static String toString(int code)
Returns a string representation of the passed code

Parameters:
code - a code to be stringified
Returns:
a stringified code

fromString

public static int fromString(String code)
Returns the code of the passed code's string representation. The string representation is case insensitive.

Parameters:
code - a stringified code
Returns:
a code
Throws:
throws - an IllegalArgumentException if the stringified code cannot be resolved


This software is published under the BSD license. Copyright © 2003-2007, OMEX AG, Switzerland, All rights reserved. Use is subject to license terms.