public class Cloud extends Object
Constructor and Description |
---|
Cloud(boolean isDirect)
Only public constructor to generate a new
Cloud object. |
Modifier and Type | Method and Description |
---|---|
void |
addEdge(CloudNode source,
CloudNode target,
double weight)
Generates a new edge between two nodes owned by this cloud.
|
CloudNode |
addNode()
Generate and add a new node to this
Cloud . |
Set<CloudEdge> |
getEdges()
Get the set of all edges associated with this cloud.
|
Integer |
getId()
Get the id of the corresponding database persisted object.
|
Set<CloudNode> |
getNodes()
Get the set of all nodes associated with this cloud
|
String |
getTargetEntity()
Getter for the target entity string representing the focus topic of this cloud.
|
boolean |
isDirect()
Getter for the
isDirect property of this class. |
void |
setTargetEntity(String targetEntity)
Setter for the target entity string reprenting the focus topic of this cloud.
|
public Cloud(boolean isDirect)
Only public constructor to generate a new Cloud
object.
isDirect
- defines if the representation of this cloud structure should be a
public CloudNode addNode()
Cloud
.public void addEdge(CloudNode source, CloudNode target, double weight)
Generates a new edge between two nodes owned by this cloud.
If the current cloud is directed, parameters source
and target
represent the direction of the edge (as suggested by parameter names). Otherwise it is
implicitly created a symmetric connection between the two given nodes.
N.B.: Reflexive edges are discarded by default without any error or warning massage.
source
- Source node of the directed edgetarget
- Target node of the directed edgeweight
- Weight of the edgeCloud(boolean)
public Integer getId()
Get the id of the corresponding database persisted object.
public Set<CloudNode> getNodes()
Get the set of all nodes associated with this cloud
public String getTargetEntity()
Getter for the target entity string representing the focus topic of this cloud.
public void setTargetEntity(String targetEntity)
Setter for the target entity string reprenting the focus topic of this cloud.
targetEntity
- the target entity stringpublic boolean isDirect()
Getter for the isDirect
property of this class.
public Set<CloudEdge> getEdges()
Get the set of all edges associated with this cloud.
N.B.:If the cloud is undirected, the edges are repeated twice. For example,
if there is an indirected edge between node A
and node B
it will
be represented by two CloudEdge
objects, the former A->B
and the
latter B->A
.