Package uk.gov.nationalarchives.droid.profile

Examples of uk.gov.nationalarchives.droid.profile.FilterSpecDao


        int result = filterFileChooser.showOpenDialog(this);
        if (result == JFileChooser.APPROVE_OPTION) {
            //FIXME: should wire this up using spring, rather than hard coding references to
            // particular objects here.
            try {
                FilterSpecDao reader = new JaxbFilterSpecDao();
                FileInputStream in = new FileInputStream(filterFileChooser.getSelectedFile());
                filterContext = reader.loadFilter(in);
                in.close();
                loadFilter();
            } catch (JAXBException e) {
                JOptionPane.showMessageDialog(this, "There was a problem loading the filter.", "Filter warning", JOptionPane.ERROR_MESSAGE);
            } catch (FileNotFoundException e) {
View Full Code Here


            int result = filterFileChooser.showSaveDialog(this);
            if (result == JFileChooser.APPROVE_OPTION) {
                FileOutputStream out;
                try {
                    out = new FileOutputStream(filterFileChooser.getSelectedFile());
                    FilterSpecDao writer = new JaxbFilterSpecDao();
                    writer.saveFilter(filterContext, out);
                    out.close();
                } catch (FileNotFoundException e) {
                    JOptionPane.showMessageDialog(this, "There was a problem saving the filter.", "Filter warning", JOptionPane.ERROR_MESSAGE);
                } catch (JAXBException e) {
                    JOptionPane.showMessageDialog(this, "There was a problem saving the filter.", "Filter warning", JOptionPane.ERROR_MESSAGE);
View Full Code Here

TOP

Related Classes of uk.gov.nationalarchives.droid.profile.FilterSpecDao

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.