com.tensegrity.graph.model
Class GraphObjectInfoGeneratorRegistry

java.lang.Object
  extended bycom.tensegrity.graph.model.GraphObjectInfoGeneratorRegistry

public final class GraphObjectInfoGeneratorRegistry
extends java.lang.Object

The GraphObjectInfoGeneratorRegistry is responsible for managing the registration of EdgeInfoGenerator and NodeInfoGenerator instances.

The GraphObjectInfoGeneratorRegistry allows to register one instance of a EdgeInfoGenerator and one instance of a NodeInfoGenerator.
One of the two instances get called by the GraphAPI in case an EdgeInfo or a NodeInfo has to be recreated from its string representation.

Since it is not possible to register more than one instance of an EdgeInfoGenerator or a NodeInfoGenerator both of them must be able to generate each kind of EdgeInfo or NodeInfo that is used.

The registered EdgeInfoGenerator and NodeInfoGenerator instances are used by the GraphAPI to create new instances of EdgeInfo and NodeInfo instances. The indirectly automatic creation of these objects is needed for instance in case a GraphObject instance is serialized and afterwards deserialized for some reason.

Version:
$Id: GraphObjectInfoGeneratorRegistry.java,v 1.1 2005/05/02 18:29:36 MichaelKegel Exp $
Author:
MKegel

Method Summary
static void clear()
          Removes all key-generator mappings from the registry
static EdgeInfoGenerator getEdgeInfoGenerator()
          Returns the currently registered EdgeInfoGenerator or null if none is registered.
static NodeInfoGenerator getNodeInfoGenerator()
          Returns the currently registered NodeInfoGenerator or null if none is registered.
static void register(EdgeInfoGenerator generator)
          Registers the EdgeInfoGenerator given by generator.
static void register(NodeInfoGenerator generator)
          Registers the NodeInfoGenerator given by generator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

register

public static void register(EdgeInfoGenerator generator)
Registers the EdgeInfoGenerator given by generator.

Parameters:
generator - the EdgeInfoGenerator to be registered.

register

public static void register(NodeInfoGenerator generator)
Registers the NodeInfoGenerator given by generator.

Parameters:
generator - the NodeInfoGenerator to be registered.

getEdgeInfoGenerator

public static EdgeInfoGenerator getEdgeInfoGenerator()
Returns the currently registered EdgeInfoGenerator or null if none is registered.

Returns:
the current EdgeInfoGenerator or null

getNodeInfoGenerator

public static NodeInfoGenerator getNodeInfoGenerator()
Returns the currently registered NodeInfoGenerator or null if none is registered.

Returns:
the current NodeInfoGenerator or null

clear

public static void clear()
Removes all key-generator mappings from the registry



Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.