public class PointingBlocksSlice extends Product implements PointingBlockSetInterface
Constructor and Description |
---|
PointingBlocksSlice()
Create a PTR segment with the given name
|
Modifier and Type | Method and Description |
---|---|
void |
addBlock(PointingBlockInterface newBlock)
Add a new block to the given segment
|
Product |
asProduct() |
PointingBlockInterface |
blockAfter(PointingBlockInterface block) |
PointingBlockInterface |
blockBefore(PointingBlockInterface block)
Get the block before the one given (before the start time the block), or null if there is no block before this one
|
PointingBlocksSlice |
copy() |
PointingBlocksSlice |
getAllBlocksOfType(java.lang.String blockType)
Get all blocks of a given type
|
PointingBlocksSlice |
getAllMaintenanceBlocks() |
PointingBlock |
getBlockAt(java.util.Date time)
Get the block with a start time equal to the given one or the greates value before the given date
|
PointingBlock[] |
getBlocks()
Get all the blocks in this segment
|
PointingBlocksSlice |
getBlocksAt(java.util.Date startTime,
java.util.Date endTime) |
java.lang.String |
getName()
Get the name of this segment
|
protected void |
hardInsertBlock(PointingBlockInterface block) |
protected void |
hardRemoveBlock(PointingBlock block) |
protected void |
hardRemoveBlocks(PointingBlock[] blocks) |
void |
regenerate(PointingBlockSetInterface slice) |
void |
removeBlock(PointingBlockInterface block)
Remove a block from the segment.
|
void |
removeBlocks(PointingBlock[] blocks) |
void |
repairMocm()
Check if there is any gap before a MOCM, MWOL or MSLW block (which have) internal slews and extend the observation before to end at the beginning of the maintenance block
|
void |
repairSlews()
Check if there is any gap and fill it with slews.
|
void |
setBlocks(PointingBlockInterface[] newBlocks)
Remove all currents blocks and substitute by the given ones
|
void |
setName(java.lang.String newName)
Set or replace the name of this segment
|
void |
setSlice(PointingBlockSetInterface slice) |
java.lang.String |
toXml(int indent)
Get the XML representation of this segment as per FD ICD
|
public PointingBlocksSlice()
segmentName
- Name of the segmentpublic void regenerate(PointingBlockSetInterface slice)
regenerate
in interface PointingBlockSetInterface
public PointingBlocksSlice copy()
public java.lang.String getName()
getName
in interface PointingBlockSetInterface
public void setName(java.lang.String newName)
setName
in interface PointingBlockSetInterface
newName
- public Product asProduct()
protected void hardRemoveBlock(PointingBlock block)
protected void hardInsertBlock(PointingBlockInterface block)
public void removeBlock(PointingBlockInterface block)
removeBlock
in interface PointingBlockSetInterface
block
- Block to be removedpublic PointingBlockInterface blockBefore(PointingBlockInterface block)
blockBefore
in interface PointingBlockSetInterface
block
- public PointingBlockInterface blockAfter(PointingBlockInterface block)
blockAfter
in interface PointingBlockSetInterface
public void repairMocm()
public void repairSlews()
public void addBlock(PointingBlockInterface newBlock)
addBlock
in interface PointingBlockSetInterface
newBlock
- Block to be addedpublic PointingBlock[] getBlocks()
getBlocks
in interface PointingBlockSetInterface
public void setBlocks(PointingBlockInterface[] newBlocks)
setBlocks
in interface PointingBlockSetInterface
newBlocks
- New blocks to replace the current onespublic java.lang.String toXml(int indent)
toXml
in interface PointingBlockSetInterface
indent
- the Number of tabs to be added before each linepublic PointingBlock getBlockAt(java.util.Date time)
getBlockAt
in interface PointingBlockSetInterface
time
- The desired timepublic PointingBlocksSlice getBlocksAt(java.util.Date startTime, java.util.Date endTime)
getBlocksAt
in interface PointingBlockSetInterface
public void removeBlocks(PointingBlock[] blocks)
removeBlocks
in interface PointingBlockSetInterface
public PointingBlocksSlice getAllBlocksOfType(java.lang.String blockType)
getAllBlocksOfType
in interface PointingBlockSetInterface
blockType
- type of blocks to search forpublic PointingBlocksSlice getAllMaintenanceBlocks()
public void setSlice(PointingBlockSetInterface slice)
setSlice
in interface PointingBlockSetInterface
protected void hardRemoveBlocks(PointingBlock[] blocks)