public class Por extends AbstractXmlMapContext implements SequenceTimelineInterface
Constructor and Description |
---|
Por() |
Modifier and Type | Method and Description |
---|---|
void |
addSequence(SequenceInterface sequence)
Add a sequence to the timeline
|
protected void |
calculateValidity() |
Por |
copy() |
AbstractSequence[] |
findOverlapingSequences(java.util.Date startDate,
java.util.Date endDate)
get all sequences with execution date in range of dates
|
java.lang.String |
getFileName()
Get the file name where this object is or will be stored
|
java.util.Date |
getGenerationDate()
Get the genration date of the POR
|
java.lang.String |
getGenerationTime()
Get teh generation date of the POR as string in DOY format (yyyy-D'T'HH:mm:ss.SSS'Z')
|
String1d |
getInitDataStore()
In the case that the POR has been loaded form an ITL, get the itl lines to init the data store
|
String1d |
getInitMemory()
In the case that the POR has been loaded form an ITL, get the itl lines to init the memory
|
String1d |
getInitModes()
In the case that the POR has been loaded form an ITL, get the itl lines to init the modes
|
String1d |
getInitMS()
In the case that the POR has been loaded form an ITL, get the itl lines to init the MS
|
java.lang.String |
getName()
Get the name of the timeline
|
AbstractSequence[] |
getOrderedSequences()
Get all sequences in this timeline in execution time order
|
java.lang.String |
getPath()
Get the path where this object is or will be stored
|
Por |
getPORforInstrument(java.lang.String instrument)
Get a POR with the sequences for a given instrument
|
AbstractSequence |
getSequenceBefore(java.util.Date date)
Get all sequences before a date
|
AbstractSequence[] |
getSequences()
Get the sequences in this timeline
|
AbstractSequence[] |
getSequencesForDate(java.util.Date date)
Get the sequences with a given execution date
|
Por |
getSubPor(java.util.Date startDate,
java.util.Date endDate)
Get a subpor with all sequences from a date to a date
|
Por |
getSubPor(java.lang.String instrument)
Get a subpor with all sequences from a given instrument
|
java.util.Date[] |
getValidityDates()
Get the validity dates for this POR
|
java.lang.String[] |
getValidityTimes()
Get the validity dates for this POR as strings in DOY format (yyyy-D'T'HH:mm:ss.SSS'Z')
|
java.lang.String |
getVersion()
Get the version of the POR
|
java.lang.String |
getXmlData()
Get the XML text representing this object
|
protected org.w3c.dom.Document |
getXMLDocument() |
protected AbstractSequence[] |
insertInOrder(AbstractSequence[] arr,
AbstractSequence newSeq) |
protected AbstractSequence[] |
insertSequenceAt(AbstractSequence[] arr,
AbstractSequence newSeq,
int index) |
void |
regenerate(Por por)
Regenerate a POR form another oen.
|
void |
removeAllSequences()
Remove all sequences form the POR
|
void |
removeSequence(SequenceInterface sequence)
Remove a sequence from the POR.
|
void |
save()
Save this object into a file.
|
void |
saveAs(java.lang.String file)
Save this object into a file with the give file name
|
void |
setCalculateValidity(boolean recalcualte)
Set it to True if the validity of the POR should be recalculated for any new sequence added or false otherwise
|
void |
setFileName(java.lang.String newFileName)
Set the file name where this object is or will be stored
|
void |
setGenerationDate(java.util.Date date)
Set the generation date of a POR
|
void |
setGenerationTime(java.lang.String time)
Set the generation date of the POR as String in DOY format (yyyy-D'T'HH:mm:ss.SSS'Z')
|
void |
setInitDataStore(String1d ims)
In the case that the POR has been loaded form an ITL, set the itl lines to init the data store
|
void |
setInitMemory(String1d ims)
In the case that the POR has been loaded form an ITL, set the itl lines to init the memory
|
void |
setInitModes(String1d im)
In the case that the POR has been loaded form an ITL, set the itl lines to init the modes
|
void |
setInitMS(String1d ims)
In the case that the POR has been loaded form an ITL, set the itl lines to init the MS
|
void |
setName(java.lang.String name)
Set the name of the timeline
|
void |
setPath(java.lang.String path)
Set the path where this object is or will be stored
|
void |
setSequences(SequenceInterface[] porSequences)
Remove any sequences to this timeline and add the given sequences
|
void |
setValidityDates(java.util.Date[] dates)
Set the validity dates for this POR.
|
void |
setValidityTimes(java.lang.String[] times)
Set the validity dates for this POR as strings in DOY format (yyyy-D'T'HH:mm:ss.SSS'Z')
|
void |
setVersion(java.lang.String version)
Set the version of the POR
|
void |
setXmlData(java.lang.String data)
Set the XML text representing this object
|
java.lang.String |
toXml()
Get a XML representation of this timeline
|
public Por copy()
public String1d getInitModes()
public String1d getInitMS()
public String1d getInitMemory()
public String1d getInitDataStore()
public void setInitModes(String1d im)
im
- public void setInitMS(String1d ims)
ims
- public void setInitMemory(String1d ims)
ims
- public void setInitDataStore(String1d ims)
ims
- public void setName(java.lang.String name)
SequenceTimelineInterface
setName
in interface SequenceTimelineInterface
public void setPath(java.lang.String path)
XmlDataInterface
setPath
in interface XmlDataInterface
public java.lang.String getName()
SequenceTimelineInterface
getName
in interface SequenceTimelineInterface
public void setVersion(java.lang.String version)
version
- public java.lang.String getVersion()
public java.lang.String getPath()
XmlDataInterface
getPath
in interface XmlDataInterface
public void addSequence(SequenceInterface sequence)
SequenceTimelineInterface
addSequence
in interface SequenceTimelineInterface
public void removeSequence(SequenceInterface sequence)
sequence
- public void removeAllSequences()
public void regenerate(Por por)
por
- public void setCalculateValidity(boolean recalcualte)
recalcualte
- protected void calculateValidity()
public AbstractSequence[] getSequencesForDate(java.util.Date date)
SequenceTimelineInterface
getSequencesForDate
in interface SequenceTimelineInterface
public Por getSubPor(java.util.Date startDate, java.util.Date endDate)
startDate
- endDate
- public Por getSubPor(java.lang.String instrument)
instrument
- public AbstractSequence[] findOverlapingSequences(java.util.Date startDate, java.util.Date endDate)
startDate
- endDate
- public void setGenerationDate(java.util.Date date)
date
- public void setGenerationTime(java.lang.String time) throws java.text.ParseException
time
- java.text.ParseException
public java.util.Date getGenerationDate()
public java.lang.String getGenerationTime()
public java.util.Date[] getValidityDates()
public void setValidityDates(java.util.Date[] dates)
dates
- n array of size 2 where the element 0 is the start date and element 1 is the end datepublic void setValidityTimes(java.lang.String[] times) throws java.text.ParseException
times
- an array of size 2 where the element 0 is the start date and element 1 is the end datejava.text.ParseException
public java.lang.String[] getValidityTimes()
public void setSequences(SequenceInterface[] porSequences)
SequenceTimelineInterface
setSequences
in interface SequenceTimelineInterface
public AbstractSequence[] getSequences()
SequenceTimelineInterface
getSequences
in interface SequenceTimelineInterface
protected org.w3c.dom.Document getXMLDocument() throws javax.xml.parsers.ParserConfigurationException
javax.xml.parsers.ParserConfigurationException
public java.lang.String toXml()
SequenceTimelineInterface
toXml
in interface SequenceTimelineInterface
public AbstractSequence[] getOrderedSequences()
SequenceTimelineInterface
getOrderedSequences
in interface SequenceTimelineInterface
protected AbstractSequence[] insertInOrder(AbstractSequence[] arr, AbstractSequence newSeq)
protected AbstractSequence[] insertSequenceAt(AbstractSequence[] arr, AbstractSequence newSeq, int index)
public AbstractSequence getSequenceBefore(java.util.Date date)
SequenceTimelineInterface
getSequenceBefore
in interface SequenceTimelineInterface
public Por getPORforInstrument(java.lang.String instrument)
instrument
- public java.lang.String getXmlData()
XmlDataInterface
getXmlData
in interface XmlDataInterface
public void setFileName(java.lang.String newFileName)
XmlDataInterface
setFileName
in interface XmlDataInterface
public java.lang.String getFileName()
XmlDataInterface
getFileName
in interface XmlDataInterface
public void setXmlData(java.lang.String data)
XmlDataInterface
setXmlData
in interface XmlDataInterface
public void saveAs(java.lang.String file) throws java.io.FileNotFoundException, java.io.UnsupportedEncodingException
XmlDataInterface
saveAs
in interface XmlDataInterface
file
- Complete path where to save the filejava.io.FileNotFoundException
java.io.UnsupportedEncodingException
public void save() throws java.io.FileNotFoundException, java.io.UnsupportedEncodingException
XmlDataInterface
save
in interface XmlDataInterface
java.io.FileNotFoundException
java.io.UnsupportedEncodingException