i3.dragos.gm.core.proxy
Class ProxyWrapper

java.lang.Object
  extended by i3.dragos.gm.core.proxy.ProxyWrapper

public class ProxyWrapper
extends java.lang.Object

The ProxyWrapper provides methods to wrap graph entity, graph entity classes, and attributes into so-called proxies. These proxies hold the informations that should be accessible regardless of the existence of the corresponing class (see background for more details). The proxies are only intended to be used by data source implementations, as they do not offer the functionality of real wrappers.

Background: Some data source implementations load field values on demand. When the graph entity has been removed from the data source these fields are no longer accessible. Thus, queries to these fields fail. As we don't want to bother users with this detail, implementations can use the proxies returned by this wrapper to hide this detail.

Author:
Boris Böhlen <boehlen@cs.rwth-aachen.de>

Constructor Summary
ProxyWrapper()
           
 
Method Summary
static Attribute wrapAttribute(Attribute a)
          Wraps the supplied Attribute.
static Edge wrapEdge(Edge g)
          Variant of wrapGraphEntity(GraphEntity) to avoid casting.
static EdgeClass wrapEdgeClass(EdgeClass g)
          Variant of wrapGraphEntityClass(GraphEntityClass) to avoid casting.
static Graph wrapGraph(Graph g)
          Variant of wrapGraphEntity(GraphEntity) to avoid casting.
static GraphClass wrapGraphClass(GraphClass g)
          Variant of wrapGraphEntityClass(GraphEntityClass) to avoid casting.
static GraphEntity wrapGraphEntity(GraphEntity g)
          Wraps the supplied GraphEntity.
static GraphEntityClass wrapGraphEntityClass(GraphEntityClass g)
          Wraps the supplied GraphEntityClass.
static Node wrapNode(Node g)
          Variant of wrapGraphEntity(GraphEntity) to avoid casting.
static NodeClass wrapNodeClass(NodeClass g)
          Variant of wrapGraphEntityClass(GraphEntityClass) to avoid casting.
static Relation wrapRelation(Relation g)
          Variant of wrapGraphEntity(GraphEntity) to avoid casting.
static RelationClass wrapRelationClass(RelationClass g)
          Variant of wrapGraphEntityClass(GraphEntityClass) to avoid casting.
static RelationEnd wrapRelationEnd(RelationEnd g)
          Variant of wrapGraphEntity(GraphEntity) to avoid casting.
static RelationEndClass wrapRelationEndClass(RelationEndClass g)
          Variant of wrapGraphEntityClass(GraphEntityClass) to avoid casting.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProxyWrapper

public ProxyWrapper()
Method Detail

wrapGraphEntity

public static GraphEntity wrapGraphEntity(GraphEntity g)
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.

wrapEdge

public static Edge wrapEdge(Edge g)
Variant of wrapGraphEntity(GraphEntity) to avoid casting.

Parameters:
g - see wrapGraphEntity(GraphEntity) for details
Returns:
see wrapGraphEntity(GraphEntity) for details

wrapGraph

public static Graph wrapGraph(Graph g)
Variant of wrapGraphEntity(GraphEntity) to avoid casting.

Parameters:
g - see wrapGraphEntity(GraphEntity) for details
Returns:
see wrapGraphEntity(GraphEntity) for details

wrapNode

public static Node wrapNode(Node g)
Variant of wrapGraphEntity(GraphEntity) to avoid casting.

Parameters:
g - see wrapGraphEntity(GraphEntity) for details
Returns:
see wrapGraphEntity(GraphEntity) for details

wrapRelation

public static Relation wrapRelation(Relation g)
Variant of wrapGraphEntity(GraphEntity) to avoid casting.

Parameters:
g - see wrapGraphEntity(GraphEntity) for details
Returns:
see wrapGraphEntity(GraphEntity) for details

wrapRelationEnd

public static RelationEnd wrapRelationEnd(RelationEnd g)
Variant of wrapGraphEntity(GraphEntity) to avoid casting.

Parameters:
g - see wrapGraphEntity(GraphEntity) for details
Returns:
see wrapGraphEntity(GraphEntity) for details

wrapGraphEntityClass

public static GraphEntityClass wrapGraphEntityClass(GraphEntityClass g)
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.

wrapEdgeClass

public static EdgeClass wrapEdgeClass(EdgeClass g)
Variant of wrapGraphEntityClass(GraphEntityClass) to avoid casting.

Parameters:
g - see wrapGraphEntity(GraphEntity) for details
Returns:
see wrapGraphEntityClass(GraphEntityClass) for details

wrapGraphClass

public static GraphClass wrapGraphClass(GraphClass g)
Variant of wrapGraphEntityClass(GraphEntityClass) to avoid casting.

Parameters:
g - see wrapGraphEntityClass(GraphEntityClass) for details
Returns:
see wrapGraphEntityClass(GraphEntityClass) for details

wrapNodeClass

public static NodeClass wrapNodeClass(NodeClass g)
Variant of wrapGraphEntityClass(GraphEntityClass) to avoid casting.

Parameters:
g - see wrapGraphEntityClass(GraphEntityClass) for details
Returns:
see wrapGraphEntityClass(GraphEntityClass) for details

wrapRelationClass

public static RelationClass wrapRelationClass(RelationClass g)
Variant of wrapGraphEntityClass(GraphEntityClass) to avoid casting.

Parameters:
g - see wrapGraphEntityClass(GraphEntityClass) for details
Returns:
see wrapGraphEntityClass(GraphEntityClass) for details

wrapRelationEndClass

public static RelationEndClass wrapRelationEndClass(RelationEndClass g)
Variant of wrapGraphEntityClass(GraphEntityClass) to avoid casting.

Parameters:
g - see wrapGraphEntityClass(GraphEntityClass) for details
Returns:
see wrapGraphEntityClass(GraphEntityClass) for details

wrapAttribute

public static Attribute wrapAttribute(Attribute a)
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.


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