|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.nrao.sss.model.source.SourceImageLink
public class SourceImageLink
A descriptive link to an image of an astronomical source.
CVS Info:
$Revision: 1911 $ |
$Date: 2009-01-21 10:27:48 -0700 (Wed, 21 Jan 2009) $ |
$Author: dharland $ |
Constructor Summary | |
---|---|
SourceImageLink()
Creates a new instance with a phony URL, an unknown polarization, and a frequency of zero GHz. |
|
SourceImageLink(Frequency frequency,
StokesParameter polarization,
URL imageLocation)
|
Method Summary | |
---|---|
void |
appendComments(String additionalComments)
Adds additional comments to those already associated with this link. |
SourceImageLink |
clone()
Returns an image link that is a copy of this one. |
int |
compareTo(SourceImageLink other)
Compares this image link to other for order. |
boolean |
equals(Object o)
Returns true if o is equal to this image link. |
String |
getComments()
Returns free-form text related to this link. |
String |
getDisplayName()
Returns text that may be used for displaying this link. |
Frequency |
getFrequency()
Returns the frequency at which the linked image was observed. |
URL |
getImageLocation()
Returns the URL for this image. |
StokesParameter |
getPolarization()
Returns the polarization of this SourceImageLink.java. |
int |
hashCode()
Returns a hash code value for this image link. |
void |
setComments(String replacementComments)
Stores free-form text related to this link. |
void |
setDisplayName(String newName)
Sets the display name for this link. |
void |
setFrequency(Frequency newFrequency)
Sets the frequency at which the linked image was observed. |
void |
setImageLocation(URL imageLocation)
Sets the URL for this image. |
void |
setPolarization(StokesParameter newPolarization)
Sets the polarization for which the linked image was observed. |
String |
toHtmlAnchor()
Returns a string in the form <a href="getImageLocation().toString()">getDisplayName()</a> |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SourceImageLink()
public SourceImageLink(Frequency frequency, StokesParameter polarization, URL imageLocation)
frequency
- the frequency at which the linked image was observed.
If this parameter is null,
a new frequency of zero GHz will be used.polarization
- the polarization for which the linked image was
observed. If this parameter is null,
a default polarization will be used.imageLocation
- the URL for the image.
If this parameter is null,
a phony non-null URL will be used.Method Detail |
---|
public void setFrequency(Frequency newFrequency)
newFrequency
- the frequency at which the linked image was observed.
If this parameter is null,
a new frequency of zero GHz will be used.public Frequency getFrequency()
public void setPolarization(StokesParameter newPolarization)
newPolarization
- the polarization for which the linked image was
observed. If this parameter is null,
a default polarization will be used.public StokesParameter getPolarization()
public void setComments(String replacementComments)
replacementComments
- free-form text related to this link.
These comments replace all previously set comments.
A null value will be replaced by the empty string (""}).appendComments(String)
public void appendComments(String additionalComments)
additionalComments
- new, additional, comments for this link.setComments(String)
public String getComments()
See setComments(String)
for the typical use
of this property.
public void setImageLocation(URL imageLocation)
imageLocation
- the URL for the image.
If this parameter is null,
a phony non-null URL will be used.public URL getImageLocation()
public void setDisplayName(String newName)
newName
- the display name for this link. If this value is
null, a non-null default name is used in its
place.public String getDisplayName()
public String toHtmlAnchor()
public SourceImageLink clone()
If anything goes wrong during the cloning procedure,
a RuntimeException
will be thrown.
clone
in class Object
public boolean equals(Object o)
o
is equal to this image link.
equals
in class Object
public int hashCode()
hashCode
in class Object
public int compareTo(SourceImageLink other)
other
for order.
One link is deemed to be "less than" the other if its frequency is lower than that of the other. In the case that two links are for the same frequency, the polarization is used as a tie-breaker. If these are the same, the text of the image location URL is the final tie-breaker. The comments are not compared.
compareTo
in interface Comparable<SourceImageLink>
other
- the image link to which this one is compared.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |