Role Query
fmp.system.RoleQuery is a utility class used to determine the roles of a given Node. This is necessary because the same metamodel class is used to represent elements in conceptually different places. The following functions return constants defined in the RoleQuery class.
- public int getLocationType(Node node) returns:
CONFIGURATION,
CONFIGURATION_PROPERTIES,
MODEL,
MODEL_PROPERTIES,
METAMODEL,
METAMODEL_PROPERTIES,
METAMETAMODEL.
- public int getNodeType(Node node) returns:
UNDEFINED,
ROOT_FEATURE,
SOLITARY_FEATURE,
GROUPED_FEATURE,
SOLITARY_REFERENCE,
GROUPED_REFERENCE,
FEATURE_GROUP,
FEATURE_MODEL.
- public int getPropertyRole(Node node) returns:
NONE,
NAME,
ID,
MIN_OCCUR,
MAX_OCCUR,
DESCRIPTION,
ATTRIBUTE,
TYPE_GROUP,
TYPE,
VALUE,
DEFAULT_VALUE,
REFERENCED_FEATURE.