Class GraphDefinition<T>
java.lang.Object
cz.metacentrum.perun.utils.graphs.generators.GraphDefinition<T>
Class that defines relations in graph.
New relations can be added with method 'addEntitiesData' where the expected format is a Map
of GraphDefinition
entities where every entity has a Set
of target entities. In other words, there is an oriented Edge between
enetity and its target entities. After specifying entities data, you have to set edge type with method
'withEdgeType'.
Example: graphDefinition.addEntitiesData(data).withEdgeType(GraphEdge.Type.BOLD);
New relations can also be added with method 'addEntity'. After specifying the entity, you have to set target entities with method 'withTargetEntities'. After that you must set the graph edge type.
Example: graphDefinition.addEntity(entity).withTargetEntities(targetEntities).withEdgeType(GraphEdge.Type.BOLD);
- Author:
- Vojtech Sassmann invalid input: '<'vojtech.sassmann@gmail.com>
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
Class representing the state of adding new data to theGraphDefinition
.class
Class representing the state of adding new entity to theGraphDefinition
.class
Class representing the state of adding target entities. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddEntitiesData
(Map<T, Set<T>> entityWithTargetEntities) Method used to add entities data to definition.Method used to add entity to definition.
-
Constructor Details
-
GraphDefinition
public GraphDefinition()
-
-
Method Details
-
addEntitiesData
Method used to add entities data to definition. After calling this method you have to set the Graph edge type.- Parameters:
entityWithTargetEntities
- entities data- Returns:
- object defining that entities data has been set
-
addEntity
Method used to add entity to definition. After calling this method you have to set the target entities.- Parameters:
entity
- entity- Returns:
- object defining that entity data has been set
-