thinkmap.client
Class SourceEntity.Relation

java.lang.Object
  extended by thinkmap.client.SourceEntity.Relation
Enclosing class:
SourceEntity

public class SourceEntity.Relation
extends Object

A Relation defines a relationship between two entities in the source manager. Typically, nodes do not have have Relations defined on them, and each edge has two Relations. The Relations for an edge have the names Source and Sink. Each is connected to a node.


Field Summary
protected  Hashtable attributes
          Attributes of the Relation
protected  boolean hookedUp
           
protected  String name
           
protected  boolean recip
           
protected  SourceEntity related
           
protected  EntityId relatedId
           
protected  String relatedIdString
           
protected  String relatedIdType
           
 
Constructor Summary
SourceEntity.Relation()
           
 
Method Summary
 boolean equals(Object o)
           
 Object getAttribute(String name)
          Get an attribute from the Relation
 EntityId getEntityId()
           
 String getName()
          Get the name of the relationship.
 SourceEntity getRelatedEntity()
           
 SourceEntity getSourceEntity()
           
 boolean isReciprical()
          This was a typo (should be reciprOcal), but we're leaving it in to not break existing configurations.
 boolean isReciprocal()
          Get whether this means that the target entity is also related to this entity.
 void setAttribute(String name, Object value)
          Set an attribute on the Relation
 void setAttributes(Hashtable cache)
          Set many attributes at once
 void setEntityId(EntityId e)
           
 void setEntityId(String s)
          The id of the target entity that this entity is related to.
 void setEntityType(String s)
          The type of the target entity that this entity is related to.
 void setName(String s)
          Set the name of the relationship.
 void setReciprical(boolean b)
          This was a typo (should be reciprOcal), but we're leaving it in to not break existing configurations.
 void setReciprocal(boolean b)
          Set whether this means that the target entity is also related to this entity.
 void setRelatedEntity(SourceEntity e)
           
 String toString()
           
 void updateFrom(SourceEntity.Relation otherRelation)
          Copy the values from other Relation
 void writeTo(SourceEntity from, IEntityHandler handler)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

relatedId

protected EntityId relatedId

related

protected SourceEntity related

name

protected String name

recip

protected boolean recip

relatedIdString

protected String relatedIdString

relatedIdType

protected String relatedIdType

hookedUp

protected boolean hookedUp

attributes

protected Hashtable attributes
Attributes of the Relation

Constructor Detail

SourceEntity.Relation

public SourceEntity.Relation()
Method Detail

toString

public String toString()
Overrides:
toString in class Object

isReciprical

public boolean isReciprical()
This was a typo (should be reciprOcal), but we're leaving it in to not break existing configurations.


setReciprical

public void setReciprical(boolean b)
This was a typo (should be reciprOcal), but we're leaving it in to not break existing configurations.


isReciprocal

public boolean isReciprocal()
Get whether this means that the target entity is also related to this entity.

Returns:
whether the target entity is also related to this entity

setReciprocal

public void setReciprocal(boolean b)
Set whether this means that the target entity is also related to this entity.


getName

public String getName()
Get the name of the relationship. Edges typically have one Relation called "Source" and another called "Sink".

Returns:
the name of the relationship

setName

public void setName(String s)
Set the name of the relationship. Edges typically have one Relation called "Source" and another called "Sink".


getEntityId

public EntityId getEntityId()

setEntityId

public void setEntityId(String s)
The id of the target entity that this entity is related to.


setEntityType

public void setEntityType(String s)
The type of the target entity that this entity is related to.


setEntityId

public void setEntityId(EntityId e)

getSourceEntity

public SourceEntity getSourceEntity()

getRelatedEntity

public SourceEntity getRelatedEntity()

setRelatedEntity

public void setRelatedEntity(SourceEntity e)

equals

public boolean equals(Object o)
Overrides:
equals in class Object

writeTo

public void writeTo(SourceEntity from,
                    IEntityHandler handler)

setAttribute

public void setAttribute(String name,
                         Object value)
Set an attribute on the Relation


setAttributes

public void setAttributes(Hashtable cache)
Set many attributes at once


getAttribute

public Object getAttribute(String name)
Get an attribute from the Relation


updateFrom

public void updateFrom(SourceEntity.Relation otherRelation)
Copy the values from other Relation



Copyright © 2013 Thinkmap, Inc. All Rights Reserved.