Class AbstractNode

  • All Implemented Interfaces:
    Node
    Direct Known Subclasses:
    ConnectivityNode, EquipmentNode

    public abstract class AbstractNode
    extends Object
    implements Node
    Author:
    Benoit Jeanson , Nicolas Duchene, Geoffroy Jamgotchian , Franck Lecuyer
    • Constructor Detail

      • AbstractNode

        protected AbstractNode​(Node.NodeType type,
                               String id,
                               String componentType,
                               boolean fictitious)
        Constructor
    • Method Detail

      • isFictitious

        public boolean isFictitious()
        Specified by:
        isFictitious in interface Node
      • setLabel

        public void setLabel​(String label)
        Specified by:
        setLabel in interface Node
      • setCoordinates

        public void setCoordinates​(double x,
                                   double y)
        Specified by:
        setCoordinates in interface Node
      • getX

        public double getX()
        Get abscissa within current voltage level
        Specified by:
        getX in interface Node
        Returns:
        abscissa within voltage level
      • getY

        public double getY()
        Get ordinate within current voltage level
        Specified by:
        getY in interface Node
        Returns:
        ordinate within voltage level
      • setX

        public void setX​(double x)
        Specified by:
        setX in interface Node
      • setY

        public void setY​(double y)
        Specified by:
        setY in interface Node
      • setOrder

        public void setOrder​(int order)
        Specified by:
        setOrder in interface Node
      • removeOrder

        public void removeOrder()
        Specified by:
        removeOrder in interface Node
      • defaultOrientation

        protected Orientation defaultOrientation()
      • checkNodeSimilarity

        public boolean checkNodeSimilarity​(Node n)
        Check similarity with another node
        Specified by:
        checkNodeSimilarity in interface 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
      • writeJsonContent

        protected void writeJsonContent​(com.fasterxml.jackson.core.JsonGenerator generator,
                                        boolean includeCoordinates)
                                 throws IOException
        Throws:
        IOException
      • writeJson

        public void writeJson​(com.fasterxml.jackson.core.JsonGenerator generator,
                              boolean includeCoordinates)
                       throws IOException
        Specified by:
        writeJson in interface Node
        Throws:
        IOException