Package com.powsybl.sld.model.graphs
Class AbstractGraph
- java.lang.Object
-
- com.powsybl.sld.model.graphs.AbstractGraph
-
- All Implemented Interfaces:
Graph
- Direct Known Subclasses:
AbstractBaseGraph
,ZoneGraph
public abstract class AbstractGraph extends Object implements Graph
- Author:
- Florian Dupuy
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description BranchEdge
addLineEdge(String lineId, Node node1, Node node2)
void
addNode(VoltageLevelGraph vlGraph, Node node)
Optional<Cell>
getCell(Node node)
Direction
getDirection(Node node)
double
getHeight()
List<BranchEdge>
getLineEdges()
Map<Node,VoltageLevelGraph>
getNodeToVlGraph()
Point
getShiftedPoint(Node node)
VoltageLevelGraph
getVoltageLevelGraph(Node node)
VoltageLevelInfos
getVoltageLevelInfos(Node node)
double
getWidth()
void
removeNode(Node node)
void
setCoordinatesSerialized(boolean coordinatesSerialized)
void
setSize(double width, double height)
protected abstract void
writeJson(com.fasterxml.jackson.core.JsonGenerator generator, boolean includeCoordinates)
void
writeJson(Writer writer)
void
writeJson(Path file)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.powsybl.sld.model.graphs.Graph
getAllNodesStream, getId, getVoltageLevel, getVoltageLevels, getVoltageLevelStream
-
-
-
-
Method Detail
-
addLineEdge
public BranchEdge addLineEdge(String lineId, Node node1, Node node2)
- Specified by:
addLineEdge
in interfaceGraph
-
getLineEdges
public List<BranchEdge> getLineEdges()
- Specified by:
getLineEdges
in interfaceGraph
-
setCoordinatesSerialized
public void setCoordinatesSerialized(boolean coordinatesSerialized)
- Specified by:
setCoordinatesSerialized
in interfaceGraph
-
getNodeToVlGraph
public Map<Node,VoltageLevelGraph> getNodeToVlGraph()
- Specified by:
getNodeToVlGraph
in interfaceGraph
-
getVoltageLevelGraph
public VoltageLevelGraph getVoltageLevelGraph(Node node)
- Specified by:
getVoltageLevelGraph
in interfaceGraph
-
getVoltageLevelInfos
public VoltageLevelInfos getVoltageLevelInfos(Node node)
- Specified by:
getVoltageLevelInfos
in interfaceGraph
-
getShiftedPoint
public Point getShiftedPoint(Node node)
- Specified by:
getShiftedPoint
in interfaceGraph
-
getDirection
public Direction getDirection(Node node)
- Specified by:
getDirection
in interfaceGraph
-
addNode
public void addNode(VoltageLevelGraph vlGraph, Node node)
-
removeNode
public void removeNode(Node node)
- Specified by:
removeNode
in interfaceGraph
-
writeJson
protected abstract void writeJson(com.fasterxml.jackson.core.JsonGenerator generator, boolean includeCoordinates) throws IOException
- Throws:
IOException
-
setSize
public void setSize(double width, double height)
-
-