Examples of JaxbJobReader


Examples of org.eobjects.analyzer.job.JaxbJobReader

   *            exists
   * @param file
   * @param configuration
   */
  public void openFile(File file) {
    JaxbJobReader reader = new JaxbJobReader(_configuration);
    try {
      AnalysisJobBuilder ajb = reader.create(file);

      openJob(file, ajb);
    } catch (NoSuchDatastoreException e) {
      AnalysisJobMetadata metadata = reader.readMetadata(file);
      int result = JOptionPane.showConfirmDialog(null, e.getMessage()
          + "\n\nDo you wish to open this job as a template?", "Error: " + e.getMessage(),
          JOptionPane.OK_CANCEL_OPTION, JOptionPane.ERROR_MESSAGE);
      if (result == JOptionPane.OK_OPTION) {
        OpenAnalysisJobAsTemplateDialog dialog = new OpenAnalysisJobAsTemplateDialog(_windowContext, _configuration,
View Full Code Here

Examples of org.eobjects.analyzer.job.JaxbJobReader

      }
    }
  }

  private void showFileInformation() {
    JaxbJobReader reader = new JaxbJobReader(_configuration);

    FileInputStream fis = null;
    try {
      fis = new FileInputStream(_file);
      BufferedInputStream bis = new BufferedInputStream(fis);
      _metadata = reader.readMetadata(bis);
    } catch (Exception e) {
      // metadata could not be produced so we cannot display the file
      // information
      logger.warn("An unexpected error occurred reading metadata from file", e);
      setVisible(false);
View Full Code Here

Examples of org.eobjects.analyzer.job.JaxbJobReader

    _openButton = new JButton("Open job");
    _openButton.addActionListener(new ActionListener() {

      @Override
      public void actionPerformed(ActionEvent e) {
        JaxbJobReader reader = new JaxbJobReader(_configuration);
        try {
          SourceColumnMapping sourceColumnMapping = getSourceColumnMapping();

          Map<String, String> variableOverrides = new HashMap<String, String>();
          for (Entry<String, JXTextField> entry : _variableTextFields.entrySet()) {
            variableOverrides.put(entry.getKey(), entry.getValue().getText());
          }

          AnalysisJobBuilder ajb = reader.create(new BufferedInputStream(new FileInputStream(_file)),
              sourceColumnMapping, variableOverrides);
         
          OpenAnalysisJobActionListener openAnalysisJobActionListener = _openAnalysisJobActionListenerProvider.get();
          openAnalysisJobActionListener.openJob(_file, ajb);
         
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.