Class ModelDirectory

  • All Implemented Interfaces:
    java.lang.Cloneable, Changeable, Debuggable, DebugListener, Derivable, Instantiable, ModelErrorHandler, MoMLExportable, Moveable, Nameable

    public class ModelDirectory
    extends CompositeEntity
    A directory of open models. An instance of this class is contained by a Configuration. Each open model is represented by an instance of Effigy. An effigy represents the model data. It contains a string attribute named "identifier" with a string value that uniquely identifies the model. A typical choice (which depend on the configuration) is the canonical URL for a MoML file that describes the model. An effigy also contains all open instances of Tableau associated with the model.
    Ptolemy II 1.0
    Steve Neuendorffer and Edward A. Lee
    See Also:
    Configuration, Effigy, Tableau
    Red (cxh)
    Yellow (eal)
    • Constructor Detail

    • Method Detail

      • getEffigy

        public Effigy getEffigy​(java.lang.String identifier)
        Get the effigy of the model that corresponds to the specified identifier.
        identifier - The identifier for the model, such as a URL.
        The effigy for the model, or null if the model is not in the directory.
      • _removeEntity

        protected void _removeEntity​(ComponentEntity entity)
        Remove the specified entity, and if there are no more models in the directory, except possibly the configuration, then remove this directory from its container. This method should not be used directly. Call the setContainer() method of the entity instead with a null argument. The entity is assumed to be contained by this composite (otherwise, nothing happens). This does not alter the entity in any way. This method is not synchronized on the workspace, so the caller should be. This class overrides the superclass to check if this composite is empty, and if so, calls system.exit
        _removeEntity in class CompositeEntity
        entity - The entity to remove.