i3.dragos.gm.core
Interface Wrapper

All Known Implementing Classes:
MultiWrapper, NullWrapper, WrapperBooster

public interface Wrapper

A Wrapper is used to dynamically extend the GM's functionality.

This is done by enclosing instances of graph entities and/or graph entity classes inside other graph entities / graph entity classes. These wrapping instances can modify the behaviour of existing methods, or even introduce new methods (see UnwrapTool for more information on this).

There are two implementations of this interfaces included in the core GM: NullWrapper and MultiWrapper

Author:
Thorsten Hermes <thermes@i3.informatik.rwth-aachen.de>

Method Summary
 Attribute wrapAttribute(Attribute a)
          Wraps the supplied Attribute.
 Edge wrapEdge(Edge g)
          Variant of wrapGraphEntity(GraphEntity) to avoid casting.
 EdgeClass wrapEdgeClass(EdgeClass g)
          Variant of wrapGraphEntityClass(GraphEntityClass) to avoid casting.
 Graph wrapGraph(Graph g)
          Variant of wrapGraphEntity(GraphEntity) to avoid casting.
 GraphClass wrapGraphClass(GraphClass g)
          Variant of wrapGraphEntityClass(GraphEntityClass) to avoid casting.
 GraphEntity wrapGraphEntity(GraphEntity g)
          Wraps the supplied GraphEntity.
 GraphEntityClass wrapGraphEntityClass(GraphEntityClass g)
          Wraps the supplied GraphEntityClass.
 Node wrapNode(Node g)
          Variant of wrapGraphEntity(GraphEntity) to avoid casting.
 NodeClass wrapNodeClass(NodeClass g)
          Variant of wrapGraphEntityClass(GraphEntityClass) to avoid casting.
 Relation wrapRelation(Relation g)
          Variant of wrapGraphEntity(GraphEntity) to avoid casting.
 RelationClass wrapRelationClass(RelationClass g)
          Variant of wrapGraphEntityClass(GraphEntityClass) to avoid casting.
 RelationEnd wrapRelationEnd(RelationEnd g)
          Variant of wrapGraphEntity(GraphEntity) to avoid casting.
 RelationEndClass wrapRelationEndClass(RelationEndClass g)
          Variant of wrapGraphEntityClass(GraphEntityClass) to avoid casting.
 

Method Detail

wrapGraphEntity

GraphEntity wrapGraphEntity(GraphEntity g)
                            throws DragosException
Wraps the supplied GraphEntity. The type of the entity must be left unchanged, e.g. an Edge must only be wrapped in another Edge, not in a Node.

Parameters:
g - The GraphEntity to wrap, must not be null
Returns:
A GraphEntity of the same type, wrapping the supplied entity in zero or more layers.
Throws:
DragosException - in case of errors during wrapping.

wrapEdge

Edge wrapEdge(Edge g)
              throws DragosException
Variant of wrapGraphEntity(GraphEntity) to avoid casting.

Parameters:
g - see wrapGraphEntity(GraphEntity) for details
Returns:
see wrapGraphEntity(GraphEntity) for details
Throws:
DragosException - in case of errors during wrapping.

wrapGraph

Graph wrapGraph(Graph g)
                throws DragosException
Variant of wrapGraphEntity(GraphEntity) to avoid casting.

Parameters:
g - see wrapGraphEntity(GraphEntity) for details
Returns:
see wrapGraphEntity(GraphEntity) for details
Throws:
DragosException - in case of errors during wrapping.

wrapNode

Node wrapNode(Node g)
              throws DragosException
Variant of wrapGraphEntity(GraphEntity) to avoid casting.

Parameters:
g - see wrapGraphEntity(GraphEntity) for details
Returns:
see wrapGraphEntity(GraphEntity) for details
Throws:
DragosException - in case of errors during wrapping.

wrapRelation

Relation wrapRelation(Relation g)
                      throws DragosException
Variant of wrapGraphEntity(GraphEntity) to avoid casting.

Parameters:
g - see wrapGraphEntity(GraphEntity) for details
Returns:
see wrapGraphEntity(GraphEntity) for details
Throws:
DragosException - in case of errors during wrapping.

wrapRelationEnd

RelationEnd wrapRelationEnd(RelationEnd g)
                            throws DragosException
Variant of wrapGraphEntity(GraphEntity) to avoid casting.

Parameters:
g - see wrapGraphEntity(GraphEntity) for details
Returns:
see wrapGraphEntity(GraphEntity) for details
Throws:
DragosException - in case of errors during wrapping.

wrapGraphEntityClass

GraphEntityClass wrapGraphEntityClass(GraphEntityClass g)
                                      throws DragosException
Wraps the supplied GraphEntityClass. The type of the entity must be left unchanged, e.g. an EdgeClass must only be wrapped in another EdgeClass, not in a NodeClass.

Parameters:
g - The GraphEntityClass to wrap, must not be null
Returns:
A GraphEntityClass of the same type, wrapping the supplied class in zero or more layers.
Throws:
DragosException - in case of errors during wrapping.

wrapEdgeClass

EdgeClass wrapEdgeClass(EdgeClass g)
                        throws DragosException
Variant of wrapGraphEntityClass(GraphEntityClass) to avoid casting.

Parameters:
g - see wrapGraphEntity(GraphEntity) for details
Returns:
see wrapGraphEntityClass(GraphEntityClass) for details
Throws:
DragosException - in case of errors during wrapping.

wrapGraphClass

GraphClass wrapGraphClass(GraphClass g)
                          throws DragosException
Variant of wrapGraphEntityClass(GraphEntityClass) to avoid casting.

Parameters:
g - see wrapGraphEntityClass(GraphEntityClass) for details
Returns:
see wrapGraphEntityClass(GraphEntityClass) for details
Throws:
DragosException - in case of errors during wrapping.

wrapNodeClass

NodeClass wrapNodeClass(NodeClass g)
                        throws DragosException
Variant of wrapGraphEntityClass(GraphEntityClass) to avoid casting.

Parameters:
g - see wrapGraphEntityClass(GraphEntityClass) for details
Returns:
see wrapGraphEntityClass(GraphEntityClass) for details
Throws:
DragosException - in case of errors during wrapping.

wrapRelationClass

RelationClass wrapRelationClass(RelationClass g)
                                throws DragosException
Variant of wrapGraphEntityClass(GraphEntityClass) to avoid casting.

Parameters:
g - see wrapGraphEntityClass(GraphEntityClass) for details
Returns:
see wrapGraphEntityClass(GraphEntityClass) for details
Throws:
DragosException - in case of errors during wrapping.

wrapRelationEndClass

RelationEndClass wrapRelationEndClass(RelationEndClass g)
                                      throws DragosException
Variant of wrapGraphEntityClass(GraphEntityClass) to avoid casting.

Parameters:
g - see wrapGraphEntityClass(GraphEntityClass) for details
Returns:
see wrapGraphEntityClass(GraphEntityClass) for details
Throws:
DragosException - in case of errors during wrapping.

wrapAttribute

Attribute wrapAttribute(Attribute a)
                        throws DragosException
Wraps the supplied Attribute.

Parameters:
a - The Attribute to wrap, must not be null
Returns:
An Attribute, wrapping the original Attribute in zero or more layers.
Throws:
DragosException - in case of errors during wrapping.


Copyright © 2002-2008 RWTH Aachen, Department of Computer Science 3 (Software Engineering). All Rights Reserved.