Example #1
0
 public void endTag(String localname, StringBuffer content) throws SAXException {
   Map<String, String> attributes = attr.get(localname);
   if (localname.equals("ra")) {
     this.ra = StringConvertable.ANGLE.fromString(content.toString(), attributes);
   } else if (localname.equals("dec")) {
     this.dec = StringConvertable.ANGLE.fromString(content.toString(), attributes);
   } else if (localname.equals("position_epoch")) {
     this.epoch = StringConvertable.STRING.fromString(content.toString(), attributes);
   } else if (localname.equals("possition_error")) {
     this.error = StringConvertable.DOUBLE.fromString(content.toString(), attributes);
   } else if (localname.equals("start_coordinate")) {
     PsrxmlCoordinate coord = new PsrxmlCoordinate(new RA(ra), new Dec(dec));
     coord.setEpoch(epoch);
     coord.setError(error);
     psrxml.setStartCoordinate(coord);
   } else if (localname.equals("end_coordinate")) {
     PsrxmlCoordinate coord = new PsrxmlCoordinate(new RA(ra), new Dec(dec));
     coord.setEpoch(epoch);
     coord.setError(error);
     psrxml.setEndCoordinate(coord);
   } else if (localname.equals("requested_coordinate")) {
     PsrxmlCoordinate coord = new PsrxmlCoordinate(new RA(ra), new Dec(dec));
     coord.setEpoch(epoch);
     coord.setError(error);
     psrxml.setRequestedCoordinate(requestedCoordinate);
   }
 }