|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object it.unimi.dico.islab.idbs2.cloud.Cloud
public class Cloud
Main class of the cloud
framework, representation of a cloud graph. A cloud is formally a
couple <N,E>
where N
is a set of nodes (each of them represented by the class
CloudNode
) and E
is a set of edges (each of them represented by the class CloudEdge
).
CloudEdge
,
CloudNode
Constructor Summary | |
---|---|
Cloud(boolean isDirect)
Only public constructor to generate a new Cloud object. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
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
Method Detail |
---|
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
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |