= Looking up Model information (meta-data) at run-time = !InfoGrid makes all [wiki:Model] information (i.e. all meta-data) available at run-time for [wiki:MeshObject MeshObjects]. == Related to !EntityType == Given a MeshObject: {{{ MeshObject obj = ...; }}} To determine the [wiki:EntityType EntityTypes] with which it is blessed: {{{ EntityType [] types = obj.getTypes(); }}} To determine whether the MeshObject is blessed with a particular EntityType: {{{ EntityType toCheck = ...; if( obj.isBlessedBy( toCheck )) { ... } }}} == Related to !PropertyType == To determine all [wiki:PropertyType PropertyTypes] currently available: {{{ PropertyType [] propertyTypes = obj.getAllPropertyTypes(); }}} To determine the values of all [wiki:Property Properties]: {{{ PropertyType [] propertyTypes = obj.getAllPropertyTypes(); PropertyValue [] propertyValues = obj.getPropertyValues( propertyTypes ); }}} They [wiki:PropertyValue PropertyValues] will be returned in the same sequence as the [wiki:PropertyType PropertyTypes]. == Related to !RoleType == To determine the all [wiki:RoleType RoleTypes] that the MeshObject currently plays: {{{ RoleType [] allRoleTypes = obj.getAllRoleTypes(); }}} To also determine with which neighbor MeshObject the MeshObject currently plays which RoleType: {{{ Role [] allRoles = obj.getRoles(); }}} `Role` brings together both the RoleType and the neighbor MeshObject. To determine the [wiki:RoleType RoleTypes] that the MeshObject currently plays with a given neighbor MeshObject: {{{ MeshObject neighbor = ...; RoleType [] withNeighbor = obj.getRoleTypes( neighbor ); }}} == Traversing the Model further == The [wiki:MeshType MeshTypes] constituting the [wiki:Model] can be fully explored through methods exposed on the various [wiki:MeshType MeshTypes]. For example, given an EntityType, determine which [wiki:RelationshipType RelationshipTypes] require this EntityType as source or destination: {{{ EntityType type = ...; RoleType [] playsRoleTypes = type.getAllRoleTypes(); }}}