Package org.dspace.app.bulkedit

Examples of org.dspace.app.bulkedit.MetadataExport


           
            ArrayList itemmd = new ArrayList();
            if(dso.getType() == Constants.ITEM)
            {
               itemmd.add(dso.getID());
               exporter = new MetadataExport(context, new ItemIterator(context, itemmd),true);
            }
            else if(dso.getType() == Constants.COLLECTION)
            {
               Collection collection = (Collection)dso;
               ItemIterator toExport = collection.getAllItems();
               exporter = new MetadataExport(context, toExport,true);
            }
            else if(dso.getType() == Constants.COMMUNITY)
            {
               exporter = new MetadataExport(context, (Community)dso, false);
            }

            log.info(LogManager.getHeader(context, "metadataexport", "exporting_handle:" + handle));
            csv = exporter.export();
            filename = handle.replaceAll("/", "-") + ".csv";
View Full Code Here


            HttpServletResponse response) throws ServletException, IOException,
            SQLException, AuthorizeException
    {
        // Get the handle requested for the export
        String handle = request.getParameter("handle");
        MetadataExport exporter = null;
        if (handle != null)
        {
            log.info(LogManager.getHeader(context, "metadataexport", "exporting_handle:" + handle));
            DSpaceObject thing = HandleManager.resolveToObject(context, handle);
            if (thing != null)
            {
                if (thing.getType() == Constants.ITEM)
                {
                    ArrayList item = new ArrayList();
                    item.add(thing.getID());
                    exporter = new MetadataExport(context, new ItemIterator(context, item), false);
                }
                else if (thing.getType() == Constants.COLLECTION)
                {
                    Collection collection = (Collection)thing;
                    ItemIterator toExport = collection.getAllItems();
                    exporter = new MetadataExport(context, toExport, false);
                }
                else if (thing.getType() == Constants.COMMUNITY)
                {
                    exporter = new MetadataExport(context, (Community)thing, false);
                }

                // Perform the export
                DSpaceCSV csv = exporter.export();

                // Return the csv file
                response.setContentType("text/csv; charset=UTF-8");
                String filename = handle.replaceAll("/", "-") + ".csv";
                response.setHeader("Content-Disposition", "attachment; filename=" + filename);
View Full Code Here

            for (BrowseItem bi : binfo.getBrowseItemResults())
            {
                iids.add(bi.getID());
            }
            ItemIterator ii = new ItemIterator(context, iids);
            MetadataExport exporter = new MetadataExport(context, ii, false);

            // Perform the export
            DSpaceCSV csv = exporter.export();

            // Return the csv file
            response.setContentType("text/csv; charset=UTF-8");
            response.setHeader("Content-Disposition", "attachment; filename=browse-result.csv");
            PrintWriter out = response.getWriter();
View Full Code Here

        for (Item item : items)
        {
            iids.add(item.getID());
        }
        ItemIterator ii = new ItemIterator(context, iids);
        MetadataExport exporter = new MetadataExport(context, ii, false);

        // Perform the export
        DSpaceCSV csv = exporter.export();

        // Return the csv file
        response.setContentType("text/csv; charset=UTF-8");
        response.setHeader("Content-Disposition", "attachment; filename=search-results.csv");
        PrintWriter out = response.getWriter();
View Full Code Here

           
            java.util.List<Integer> itemmd = new ArrayList<Integer>();
            if(dso.getType() == Constants.ITEM)
            {
               itemmd.add(dso.getID());
               exporter = new MetadataExport(context, new ItemIterator(context, itemmd), false);
            }
            else if(dso.getType() == Constants.COLLECTION)
            {
               Collection collection = (Collection)dso;
               ItemIterator toExport = collection.getAllItems();
               exporter = new MetadataExport(context, toExport, false);
            }
            else if(dso.getType() == Constants.COMMUNITY)
            {
               exporter = new MetadataExport(context, (Community)dso, false);
            }

            log.info(LogManager.getHeader(context, "metadataexport", "exporting_handle:" + handle));
            csv = exporter.export();
            filename = handle.replaceAll("/", "-") + ".csv";
View Full Code Here

        for (Item item : items)
        {
            iids.add(item.getID());
        }
        ItemIterator ii = new ItemIterator(context, iids);
        MetadataExport exporter = new MetadataExport(context, ii, false);

        // Perform the export
        DSpaceCSV csv = exporter.export();

        // Return the csv file
        response.setContentType("text/csv; charset=UTF-8");
        response.setHeader("Content-Disposition", "attachment; filename=search-results.csv");
        PrintWriter out = response.getWriter();
View Full Code Here

        for (Item item : items)
        {
            iids.add(item.getID());
        }
        ItemIterator ii = new ItemIterator(context, iids);
        MetadataExport exporter = new MetadataExport(context, ii, false);

        // Perform the export
        DSpaceCSV csv = exporter.export();

        // Return the csv file
        response.setContentType("text/csv; charset=UTF-8");
        response.setHeader("Content-Disposition",
                "attachment; filename=search-results.csv");
View Full Code Here

            for (BrowseItem bi : binfo.getBrowseItemResults())
            {
                iids.add(bi.getID());
            }
            ItemIterator ii = new ItemIterator(context, iids);
            MetadataExport exporter = new MetadataExport(context, ii, false);

            // Perform the export
            DSpaceCSV csv = exporter.export();

            // Return the csv file
            response.setContentType("text/csv; charset=UTF-8");
            response.setHeader("Content-Disposition", "attachment; filename=browse-result.csv");
            PrintWriter out = response.getWriter();
View Full Code Here

            HttpServletResponse response) throws ServletException, IOException,
            SQLException, AuthorizeException
    {
        // Get the handle requested for the export
        String handle = request.getParameter("handle");
        MetadataExport exporter = null;
        if (handle != null)
        {
            log.info(LogManager.getHeader(context, "metadataexport", "exporting_handle:" + handle));
            DSpaceObject thing = HandleManager.resolveToObject(context, handle);
            if (thing != null)
            {
                if (thing.getType() == Constants.ITEM)
                {
                    List<Integer> item = new ArrayList<Integer>();
                    item.add(thing.getID());
                    exporter = new MetadataExport(context, new ItemIterator(context, item), false);
                }
                else if (thing.getType() == Constants.COLLECTION)
                {
                    Collection collection = (Collection)thing;
                    ItemIterator toExport = collection.getAllItems();
                    exporter = new MetadataExport(context, toExport, false);
                }
                else if (thing.getType() == Constants.COMMUNITY)
                {
                    exporter = new MetadataExport(context, (Community)thing, false);
                }

                if (exporter != null)
                {
                    // Perform the export
                    DSpaceCSV csv = exporter.export();

                    // Return the csv file
                    response.setContentType("text/csv; charset=UTF-8");
                    String filename = handle.replaceAll("/", "-") + ".csv";
                    response.setHeader("Content-Disposition", "attachment; filename=" + filename);
View Full Code Here

TOP

Related Classes of org.dspace.app.bulkedit.MetadataExport

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.