be.ac.vub.cocompose
Class CoCompose

java.lang.Object
  extended bybe.ac.vub.cocompose.CoCompose

public class CoCompose
extends Object

Main CoCompose class for stand-alone use and settings registry.

Since:
0.2.8
Version:
0.2.10, 06/05/2004
Author:
Dennis Wagelaar

Method Summary
 void addSharedModel(Model model)
          Adds a model to the set of shared models and increases the usage count.
static CoCompose getDefault()
          Gets the singleton CoCompose instance.
 ModelFactory getFactory()
          Gets the model element factory
 Log getLog()
          Returns the standard logger.
 String getSetting(String name)
          Gets a global CoCompose setting
 Properties getSettings()
          Gets the global CoCompose settings.
 Model getSharedModel(String uri)
          Retrieves a shared model, given its URI.
 Collection getSharedModels()
          Retrieves all shared models.
static void main(String[] args)
          Runs a stand-alone CoCompose.
 void removeSharedModel(Model model)
          Removes a model from the set of shared models or decreases the usage count if greater than 0.
 void setSettings(Properties properties)
          Sets the global CoCompose settings.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

main

public static void main(String[] args)
Runs a stand-alone CoCompose.

Parameters:
args - command-line arguments

getDefault

public static CoCompose getDefault()
Gets the singleton CoCompose instance.

Returns:
the singleton CoCompose instance.

getLog

public Log getLog()
Returns the standard logger.

Returns:
the standard logger.

getFactory

public ModelFactory getFactory()
Gets the model element factory

Returns:
the factory

getSetting

public String getSetting(String name)
Gets a global CoCompose setting

Parameters:
name - the setting name
Returns:
the setting value

getSettings

public Properties getSettings()
Gets the global CoCompose settings.

Returns:
the settings.

setSettings

public void setSettings(Properties properties)
Sets the global CoCompose settings.

Parameters:
properties - the settings.

addSharedModel

public void addSharedModel(Model model)
Adds a model to the set of shared models and increases the usage count. If the model is already shared, only the usage count is increased.

Parameters:
model - the model to add.

removeSharedModel

public void removeSharedModel(Model model)
Removes a model from the set of shared models or decreases the usage count if greater than 0.

Parameters:
model - the model to remove.

getSharedModel

public Model getSharedModel(String uri)
Retrieves a shared model, given its URI.

Parameters:
uri - the URI that indicates the model location.
Returns:
the shared model or null if nothing found.

getSharedModels

public Collection getSharedModels()
Retrieves all shared models.

Returns:
the shared models.