ides.api.plugin.model
Interface ParentModel

All Superinterfaces:
Annotable, DESModel, DESModelPublisher

public interface ParentModel
extends DESModel

Interface for DESModels which, in turn, contain other DESModels as child models. An example would be a hierarchical system.

Author:
Lenko Grigorov

Method Summary
 DESModel getChildModel(java.lang.String id)
          Returns the child model identified by the given ID string.
 java.lang.String getChildModelId(DESModel child)
          Returns the ID of a child model which can be used to obtain the child model.
 
Methods inherited from interface ides.api.plugin.model.DESModel
getEventSet, getModelType, getName, getParentModel, metadataChanged, modelSaved, needsSave, setName, setParentModel
 
Methods inherited from interface ides.api.core.Annotable
getAnnotation, hasAnnotation, removeAnnotation, setAnnotation
 
Methods inherited from interface ides.api.plugin.model.DESModelPublisher
addSubscriber, getDESModelSubscribers, removeSubscriber
 

Method Detail

getChildModelId

java.lang.String getChildModelId(DESModel child)
                                 throws java.lang.IllegalArgumentException
Returns the ID of a child model which can be used to obtain the child model.

Parameters:
child - a child model of the parent model
Returns:
the ID of the child model
Throws:
java.lang.IllegalArgumentException - when the model in the argument is not a child of this model
See Also:
getChildModel(String)

getChildModel

DESModel getChildModel(java.lang.String id)
Returns the child model identified by the given ID string.

Parameters:
id - the ID of the child model
Returns:
the child model identified by the given ID string; or null if this parent model does not contain a child model with the given ID