gov.nasa.arc.brahms.vm.api.common
Interface IModel


public interface IModel

IModel is the interface to a model loaded in the virtual machine. The model manages references to the concepts loaded in the virtual machine, groups, agents, classes, objects, conceptual classes, conceptual objects, area definitions and areas.

Version:
$Revision: 1.1 $ $Date: 2009/11/23 18:38:31 $ $Author: rnado $
Author:
Ron van Hoof

Field Summary
static int MEMORY
          Memory only loading strategy, load a concept from memory only, don't look for it in the local file system or in the directory service
static int MEMORY_DIRECTORY
          Memory and directory service loading strategy, try to locate the concept in the local memory first, if not found try to locate and load it from the directory service, don't look for it in the local file system
static int MEMORY_DIRECTORY_DISK
          Memory then directory service then disk loading strategy, try to locate the concept in the local memory first, if not found try to locate and load it from the directory service, if still not found try to locate and load it from the local file system
static int MEMORY_DISK
          Memory and disk loading strategy, try to locate the concept in the local memory first, if not found try to locate and load it from the local file system, don't look for it in the directory service as a remote concept
static int MEMORY_DISK_DIRECTORY
          Memory then disk then directory service loading strategy, try to locate the concept in the local memory first, if not found try to locate and load it from the local file system, if still not found try to locate and load it from the directory service
 
Method Summary
 IAgent getAgent(java.lang.String name)
          Returns the agent with the specified name.
 IAgent getAgent(java.lang.String name, int strategy)
          Returns the agent with the specified name.
 java.util.Enumeration getAgents()
          Returns a list of all the agents loaded in the model.
 IArea getArea(java.lang.String name)
          Returns the area with the specified name.
 IArea getArea(java.lang.String name, int strategy)
          Returns the area with the specified name.
 IAreaDef getAreaDef(java.lang.String name)
          Returns the area definition with the specified name.
 java.util.Enumeration getAreaDefs()
          Returns a list of all the area definitions loaded in the model.
 java.util.Enumeration getAreas()
          Returns a list of all the areas loaded in the model.
 IClass getClass(java.lang.String name)
          Returns the class with the specified name.
 java.util.Enumeration getClasses()
          Returns a list of all the classes loaded in the model.
 IConceptualClass getConceptualClass(java.lang.String name)
          Returns the conceptual class with the specified name.
 java.util.Enumeration getConceptualClasses()
          Returns a list of all the conceptual classes loaded in the model.
 IConceptualObject getConceptualObject(java.lang.String name)
          Returns the conceptual object with the specified name.
 IConceptualObject getConceptualObject(java.lang.String name, int strategy)
          Returns the conceptual object with the specified name.
 java.util.Enumeration getConceptualObjects()
          Returns a list of all the conceptual objects loaded in the model.
 IGroup getGroup(java.lang.String name)
          Returns the group with the specified name.
 java.util.Enumeration getGroups()
          Returns a list of all the groups loaded in the model.
 IObject getObject(java.lang.String name)
          Returns the object with the specified name.
 IObject getObject(java.lang.String name, int strategy)
          Returns the object with the specified name.
 java.util.Enumeration getObjects()
          Returns a list of all the objects loaded in the model.
 IPath getPath(java.lang.String name)
          Returns the path with the specified name.
 IPath getPath(java.lang.String name, int strategy)
          Returns the path with the specified name.
 java.util.Enumeration getPaths()
          Returns a list of all the paths loaded in the model.
 

Field Detail

MEMORY

static final int MEMORY
Memory only loading strategy, load a concept from memory only, don't look for it in the local file system or in the directory service

See Also:
Constant Field Values

MEMORY_DISK

static final int MEMORY_DISK
Memory and disk loading strategy, try to locate the concept in the local memory first, if not found try to locate and load it from the local file system, don't look for it in the directory service as a remote concept

See Also:
Constant Field Values

MEMORY_DIRECTORY

static final int MEMORY_DIRECTORY
Memory and directory service loading strategy, try to locate the concept in the local memory first, if not found try to locate and load it from the directory service, don't look for it in the local file system

See Also:
Constant Field Values

MEMORY_DIRECTORY_DISK

static final int MEMORY_DIRECTORY_DISK
Memory then directory service then disk loading strategy, try to locate the concept in the local memory first, if not found try to locate and load it from the directory service, if still not found try to locate and load it from the local file system

See Also:
Constant Field Values

MEMORY_DISK_DIRECTORY

static final int MEMORY_DISK_DIRECTORY
Memory then disk then directory service loading strategy, try to locate the concept in the local memory first, if not found try to locate and load it from the local file system, if still not found try to locate and load it from the directory service

See Also:
Constant Field Values
Method Detail

getGroup

IGroup getGroup(java.lang.String name)
                throws ExternalException
Returns the group with the specified name. The name has to be the fully qualified name of the group. A fully qualified name consists of the package name and the group name. For example: gov.nasa.arc.brahms.MyGroup. The package name in this example is 'gov.nasa.arc.brahms', the group name is 'MyGroup', both have to be concatenated using a '.'.

Parameters:
name - the fully qualified name of the group.
Returns:
IGroup the group with the specified fully qualified name
Throws:
ExternalException - if no group with the specified name is loaded in the virtual machine.

getGroups

java.util.Enumeration getGroups()
                                throws ExternalException
Returns a list of all the groups loaded in the model.

Returns:
Enumeration of IGroup
Throws:
ExternalException - if an error occurs retrieving the groups.

getAgent

IAgent getAgent(java.lang.String name)
                throws ExternalException
Returns the agent with the specified name. The name has to be the fully qualified name of the agent. A fully qualified name consists of the package name and the agent name. For example: gov.nasa.arc.brahms.MyAgent. The package name in this example is 'gov.nasa.arc.brahms', the agent name is 'MyAgent', both have to be concatenated using a '.'.

Parameters:
name - the fully qualified name of the agent.
Returns:
IAgent the agent with the specified fully qualified name
Throws:
ExternalException - if no agent with the specified name is loaded in the virtual machine.

getAgent

IAgent getAgent(java.lang.String name,
                int strategy)
                throws ExternalException
Returns the agent with the specified name. The name has to be the fully qualified name of the agent. A fully qualified name consists of the package name and the agent name. For example: gov.nasa.arc.brahms.MyAgent. The package name in this example is 'gov.nasa.arc.brahms', the agent name is 'MyAgent', both have to be concatenated using a '.'.

The locating and loading strategy gives control over how to locate and load an agent if it cannot be found. Only when the loading strategy is exhausted will an exception be generated to indicate that an agent with the specified name could not be found.

Parameters:
name - the fully qualified name of the agent.
strategy - the locating and loading strategy to use
Returns:
IAgent the agent with the specified fully qualified name
Throws:
ExternalException - if no agent with the specified name could be found
See Also:
MEMORY, MEMORY_DISK, MEMORY_DIRECTORY, MEMORY_DIRECTORY_DISK, MEMORY_DISK_DIRECTORY

getAgents

java.util.Enumeration getAgents()
                                throws ExternalException
Returns a list of all the agents loaded in the model.

Returns:
Enumeration of IAgent
Throws:
ExternalException - if an error occurs retrieving the agents.

getClass

IClass getClass(java.lang.String name)
                throws ExternalException
Returns the class with the specified name. The name has to be the fully qualified name of the class. A fully qualified name consists of the package name and the class name. For example: gov.nasa.arc.brahms.MyClass. The package name in this example is 'gov.nasa.arc.brahms', the class name is 'MyClass', both have to be concatenated using a '.'.

Parameters:
name - the fully qualified name of the class.
Returns:
IClass the class with the specified fully qualified name
Throws:
ExternalException - if no class with the specified name is loaded in the virtual machine.

getClasses

java.util.Enumeration getClasses()
                                 throws ExternalException
Returns a list of all the classes loaded in the model.

Returns:
Enumeration of IClass
Throws:
ExternalException - if an error occurs retrieving the classes.

getObject

IObject getObject(java.lang.String name)
                  throws ExternalException
Returns the object with the specified name. The name has to be the fully qualified name of the object. A fully qualified name consists of the package name and the object name. For example: gov.nasa.arc.brahms.MyObject. The package name in this example is 'gov.nasa.arc.brahms', the object name is 'MyObject', both have to be concatenated using a '.'.

Parameters:
name - the fully qualified name of the object.
Returns:
IObject the object with the specified fully qualified name
Throws:
ExternalException - if no object with the specified name is loaded in the virtual machine.

getObject

IObject getObject(java.lang.String name,
                  int strategy)
                  throws ExternalException
Returns the object with the specified name. The name has to be the fully qualified name of the object. A fully qualified name consists of the package name and the object name. For example: gov.nasa.arc.brahms.MyObject. The package name in this example is 'gov.nasa.arc.brahms', the object name is 'MyObject', both have to be concatenated using a '.'.

The locating and loading strategy gives control over how to locate and load an object if it cannot be found. Only when the loading strategy is exhausted will an exception be generated to indicate that an object with the specified name could not be found.

Parameters:
name - the fully qualified name of the object.
strategy - the locating and loading strategy to use
Returns:
IObject the object with the specified fully qualified name
Throws:
ExternalException - if no object with the specified name could be found
See Also:
MEMORY, MEMORY_DISK, MEMORY_DIRECTORY, MEMORY_DIRECTORY_DISK, MEMORY_DISK_DIRECTORY

getObjects

java.util.Enumeration getObjects()
                                 throws ExternalException
Returns a list of all the objects loaded in the model.

Returns:
Enumeration of IObject
Throws:
ExternalException - if an error occurs retrieving the objects.

getConceptualClass

IConceptualClass getConceptualClass(java.lang.String name)
                                    throws ExternalException
Returns the conceptual class with the specified name. The name has to be the fully qualified name of the conceptual class. A fully qualified name consists of the package name and the conceptual class name. For example: gov.nasa.arc.brahms.MyConceptualClass. The package name in this example is 'gov.nasa.arc.brahms', the conceptual class name is 'MyConceptualClass', both have to be concatenated using a '.'.

Parameters:
name - the fully qualified name of the conceptual class.
Returns:
IConceptualClass the conceptual class with the specified fully qualified name
Throws:
ExternalException - if no conceptual class with the specified name is loaded in the virtual machine.

getConceptualClasses

java.util.Enumeration getConceptualClasses()
                                           throws ExternalException
Returns a list of all the conceptual classes loaded in the model.

Returns:
Enumeration of IConceptualClass
Throws:
ExternalException - if an error occurs retrieving the conceptual classes.

getConceptualObject

IConceptualObject getConceptualObject(java.lang.String name)
                                      throws ExternalException
Returns the conceptual object with the specified name. The name has to be the fully qualified name of the conceptual object. A fully qualified name consists of the package name and the conceptual object name. For example: gov.nasa.arc.brahms.MyConceptualObject. The package name in this example is 'gov.nasa.arc.brahms', the conceptual object name is 'MyConceptualObject', both have to be concatenated using a '.'.

Parameters:
name - the fully qualified name of the conceptual object.
Returns:
IConceptualObject the conceptual object with the specified fully qualified name
Throws:
ExternalException - if no conceptual object with the specified name is loaded in the virtual machine.

getConceptualObject

IConceptualObject getConceptualObject(java.lang.String name,
                                      int strategy)
                                      throws ExternalException
Returns the conceptual object with the specified name. The name has to be the fully qualified name of the conceptual object. A fully qualified name consists of the package name and the conceptual object name. For example: gov.nasa.arc.brahms.MyConceptualObject. The package name in this example is 'gov.nasa.arc.brahms', the object name is 'MyConceptualObject', both have to be concatenated using a '.'.

The locating and loading strategy gives control over how to locate and load an conceptual object if it cannot be found. Only when the loading strategy is exhausted will an exception be generated to indicate that a conceptual object with the specified name could not be found.

Parameters:
name - the fully qualified name of the conceptual object.
strategy - the locating and loading strategy to use
Returns:
IConceptualObject the conceptual object with the specified fully qualified name
Throws:
ExternalException - if no conceptual object with the specified name could be found
See Also:
MEMORY, MEMORY_DISK, MEMORY_DIRECTORY, MEMORY_DIRECTORY_DISK, MEMORY_DISK_DIRECTORY

getConceptualObjects

java.util.Enumeration getConceptualObjects()
                                           throws ExternalException
Returns a list of all the conceptual objects loaded in the model.

Returns:
Enumeration of IConceptualObject
Throws:
ExternalException - if an error occurs retrieving the conceptual objects.

getAreaDef

IAreaDef getAreaDef(java.lang.String name)
                    throws ExternalException
Returns the area definition with the specified name. The name has to be the fully qualified name of the area definition. A fully qualified name consists of the package name and the area definition name. For example: gov.nasa.arc.brahms.MyAreaDef. The package name in this example is 'gov.nasa.arc.brahms', the area definition name is 'MyAreaDef', both have to be concatenated using a '.'.

Parameters:
name - the fully qualified name of the area definition.
Returns:
IAreaDef the area definition with the specified fully qualified name
Throws:
ExternalException - if no area definition with the specified name is loaded in the virtual machine.

getAreaDefs

java.util.Enumeration getAreaDefs()
                                  throws ExternalException
Returns a list of all the area definitions loaded in the model.

Returns:
Enumeration of IAreaDef
Throws:
ExternalException - if an error occurs retrieving the area definitions.

getArea

IArea getArea(java.lang.String name)
              throws ExternalException
Returns the area with the specified name. The name has to be the fully qualified name of the area. A fully qualified name consists of the package name and the area name. For example: gov.nasa.arc.brahms.MyArea. The package name in this example is 'gov.nasa.arc.brahms', the area name is 'MyArea', both have to be concatenated using a '.'.

Parameters:
name - the fully qualified name of the area.
Returns:
IArea the area with the specified fully qualified name
Throws:
ExternalException - if no area with the specified name is loaded in the virtual machine.

getArea

IArea getArea(java.lang.String name,
              int strategy)
              throws ExternalException
Returns the area with the specified name. The name has to be the fully qualified name of the area. A fully qualified name consists of the package name and the area name. For example: gov.nasa.arc.brahms.MyArea. The package name in this example is 'gov.nasa.arc.brahms', the area name is 'MyArea', both have to be concatenated using a '.'.

The locating and loading strategy gives control over how to locate and load an area if it cannot be found. Only when the loading strategy is exhausted will an exception be generated to indicate that an area with the specified name could not be found.

Parameters:
name - the fully qualified name of the area.
strategy - the locating and loading strategy to use
Returns:
IArea the area with the specified fully qualified name
Throws:
ExternalException - if no area with the specified name could be found
See Also:
MEMORY, MEMORY_DISK, MEMORY_DIRECTORY, MEMORY_DIRECTORY_DISK, MEMORY_DISK_DIRECTORY

getAreas

java.util.Enumeration getAreas()
                               throws ExternalException
Returns a list of all the areas loaded in the model.

Returns:
Enumeration of IArea
Throws:
ExternalException - if an error occurs retrieving the areas.

getPath

IPath getPath(java.lang.String name)
              throws ExternalException
Returns the path with the specified name. The name has to be the fully qualified name of the path. A fully qualified name consists of the package name and the path name. For example: gov.nasa.arc.brahms.MyPath. The package name in this example is 'gov.nasa.arc.brahms', the path name is 'MyPath', both have to be concatenated using a '.'.

Parameters:
name - the fully qualified name of the path.
Returns:
IPath the path with the specified fully qualified name
Throws:
ExternalException - if no path with the specified name is loaded in the virtual machine.

getPath

IPath getPath(java.lang.String name,
              int strategy)
              throws ExternalException
Returns the path with the specified name. The name has to be the fully qualified name of the path. A fully qualified name consists of the package name and the path name. For example: gov.nasa.arc.brahms.MyPath. The package name in this example is 'gov.nasa.arc.brahms', the path name is 'MyPath', both have to be concatenated using a '.'.

The locating and loading strategy gives control over how to locate and load a path if it cannot be found. Only when the loading strategy is exhausted will an exception be generated to indicate that a path with the specified name could not be found.

Parameters:
name - the fully qualified name of the path.
strategy - the locating and loading strategy to use
Returns:
IPath the path with the specified fully qualified name
Throws:
ExternalException - if no path with the specified name could be found
See Also:
MEMORY, MEMORY_DISK, MEMORY_DIRECTORY, MEMORY_DIRECTORY_DISK, MEMORY_DISK_DIRECTORY

getPaths

java.util.Enumeration getPaths()
                               throws ExternalException
Returns a list of all the paths loaded in the model.

Returns:
Enumeration of IPath
Throws:
ExternalException - if an error occurs retrieving the paths.


Copyright © 1997-2012 All Rights Reserved.