Package com.powsybl.sld.model.blocks
Class AbstractBlock
- java.lang.Object
-
- com.powsybl.sld.model.blocks.AbstractBlock
-
- All Implemented Interfaces:
Block
- Direct Known Subclasses:
AbstractComposedBlock
,AbstractPrimaryBlock
public abstract class AbstractBlock extends Object implements Block
- Author:
- Benoit Jeanson
, Nicolas Duchene, Geoffroy Jamgotchian , Franck Lecuyer
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.powsybl.sld.model.blocks.Block
Block.Extremity, Block.Type
-
-
Field Summary
Fields Modifier and Type Field Description protected Block.Type
type
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description int
getCardinality(Block.Extremity extremity)
int
getCardinality(Node node)
Coord
getCoord()
Node
getEndingNode()
Optional<Block.Extremity>
getExtremity(Node node)
Orientation
getOrientation()
Block
getParentBlock()
Position
getPosition()
Node
getStartingNode()
Block.Type
getType()
void
setCardinality(Block.Extremity extremity, int i)
void
setOrientation(Orientation orientation)
void
setOrientation(Orientation orientation, boolean recursively)
void
setParentBlock(Block parentBlock)
void
writeJson(com.fasterxml.jackson.core.JsonGenerator generator, boolean includeCoordinates)
protected abstract void
writeJsonContent(com.fasterxml.jackson.core.JsonGenerator generator, boolean includeCoordinates)
-
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.blocks.Block
accept, findBlockEmbeddingNode, getExtremityNode, getOrder, isEmbeddingNodeType, reverseBlock, sizing
-
-
-
-
Field Detail
-
type
protected final Block.Type type
-
-
Method Detail
-
getStartingNode
public Node getStartingNode()
- Specified by:
getStartingNode
in interfaceBlock
-
getEndingNode
public Node getEndingNode()
- Specified by:
getEndingNode
in interfaceBlock
-
getExtremity
public Optional<Block.Extremity> getExtremity(Node node)
- Specified by:
getExtremity
in interfaceBlock
-
getCardinality
public int getCardinality(Node node)
- Specified by:
getCardinality
in interfaceBlock
-
getCardinality
public int getCardinality(Block.Extremity extremity)
- Specified by:
getCardinality
in interfaceBlock
-
setCardinality
public void setCardinality(Block.Extremity extremity, int i)
- Specified by:
setCardinality
in interfaceBlock
-
getParentBlock
public Block getParentBlock()
-
setParentBlock
public void setParentBlock(Block parentBlock)
- Specified by:
setParentBlock
in interfaceBlock
-
getPosition
public Position getPosition()
- Specified by:
getPosition
in interfaceBlock
-
setOrientation
public void setOrientation(Orientation orientation)
- Specified by:
setOrientation
in interfaceBlock
-
setOrientation
public void setOrientation(Orientation orientation, boolean recursively)
- Specified by:
setOrientation
in interfaceBlock
-
getOrientation
public Orientation getOrientation()
- Specified by:
getOrientation
in interfaceBlock
-
getType
public Block.Type getType()
-
writeJsonContent
protected abstract 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 interfaceBlock
- Throws:
IOException
-
-