Package com.powsybl.sld.model.blocks
Class AbstractComposedBlock
- java.lang.Object
-
- com.powsybl.sld.model.blocks.AbstractBlock
-
- com.powsybl.sld.model.blocks.AbstractComposedBlock
-
- All Implemented Interfaces:
Block
,ComposedBlock
- Direct Known Subclasses:
BodyParallelBlock
,LegParralelBlock
,SerialBlock
,UndefinedBlock
public abstract class AbstractComposedBlock extends AbstractBlock implements ComposedBlock
- Author:
- Benoit Jeanson
, Franck Lecuyer
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.powsybl.sld.model.blocks.Block
Block.Extremity, Block.Type
-
-
Field Summary
-
Fields inherited from class com.powsybl.sld.model.blocks.AbstractBlock
type
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Block>
findBlockEmbeddingNode(Node node)
Node
getExtremityNode(Block.Extremity extremity)
Stream<Position.Segment>
getSegments(Position.Dimension dimension)
List<Block>
getSubBlocks()
boolean
isEmbeddingNodeType(Node.NodeType type)
void
reverseBlock()
void
setOrientation(Orientation orientation)
void
setOrientation(Orientation orientation, boolean recursively)
String
toString()
protected void
writeJsonContent(com.fasterxml.jackson.core.JsonGenerator generator, boolean includeCoordinates)
-
Methods inherited from class com.powsybl.sld.model.blocks.AbstractBlock
getCardinality, getCardinality, getCoord, getEndingNode, getExtremity, getOrientation, getParentBlock, getPosition, getStartingNode, getType, setCardinality, setParentBlock, writeJson
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.powsybl.sld.model.blocks.Block
accept, getCardinality, getCardinality, getCoord, getEndingNode, getExtremity, getOrder, getOrientation, getPosition, getStartingNode, getType, setCardinality, setParentBlock, sizing, writeJson
-
-
-
-
Method Detail
-
getSubBlocks
public List<Block> getSubBlocks()
- Specified by:
getSubBlocks
in interfaceComposedBlock
-
isEmbeddingNodeType
public boolean isEmbeddingNodeType(Node.NodeType type)
- Specified by:
isEmbeddingNodeType
in interfaceBlock
-
findBlockEmbeddingNode
public List<Block> findBlockEmbeddingNode(Node node)
- Specified by:
findBlockEmbeddingNode
in interfaceBlock
-
getExtremityNode
public Node getExtremityNode(Block.Extremity extremity)
- Specified by:
getExtremityNode
in interfaceBlock
-
reverseBlock
public void reverseBlock()
- Specified by:
reverseBlock
in interfaceBlock
-
setOrientation
public void setOrientation(Orientation orientation)
- Specified by:
setOrientation
in interfaceBlock
- Overrides:
setOrientation
in classAbstractBlock
-
setOrientation
public void setOrientation(Orientation orientation, boolean recursively)
- Specified by:
setOrientation
in interfaceBlock
- Overrides:
setOrientation
in classAbstractBlock
-
getSegments
public Stream<Position.Segment> getSegments(Position.Dimension dimension)
-
writeJsonContent
protected void writeJsonContent(com.fasterxml.jackson.core.JsonGenerator generator, boolean includeCoordinates) throws IOException
- Specified by:
writeJsonContent
in classAbstractBlock
- Throws:
IOException
-
-