|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.nrao.sss.model.project.scan.ScanLoopElement edu.nrao.sss.model.project.scan.Scan edu.nrao.sss.model.project.scan.PointingScan
public class PointingScan
A scan that holds a list of pointing positions
.
CVS Info:
$Revision: 161 $ |
$Date: 2006-12-15 11:48:34 -0700 (Fri, 15 Dec 2006) $ |
$Author: btruitt $ |
Field Summary |
---|
Fields inherited from class edu.nrao.sss.model.project.scan.Scan |
---|
DEFAULT_NAME |
Fields inherited from interface edu.nrao.sss.util.Identifiable |
---|
UNIDENTIFIED |
Fields inherited from interface edu.nrao.sss.model.UserAccountable |
---|
NULL_USER_ID |
Method Summary | |
---|---|
PointingScan |
clone()
Returns a pointing scan that is a copy of this one. |
static PointingScan |
create(ScanMode scanMode,
String nameOfStandardPattern,
TimeDuration timeAtPosition)
Creates a new pointing scan based on the given pattern name. |
boolean |
equals(Object o)
Returns true if o is equal to this pointing scan. |
static PointingScan |
fromXml(Reader reader)
Creates a new scan based on the XML data read from reader . |
static PointingScan |
fromXml(String xmlFile)
Creates a new scan from the XML data in the given file. |
CelestialCoordinateSystem |
getCoordinateSystem()
Returns the coordinate system for this scan. |
static SortedSet<String> |
getNamesOfStandardPatterns()
Returns the names of NRAO's standard pointing patterns. |
List<PointingPosition> |
getPositions()
Returns the list of pointing positions held by this scan. |
PositionType |
getPositionType()
Returns the type of positions contained by this scan. |
int |
hashCode()
Returns a hash code value for this scan loop element. |
void |
setCoordinateSystem(CelestialCoordinateSystem system)
Sets the coordinate system for this scan. |
void |
setPositions(List<PointingPosition> replacementList)
Sets the list of pointing positions held by this scan. |
void |
setPositions(String nameOfStandardPattern,
TimeDuration timeAtPosition)
Replaces this scan's list of positions with a list based on the given pattern. |
void |
setPositionType(PositionType posType)
Sets the type of positions contained by this scan. |
String |
toSummaryString()
Returns a short textual description of this scan loop element. |
Methods inherited from class edu.nrao.sss.model.project.scan.ScanLoopElement |
---|
appendComments, getComments, getCreatedBy, getCreatedOn, getId, getLastUpdatedBy, getLastUpdatedOn, getName, getProgramBlock, getProject, getSchedulingBlock, hasSchedulingBlock, setComments, setCreatedBy, setCreatedOn, setId, setLastUpdatedBy, setLastUpdatedOn, setName, setSchedulingBlock, toString, toXml, writeAsXmlTo |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public void setPositions(String nameOfStandardPattern, TimeDuration timeAtPosition)
timeAtPosition
. If the name is
not recognized this scan will contain an empty list of positions.
Side Effects:
nameOfStandardPattern
- the name of a standard NRAO pointing pattern.timeAtPosition
- the amount of time to spend at each position in the
pattern. A null value will be treated as a
duration of zero length.getNamesOfStandardPatterns()
public void setPositions(List<PointingPosition> replacementList)
replacementList
will be interpreted
as a new empty list.
This scan will hold a reference to replacementList
(unless it is null), so any changes made to the list
after calling this method will be reflected in this object.
replacementList
- a list of pointing positions to be held by this
scan.public List<PointingPosition> getPositions()
The returned list is the actual list held by this scan, so changes made to the list will be reflected in this object.
public void setPositionType(PositionType posType)
If posType
is null, it will be iterpreted as
PositionType.OFFSET
.
posType
- the type of positions contained by this scan.public PositionType getPositionType()
setPositionType(PositionType)
for details.
public void setCoordinateSystem(CelestialCoordinateSystem system)
If system
is null, it will be iterpreted as
the default coordinate system.
system
- the coordinate system for this scan.public CelestialCoordinateSystem getCoordinateSystem()
setCoordinateSystem(CelestialCoordinateSystem)
for
details.
public String toSummaryString()
ScanLoopElement
toSummaryString
in class Scan
public static PointingScan fromXml(String xmlFile) throws JAXBException, XMLStreamException, FileNotFoundException
xmlFile
- the name of an XML file. This method will attempt to locate
the file by using Class.getResource(String)
.
FileNotFoundException
- if the XML file cannot be found.
JAXBException
- if the schema file used (if any) is malformed, if
the XML file cannot be read, or if the XML file is not
schema-valid.
XMLStreamException
- if there is a problem opening the XML file,
if the XML is not well-formed, or for some other
"unexpected processing conditions".public static PointingScan fromXml(Reader reader) throws JAXBException, XMLStreamException
reader
.
reader
- the source of the XML data.
If this value is null, null is returned.
reader
.
XMLStreamException
- if the XML is not well-formed,
or for some other "unexpected processing conditions".
JAXBException
- if anything else goes wrong during the
transformation.public PointingScan clone()
The returned scan is, for the most part, a deep copy of this one.
However, there are a few exceptions noted in the
clone method
of this class's parent.
If anything goes wrong during the cloning procedure,
a RuntimeException
will be thrown.
clone
in class Scan
public boolean equals(Object o)
o
is equal to this pointing scan.
In order for o
to be equal to this scan, it must have
equal pointing positions in the same order as those of this scan.
It must also follow the rules set forth in the
equals method
of this class's parent.
equals
in class Scan
public int hashCode()
ScanLoopElement
hashCode
in class Scan
public static SortedSet<String> getNamesOfStandardPatterns()
public static PointingScan create(ScanMode scanMode, String nameOfStandardPattern, TimeDuration timeAtPosition)
timeAtPosition
. If the name is
not recognized the returned scan will contain no positions.
scanMode
- the observation mode for which a scan is desired.nameOfStandardPattern
- the name of a standard NRAO pointing pattern.timeAtPosition
- the amount of time to spend at each position in the
pattern. A null value will be treated as a
duration of zero length.
getNamesOfStandardPatterns()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |