Package org.fcrepo.client

Examples of org.fcrepo.client.ObjectFormatDialog


                int returnVal =
                        browse.showOpenDialog(Administrator.getDesktop());
                if (returnVal == JFileChooser.APPROVE_OPTION) {
                    File file = browse.getSelectedFile();
                    Administrator.setLastDir(file.getParentFile());
                    ObjectFormatDialog fmtDialog =
                            new ObjectFormatDialog("Select XML Format of Ingest File(s)");
                    if (fmtDialog.getSelection() != null) {
                        String ingestFormat = fmtDialog.getSelection();
                        String pid =
                                Ingest.oneFromFile(file,
                                                   ingestFormat,
                                                   Administrator.APIA,
                                                   Administrator.APIM,
                                                   null);
                        JOptionPane.showMessageDialog(Administrator
                                .getDesktop(), "Ingest succeeded.  PID='" + pid
                                + "'.");
                    }
                }
            } else if (kind == MULTI_FROM_DIR) {
                wasMultiple = true;
                JFileChooser browse =
                        new JFileChooser(Administrator.getLastDir());
                browse.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
                int returnVal =
                        browse.showOpenDialog(Administrator.getDesktop());
                if (returnVal == JFileChooser.APPROVE_OPTION) {
                    File file = browse.getSelectedFile();
                    Administrator.setLastDir(file);;
                    logRootName = "ingest-from-dir";
                    logFile = IngestLogger.newLogFile(logRootName);
                    log =
                            new PrintStream(new FileOutputStream(logFile),
                                            true,
                                            "UTF-8");
                    IngestLogger.openLog(log, logRootName);
                    long st = System.currentTimeMillis();
                    ObjectFormatDialog fmtDialog =
                            new ObjectFormatDialog("Select XML Format of Ingest File(s)");
                    if (fmtDialog.getSelection() != null) {
                        String ingestFormat = fmtDialog.getSelection();
                        Ingest.multiFromDirectory(file,
                                                  ingestFormat,
                                                  Administrator.APIA,
                                                  Administrator.APIM,
                                                  null,
View Full Code Here

TOP

Related Classes of org.fcrepo.client.ObjectFormatDialog

Copyright © 2018 www.massapicom. 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.