Package skyview.survey
Class XMLSurvey
- java.lang.Object
-
- skyview.survey.XMLSurvey
-
public class XMLSurvey extends java.lang.Object implements Survey
This class defines a survey based upon an XML file which contains the metadata and image information for the survey.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
XMLSurvey.ImageFinderCallBack
The class the is called to find images in the Survey XML file.
-
Constructor Summary
Constructors Constructor Description XMLSurvey(java.lang.String file)
Create a survey whose characteristics are given in an XML file.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doParse(javax.xml.parsers.SAXParser sp, org.xml.sax.helpers.DefaultHandler handler)
Run a parserjava.lang.String
getDescription()
Get a description of the componentprotected XMLSurvey.ImageFinderCallBack
getFinderCallBack(Position pos, double size, double scale, boolean needImages)
Image[]
getImages(Position pos, double size, double scale)
Find candidate images from this survey.java.util.Map<java.lang.String,java.lang.String>
getMetadata()
Get the metadata for the surveyjava.lang.String
getName()
Get the name of the compontentstatic java.io.Reader
getSurveyReader(java.lang.String file)
Get a buffered reader associated with the survey given a string name.void
updateHeader(nom.tam.fits.Header h)
Update a FITS header with information from the XML filevoid
updateSettings()
Update the system settings
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Get the name of the compontent
-
getDescription
public java.lang.String getDescription()
Get a description of the component- Specified by:
getDescription
in interfaceComponent
-
getImages
public Image[] getImages(Position pos, double size, double scale) throws java.lang.Exception
Find candidate images from this survey.
-
getFinderCallBack
protected XMLSurvey.ImageFinderCallBack getFinderCallBack(Position pos, double size, double scale, boolean needImages)
-
updateHeader
public void updateHeader(nom.tam.fits.Header h)
Update a FITS header with information from the XML file- Specified by:
updateHeader
in interfaceSurvey
-
getMetadata
public java.util.Map<java.lang.String,java.lang.String> getMetadata()
Get the metadata for the survey
-
updateSettings
public void updateSettings()
Update the system settings- Specified by:
updateSettings
in interfaceSurvey
-
doParse
protected void doParse(javax.xml.parsers.SAXParser sp, org.xml.sax.helpers.DefaultHandler handler) throws java.lang.Exception
Run a parser- Throws:
java.lang.Exception
-
getSurveyReader
public static java.io.Reader getSurveyReader(java.lang.String file) throws java.io.IOException
Get a buffered reader associated with the survey given a string name. If the name includes a ? it is assumed that the stream should be filtered.- Throws:
java.io.IOException
-
-