|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.aerith.misao.xml.IONode | +--net.aerith.misao.xml.relaxer.XmlStar | +--net.aerith.misao.xml.XmlStar
The XmlStar
is an application side implementation
of the class that the relaxer generated automatically.
It keeps a list of Star
objects, instead of a list of
XmlRecord
objects. After reading the XML file, all the
XmlRecord
objects are converted into the Star
objects and deleted, by the masticateXml method. Before
saving in the XML file, the Star
objects are converted
into the XmlRecord
objects by the composeXml
method. This will reduce the memory assumption.
Note that the list of star objects must not contain MergedStar
.
Field Summary | |
protected java.util.Vector |
stars
The list of star objects. |
Fields inherited from class net.aerith.misao.xml.relaxer.XmlStar |
name,
parentRNode,
rContext,
record |
Constructor Summary | |
XmlStar()
Constructs an XmlStar . |
Method Summary | |
void |
addStar(Star star)
Adds a star object. |
private void |
addXmlData(Star star)
Creates a Record of the specified star and adds
to the array. |
void |
composeXml()
Composes the internal star data into the XML data. |
boolean |
contains(Star star)
Returns true if this contains the specified star object. |
void |
deleteRecord(Star star)
Deletes the specified star object. |
void |
deleteXml()
Deletes the XML data. |
java.util.Vector |
getAllRecords()
Gets all the record contained in this star. |
java.lang.String[] |
getAllVsnetNames()
Gets all the names of this star in a format for the VSNET (Variable Star Network). |
int |
getNumber()
Gets the number in the type. |
Star[] |
getRecords(java.lang.String class_name)
Gets the array of records of the specified catalog star class. |
StarImage |
getStarImage()
Gets the record of the detected star image. |
java.lang.String |
getType()
Gets the type. |
Position |
getTypicalPosition()
Gets the typical (x,y) position of this star. |
java.lang.String |
getTypicalVsnetName(java.util.Vector catalog_list)
Gets the typical name of this star in a format for the VSNET (Variable Star Network). |
void |
masticateXml()
masticates the XML data into the internal star data. |
void |
setName(java.lang.String type,
int number)
Sets the name. |
void |
write(java.io.Writer out)
Writes this XML document to the specified writer. |
private void |
writeStar(java.io.Writer out,
Star star)
Writes the XML document of the specified star to the specified writer. |
Methods inherited from class net.aerith.misao.xml.relaxer.XmlStar |
addRecord,
getName,
getParentRNode,
getRContext,
getRContextResolved,
getRecord,
getRNodes,
init,
isMatch,
isMatch,
isMatchHungry,
makeElement,
setName,
setParentRNode,
setRContext,
setRecord,
setup,
setup,
setup |
Methods inherited from class net.aerith.misao.xml.IONode |
read,
read,
translateFrom,
translateTo,
write |
Methods inherited from class java.lang.Object |
|
Field Detail |
protected java.util.Vector stars
Constructor Detail |
public XmlStar()
XmlStar
.Method Detail |
public java.lang.String getType()
public int getNumber()
public void setName(java.lang.String type, int number)
type
- the type of the star.number
- the number of the star.public void addStar(Star star)
star
- the star to add.public java.lang.String getTypicalVsnetName(java.util.Vector catalog_list)
catalog_list
- the list of valid catalog names.public java.lang.String[] getAllVsnetNames()
public StarImage getStarImage()
public Star[] getRecords(java.lang.String class_name)
class_name
- the name of the catalog star class.public void deleteRecord(Star star)
star
- the star object to be deleted.public java.util.Vector getAllRecords()
public boolean contains(Star star)
star
- the star object.public Position getTypicalPosition()
The position is decided in the following order of priority.
public void masticateXml()
public void composeXml()
private void addXmlData(Star star)
Record
of the specified star and adds
to the array.star
- the star.public void deleteXml()
public void write(java.io.Writer out) throws java.io.IOException
out
- the writer.private void writeStar(java.io.Writer out, Star star) throws java.io.IOException
out
- the writer.star
- the star.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |