Examples of ObservationReadError


Examples of org.aavso.tools.vstar.exception.ObservationReadError

   *             if the observation has no date or magnitude.
   */
  protected void collectObservation(ValidObservation ob)
      throws ObservationReadError {
    if (ob.getDateInfo() == null) {
      throw new ObservationReadError("Observation #"
          + ob.getRecordNumber() + " has no date.");
    }

    if (ob.getMagnitude() == null) {
      throw new ObservationReadError("Observation #"
          + ob.getRecordNumber() + " has no magnitude.");
    }

    addValidObservation(ob);
    categoriseValidObservation(ob);
View Full Code Here

Examples of org.aavso.tools.vstar.exception.ObservationReadError

      ValidObservation.reset();

      retriever.retrieveObservations();

      if (retriever.getValidObservations().isEmpty()) {
        throw new ObservationReadError(
            "No observations for the specified period or error in observation source.");
      }

      // Create plots, tables.
      NewStarType type = NewStarType.NEW_STAR_FROM_ARBITRARY_SOURCE;
View Full Code Here

Examples of org.aavso.tools.vstar.exception.ObservationReadError

        }
        // TODO: Why am I not updating progress bar here? Need count(*).
        // Consider just using continual progress bar.
      }
    } catch (SQLException e) {
      throw new ObservationReadError(
          "Error when attempting to read observation source.");
    }
  }
View Full Code Here

Examples of org.aavso.tools.vstar.exception.ObservationReadError

                + seriesName);
            urls.add(url);
            seriesList.add(seriesNameToTypeMap.get(seriesName));
          }
        } catch (MalformedURLException e) {
          throw new ObservationReadError("Cannot construct " + kind
              + " URL (reason: " + e.getLocalizedMessage() + ")");
        }
      }
    } else {
      throw new CancellationException();
View Full Code Here

Examples of org.aavso.tools.vstar.exception.ObservationReadError

        if (streams == null || seriesList == null
            || streams.size() != seriesList.size()) {
          // If getURLs() has completed correctly, we should not get
          // to this point.
          throw new ObservationReadError(kind
              + " input stream configuration error.");
        }

        int i = 0;
        for (InputStream stream : streams) {
          retrieveAAVSOPhotometryURLObs(stream, seriesList.get(i));
          i++;
        }
      } catch (IOException e) {
        throw new ObservationReadError(e.getLocalizedMessage());
      }
    }
View Full Code Here

Examples of org.aavso.tools.vstar.exception.ObservationReadError

      String line = reader.readLine();

      while (line != null) {
        if (line
            .contains("An error occured while trying to connect to database")) {
          throw new ObservationReadError("Cannot access " + kind
              + " database.");
        } else if (line.contains("No rows were returned by query")) {
          break;
        } else if (line.startsWith("#")) {
          if (inputName == null) {
View Full Code Here

Examples of org.aavso.tools.vstar.exception.ObservationReadError

      ValidObservation.reset();

      retriever.retrieveObservations();

      if (retriever.getValidObservations().isEmpty()) {
        throw new ObservationReadError(
            "No observations for the specified period or error in observation source.");
      }

      // Create plots, tables.
      NewStarType type = NewStarType.NEW_STAR_FROM_ARBITRARY_SOURCE;
View Full Code Here

Examples of org.aavso.tools.vstar.exception.ObservationReadError

      ValidObservation.reset();

      retriever.retrieveObservations();

      if (retriever.getValidObservations().isEmpty()) {
        throw new ObservationReadError(
            "No observations for the specified period or error in observation source.");
      }

      // Create plots, tables.
      NewStarType type = NewStarType.NEW_STAR_FROM_ARBITRARY_SOURCE;
View Full Code Here

Examples of org.aavso.tools.vstar.exception.ObservationReadError

      textFormatReader.retrieveObservations();

      if (!isCancelled()) {
        if (textFormatReader.getValidObservations().isEmpty()) {
          throw new ObservationReadError(
              "No observations for the specified period or error in observation source.");
        }

        // Try to get the name of the object from one of the
        // observations, otherwise just use the file name.
View Full Code Here

Examples of org.aavso.tools.vstar.exception.ObservationReadError

      starInfo.setRetriever(databaseObsReader);

      updateProgress(2);

      if (databaseObsReader.getValidObservations().isEmpty()) {
        throw new ObservationReadError(
            "No observations for the specified period.");
      }

      Mediator.getUI().getStatusPane().setMessage(
          "Creating charts and tables...");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.