net.aerith.misao.xml
Class XmlData

java.lang.Object
  |
  +--net.aerith.misao.xml.IONode
        |
        +--net.aerith.misao.xml.relaxer.XmlData
              |
              +--net.aerith.misao.xml.XmlData

public class XmlData
extends XmlData

The XmlData is an application side implementation of the class that the relaxer generated automatically.

In order to reduce the memory assumption, all the star data are converted into the internal data by masticateXml method after reading the XML file, and restored into the XML data by composeXml method.

This object has a PositionMap of stars for the fast search based on the (x,y) position.

See Also:
Serialized Form

Inner Class Summary
protected  class XmlData.StarPosition
          The StarPosition is a wrapper class to add a star object to the PositionMap.
 
Field Summary
protected  PositionMap map
          The map of stars.
 
Fields inherited from class net.aerith.misao.xml.relaxer.XmlData
parentRNode, rContext, star
 
Constructor Summary
XmlData()
           
 
Method Summary
 void composeXml()
          Composes the internal star data into the XML data.
 void createStarMap(Size size)
          Creates the map of stars.
 void deleteXml()
          Deletes the XML data.
 java.util.Vector extractPairs(AstrometrySetting setting)
          Gets the list of pairs which satisfy the specified astrometry setting.
 java.util.Vector extractPairs(PhotometrySetting setting)
          Gets the list of pairs which satisfy the specified photometry setting.
 java.util.Vector getAstrometrySupportedCatalogList()
          Gets the list of identified catalog names which supports the astrometry.
 java.util.Vector getIdentifiedCatalogList()
          Gets the list of identified catalog names.
 java.util.Vector getMagnitudeSupportedCatalogList()
          Gets the list of identified catalog names which contains the magnitude data.
 java.util.Vector getPhotometrySupportedCatalogList()
          Gets the list of identified catalog names which supports the regular photometry.
 XmlStar getStar(Star star)
          Gets the star which contains the specified star object.
 XmlStar getStar(java.lang.String name)
          Gets the star of the name.
 int getStarCount()
          Gets the number of stars.
 java.util.Vector getStarListAround(Position position, double search_radius)
          Gets the list of stars around the specified position.
 void masticateXml()
          masticates the XML data into the internal star data.
 
Methods inherited from class net.aerith.misao.xml.relaxer.XmlData
addStar, getParentRNode, getRContext, getRContextResolved, getRNodes, getStar, init, isMatch, isMatch, isMatchHungry, makeElement, setParentRNode, setRContext, setStar, setup, setup, setup
 
Methods inherited from class net.aerith.misao.xml.IONode
read, read, translateFrom, translateTo, write, write
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

map

protected PositionMap map
The map of stars.
Constructor Detail

XmlData

public XmlData()
Method Detail

getStarCount

public int getStarCount()
Gets the number of stars. Note that this method takes very long time, so it must not be used in the loop or loop terminating condition.
Returns:
the number of stars.

createStarMap

public void createStarMap(Size size)
Creates the map of stars.
Parameters:
size - the image size.

getStar

public XmlStar getStar(java.lang.String name)
Gets the star of the name.
Parameters:
name - the name.
Returns:
the star.

getStar

public XmlStar getStar(Star star)
Gets the star which contains the specified star object.
Parameters:
star - the star object.
Returns:
the star.

getStarListAround

public java.util.Vector getStarListAround(Position position,
                                          double search_radius)
Gets the list of stars around the specified position.
Parameters:
position - the position.
search_radius - the radius to search.
Returns:
the list of stars within the search area.

extractPairs

public java.util.Vector extractPairs(PhotometrySetting setting)
Gets the list of pairs which satisfy the specified photometry setting.
Parameters:
setting - the setting for photometry.
Returns:
the list of pairs.

extractPairs

public java.util.Vector extractPairs(AstrometrySetting setting)
Gets the list of pairs which satisfy the specified astrometry setting.
Parameters:
setting - the setting for astrometry.
Returns:
the list of pairs.

getIdentifiedCatalogList

public java.util.Vector getIdentifiedCatalogList()
Gets the list of identified catalog names.
Returns:
the list of identified catalog names.

getPhotometrySupportedCatalogList

public java.util.Vector getPhotometrySupportedCatalogList()
Gets the list of identified catalog names which supports the regular photometry.
Returns:
the list of identified catalog names which supports the regular photometry.

getMagnitudeSupportedCatalogList

public java.util.Vector getMagnitudeSupportedCatalogList()
Gets the list of identified catalog names which contains the magnitude data.
Returns:
the list of identified catalog names which contains the magnitude data.

getAstrometrySupportedCatalogList

public java.util.Vector getAstrometrySupportedCatalogList()
Gets the list of identified catalog names which supports the astrometry.
Returns:
the list of identified catalog names which supports the astrometry.

masticateXml

public void masticateXml()
masticates the XML data into the internal star data.

composeXml

public void composeXml()
Composes the internal star data into the XML data.

deleteXml

public void deleteXml()
Deletes the XML data.