Package com.powsybl.sld.model
Class Node
- java.lang.Object
-
- com.powsybl.sld.model.Node
-
- All Implemented Interfaces:
BaseNode
- Direct Known Subclasses:
BusNode
,FeederNode
,FictitiousNode
,SwitchNode
public class Node extends Object implements BaseNode
- Author:
- Benoit Jeanson
, Nicolas Duchene, Geoffroy Jamgotchian , Franck Lecuyer
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Node.NodeType
-
Field Summary
Fields Modifier and Type Field Description protected VoltageLevelGraph
graph
-
Constructor Summary
Constructors Modifier Constructor Description protected
Node(Node.NodeType type, String id, String name, String equipmentId, String componentType, boolean fictitious, VoltageLevelGraph graph)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAdjacentEdge(Edge e)
boolean
checkNodeSimilarity(Node n)
Check similarity with another nodeList<Edge>
getAdjacentEdges()
List<Node>
getAdjacentNodes()
Cell
getCell()
String
getComponentType()
Point
getCoordinates()
Point
getDiagramCoordinates()
double
getDiagramX()
Get abscissa within the diagramdouble
getDiagramY()
Get ordinate within the diagramString
getEquipmentId()
VoltageLevelGraph
getGraph()
String
getId()
String
getLabel()
Stream<Node>
getListNodeAdjInCell(Cell cell)
String
getName()
Double
getRotationAngle()
Node.NodeType
getType()
VoltageLevelInfos
getVoltageLevelInfos()
Get voltage level infos for this node.double
getX()
Get abscissa within current voltage leveldouble
getY()
Get ordinate within current voltage levelboolean
isFictitious()
boolean
isOpen()
boolean
isRotated()
void
resetCoords()
void
setCell(Cell cell)
void
setCoordinates(double x, double y)
void
setCoordinates(Point coord)
void
setLabel(String label)
void
setOpen(boolean open)
void
setRotationAngle(Double rotationAngle)
void
setType(Node.NodeType type)
void
setX(double x)
void
setY(double y)
void
shiftY(double yShift)
boolean
similarToAFeederNode(Node n)
String
toString()
void
writeJson(com.fasterxml.jackson.core.JsonGenerator generator)
protected void
writeJsonContent(com.fasterxml.jackson.core.JsonGenerator generator)
-
-
-
Field Detail
-
graph
protected final VoltageLevelGraph graph
-
-
Constructor Detail
-
Node
protected Node(Node.NodeType type, String id, String name, String equipmentId, String componentType, boolean fictitious, VoltageLevelGraph graph)
Constructor
-
-
Method Detail
-
getCell
public Cell getCell()
-
setCell
public void setCell(Cell cell)
-
getGraph
public VoltageLevelGraph getGraph()
-
getComponentType
public String getComponentType()
- Specified by:
getComponentType
in interfaceBaseNode
-
getRotationAngle
public Double getRotationAngle()
- Specified by:
getRotationAngle
in interfaceBaseNode
-
isFictitious
public boolean isFictitious()
-
setType
public void setType(Node.NodeType type)
-
getName
public String getName()
-
getEquipmentId
public String getEquipmentId()
-
getLabel
public String getLabel()
-
setLabel
public void setLabel(String label)
-
addAdjacentEdge
public void addAdjacentEdge(Edge e)
-
getDiagramCoordinates
public Point getDiagramCoordinates()
- Specified by:
getDiagramCoordinates
in interfaceBaseNode
-
getCoordinates
public Point getCoordinates()
-
setCoordinates
public void setCoordinates(Point coord)
-
setCoordinates
public void setCoordinates(double x, double y)
-
getX
public double getX()
Get abscissa within current voltage level- Returns:
- abscissa within voltage level
-
getY
public double getY()
Get ordinate within current voltage level- Returns:
- ordinate within voltage level
-
getDiagramX
public double getDiagramX()
Get abscissa within the diagram- Returns:
- abscissa within diagram
-
getDiagramY
public double getDiagramY()
Get ordinate within the diagram- Returns:
- ordinate within diagram
-
setX
public void setX(double x)
-
setY
public void setY(double y)
-
getType
public Node.NodeType getType()
-
setRotationAngle
public void setRotationAngle(Double rotationAngle)
-
isOpen
public boolean isOpen()
-
setOpen
public void setOpen(boolean open)
-
checkNodeSimilarity
public boolean checkNodeSimilarity(Node n)
Check similarity with another node- Parameters:
n
- the node to compare with- Returns:
- true IF the both are the same OR they are both Busbar OR they are both EQ(but not Busbar); false otherwise
-
similarToAFeederNode
public boolean similarToAFeederNode(Node n)
-
writeJsonContent
protected void writeJsonContent(com.fasterxml.jackson.core.JsonGenerator generator) throws IOException
- Throws:
IOException
-
writeJson
public void writeJson(com.fasterxml.jackson.core.JsonGenerator generator) throws IOException
- Throws:
IOException
-
resetCoords
public void resetCoords()
-
shiftY
public void shiftY(double yShift)
-
getVoltageLevelInfos
public VoltageLevelInfos getVoltageLevelInfos()
Get voltage level infos for this node. By default it is the voltage level infos of the graph but it could be override in case of node that represents an external voltage level.
-
-