public class PtrSegment extends PointingBlocksSlice
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DATA_TAG |
static java.lang.String |
FRAME_TAG |
static java.lang.String |
HREF_TAG |
static java.lang.String |
INCLUDE_TAG |
static java.lang.String |
METADATA_TAG |
static java.lang.String |
NAME_TAG |
static java.lang.String |
SEGMENT_TAG |
static java.lang.String |
TIMELINE_TAG |
| Constructor and Description |
|---|
PtrSegment(java.lang.String segmentName)
Create a PTR segment with the given name
|
| Modifier and Type | Method and Description |
|---|---|
void |
addBlock(PointingBlock newBlock)
Add a new block to the given segment
|
void |
addInclude(java.lang.String newInclude)
Add a single include to this segment
|
Product |
asProduct() |
PointingBlock |
blockAfter(PointingBlock block) |
PointingBlock |
blockBefore(PointingBlock block)
Get the block before the one given (before the start time the block), or null if there is no block before this one
|
PtrSegment |
copy() |
PointingBlocksSlice |
getAllBlocksOfInstrument(java.lang.String instrument) |
PointingBlocksSlice |
getAllBlocksOfType(java.lang.String blockType)
Get all blocks of a given type
|
PointingBlocksSlice |
getAllBlocksOfVstp(int vstp) |
PointingBlock[] |
getAllSlews() |
PointingBlocksSlice[] |
getAllSlices() |
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
|
java.lang.String |
getPdfm() |
java.util.Date |
getSegmentEndDate() |
java.util.Date |
getSegmentStartDate() |
PointingBlocksSlice |
getSlice(int number) |
java.lang.String |
getTimeLineFrame()
Get the time frame of this segment
|
int[] |
getVstpNumbers() |
protected void |
hardInsertBlock(PointingBlock block) |
protected void |
hardInsertBlocks(PointingBlock[] blocks) |
protected void |
hardRemoveBlock(PointingBlock block) |
protected void |
hardRemoveBlocks(PointingBlock[] blocks) |
protected void |
hardSetSlice(PointingBlocksSlice slice) |
void |
removeBlock(PointingBlock block)
Remove a block from the segment.
|
void |
removeBlocks(PointingBlock[] blocks) |
void |
repairConsecutiveBlocks() |
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(PointingBlock[] newBlocks)
Remove all currents blocks and substitute by the given ones
|
void |
setIncludes(java.lang.String[] newIncludes)
Set or replace the includes of this segment (will appear in the XML)
|
void |
setName(java.lang.String newName)
Set or replace the name of this segment
|
void |
setSlice(PointingBlocksSlice slice) |
void |
setTimeLineFrame(java.lang.String newFrame)
Set the time frame that will be specified in the xml
|
java.lang.String |
toXml(int indent)
Get the XML representation of this segment as per FD ICD
|
addBlock, blockAfter, blockBefore, getAllMaintenanceBlocks, hardInsertBlock, regenerate, removeBlock, setBlocks, setSlicepublic static java.lang.String SEGMENT_TAG
public static java.lang.String METADATA_TAG
public static java.lang.String NAME_TAG
public static java.lang.String INCLUDE_TAG
public static java.lang.String HREF_TAG
public static java.lang.String DATA_TAG
public static java.lang.String TIMELINE_TAG
public static java.lang.String FRAME_TAG
public PtrSegment(java.lang.String segmentName)
segmentName - Name of the segmentpublic PtrSegment copy()
copy in class PointingBlocksSlicepublic Product asProduct()
asProduct in class PointingBlocksSlicepublic java.util.Date getSegmentStartDate()
public java.util.Date getSegmentEndDate()
protected void hardRemoveBlock(PointingBlock block)
hardRemoveBlock in class PointingBlocksSliceprotected void hardRemoveBlocks(PointingBlock[] blocks)
hardRemoveBlocks in class PointingBlocksSliceprotected void hardInsertBlock(PointingBlock block)
protected void hardInsertBlocks(PointingBlock[] blocks)
public void removeBlock(PointingBlock block)
block - Block to be removedpublic PointingBlock blockBefore(PointingBlock block)
block - public PointingBlock blockAfter(PointingBlock block)
public void repairConsecutiveBlocks()
public void repairMocm()
repairMocm in class PointingBlocksSlicepublic void repairSlews()
repairSlews in class PointingBlocksSlicepublic void addBlock(PointingBlock newBlock)
newBlock - Block to be addedpublic PointingBlock[] getBlocks()
getBlocks in interface PointingBlockSetInterfacegetBlocks in class PointingBlocksSlicepublic void setBlocks(PointingBlock[] newBlocks)
newBlocks - New blocks to replace the current onespublic void setTimeLineFrame(java.lang.String newFrame)
newFrame - The new time framepublic java.lang.String getTimeLineFrame()
public java.lang.String getName()
getName in interface PointingBlockSetInterfacegetName in class PointingBlocksSlicepublic java.lang.String getPdfm()
public void setName(java.lang.String newName)
setName in interface PointingBlockSetInterfacesetName in class PointingBlocksSlicenewName - public void setIncludes(java.lang.String[] newIncludes)
newIncludes - public void addInclude(java.lang.String newInclude)
newInclude - new include to be addedpublic java.lang.String toXml(int indent)
toXml in interface PointingBlockSetInterfacetoXml in class PointingBlocksSliceindent - the Number of tabs to be added before each linepublic PointingBlock getBlockAt(java.util.Date time)
getBlockAt in interface PointingBlockSetInterfacegetBlockAt in class PointingBlocksSlicetime - The desired timepublic PointingBlocksSlice getBlocksAt(java.util.Date startTime, java.util.Date endTime)
getBlocksAt in interface PointingBlockSetInterfacegetBlocksAt in class PointingBlocksSlicepublic void removeBlocks(PointingBlock[] blocks)
removeBlocks in interface PointingBlockSetInterfaceremoveBlocks in class PointingBlocksSlicepublic PointingBlocksSlice getAllBlocksOfType(java.lang.String blockType)
getAllBlocksOfType in interface PointingBlockSetInterfacegetAllBlocksOfType in class PointingBlocksSliceblockType - type of blocks to search forpublic PointingBlock[] getAllSlews()
public PointingBlocksSlice getAllBlocksOfVstp(int vstp)
public int[] getVstpNumbers()
public PointingBlocksSlice[] getAllSlices()
public PointingBlocksSlice getSlice(int number)
protected void hardSetSlice(PointingBlocksSlice slice)
public void setSlice(PointingBlocksSlice slice)
public PointingBlocksSlice getAllBlocksOfInstrument(java.lang.String instrument)