ROIS
openSub
A ROIS model may itself contain references to other (sub) models. In the OpenGALEN project, a reference model is used to contain references to the medical ontology, language models, classifications, and dissections. Read the OpenGALEN site for more information.
// opens the sub model with name $sub
// in the reference model with identifier @reference
// returns model identifier for sub model
CLIENT TASK openSub @reference $sub :@sub;
BEGIN
OPEN $sub IN @reference AS @sub;
END openSub;
// closes the sub model @sub
CLIENT TASK closeSub @reference @sub;
BEGIN
CLOSE @sub IN @reference;
END closeSub;
// deletes the sub model @sub from the reference model @reference
CLIENT TASK deleteSub @reference $sub;
DEFINE @sub;
BEGIN
IF EXISTS MODEL $sub @sub IN @reference THEN
UPDATE @reference DELETE MODEL @sub;
ENDIF;
END deleteSub;