i3.dragos.gm.core.proxy
Class EdgeProxy

java.lang.Object
  extended by i3.dragos.gm.core.proxy.GraphEntityProxy
      extended by i3.dragos.gm.core.proxy.EdgeProxy
All Implemented Interfaces:
Edge, GraphEntity, ExistenceCheckable, MetaAttributable

public class EdgeProxy
extends GraphEntityProxy
implements Edge

An EdgeProxy delegates all method calls to the underlying edge except for those that access fields which are used after an edge has been deleted.

Author:
Boris Boehlen <boehlen@cs.rwth-aachen.de>

Field Summary
 
Fields inherited from class i3.dragos.gm.core.proxy.GraphEntityProxy
proxiedEntity
 
Constructor Summary
EdgeProxy(Edge e)
          Constructs a new wrapper for an edge.
 
Method Summary
 EdgeClass getEdgeClass()
          Returns the type of the edge.
 GraphEntity getSource()
          Returns the source graph element.
 GraphEntity getTarget()
          Returns the target graph element.
 boolean isDirected()
          Returns true if the edge is directed and false otherwise.
 void setSource(GraphEntity g)
          Sets the source graph element.
 void setTarget(GraphEntity g)
          Sets the target graph element.
 
Methods inherited from class i3.dragos.gm.core.proxy.GraphEntityProxy
checkExistence, checkExistenceOptional, equals, getAdjacentGraphEntities, getAdjacentRelations, getAdjacentRelations, getAllMetaAttributes, getAllValidAttributeValues, getAttributeValue, getDataSourceURL, getEdges, getEdges, getGraphEntityClass, getInternalIdentifier, getMetaAttribute, getParent, getProxyGraphEntity, getRelationEnds, getRelationEnds, getRelationEnds, getWrappedGraphEntity, hashCode, isAttributeValid, isIncident, isIncident, isMetaAttributeKeyReserved, isMetaAttributeSet, putAttributeValue, setAttributeInvalid, setMetaAttribute, toString, unsetMetaAttribute
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface i3.dragos.gm.core.GraphEntity
equals, getAdjacentGraphEntities, getAdjacentRelations, getAdjacentRelations, getAllValidAttributeValues, getAttributeValue, getDataSourceURL, getEdges, getEdges, getGraphEntityClass, getInternalIdentifier, getParent, getRelationEnds, getRelationEnds, getRelationEnds, getWrappedGraphEntity, hashCode, isAttributeValid, isIncident, isIncident, putAttributeValue, setAttributeInvalid
 
Methods inherited from interface i3.dragos.gm.core.schema.MetaAttributable
getAllMetaAttributes, getMetaAttribute, isMetaAttributeKeyReserved, isMetaAttributeSet, setMetaAttribute, unsetMetaAttribute
 
Methods inherited from interface i3.dragos.gm.core.schema.ExistenceCheckable
checkExistence, checkExistenceOptional
 

Constructor Detail

EdgeProxy

public EdgeProxy(Edge e)
Constructs a new wrapper for an edge.

Parameters:
e - The edge to wrap.
Method Detail

getEdgeClass

public EdgeClass getEdgeClass()
                       throws DragosException
Returns the type of the edge.

Actually, this method is just a correctly typed wrapper for calling GraphEntity.getGraphEntityClass().

Specified by:
getEdgeClass in interface Edge
Returns:
the edge class of the edge.
Throws:
DragosException - if something went wrong.

setSource

public void setSource(GraphEntity g)
               throws EntityNotFoundException,
                      DragosException
Sets the source graph element.

Specified by:
setSource in interface Edge
Parameters:
g - the source graph element (may be null).
Throws:
EntityNotFoundException - if the source was not null and could not be found.
DragosException - if something went wrong.

getSource

public GraphEntity getSource()
                      throws DragosException
Returns the source graph element.

Specified by:
getSource in interface Edge
Returns:
the source graph element.
Throws:
DragosException - if something went wrong.

setTarget

public void setTarget(GraphEntity g)
               throws EntityNotFoundException,
                      DragosException
Sets the target graph element.

Specified by:
setTarget in interface Edge
Parameters:
g - the target graph element (may be null).
Throws:
EntityNotFoundException - if the target was not null and could not be found.
DragosException - if something went wrong.

getTarget

public GraphEntity getTarget()
                      throws DragosException
Returns the target graph element.

Specified by:
getTarget in interface Edge
Returns:
the target graph element.
Throws:
DragosException - if something went wrong.

isDirected

public boolean isDirected()
                   throws DragosException
Returns true if the edge is directed and false otherwise.

Specified by:
isDirected in interface Edge
Returns:
true if the edge is directed and false otherwise.
Throws:
DragosException - if something went wrong.


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