Package org.dspace.content.packager

Examples of org.dspace.content.packager.PackageDisseminator.disseminate()


            DSpaceObject dso = HandleManager.resolveToObject(context,
                    itemHandle);
            if (dso == null)
                throw new IllegalArgumentException("Bad Item handle -- "
                        + "Cannot resolve handle \"" + itemHandle);
            dip.disseminate(context, dso, pkgParams, dest);
        }
    }
}
View Full Code Here


            pparams.put("manifestOnly", "true");

            // "pipe" the output into a parser to create JDOM document.
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            Context context = new Context();
            dip.disseminate(context, item, pparams, baos);
            ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());

            try
            {
                SAXBuilder builder = new SAXBuilder();
View Full Code Here

        {
            try
            {
                PackageParameters pparams = PackageParameters.create(this.request);
                this.response.setContentType(dip.getMIMEType(pparams));
                dip.disseminate(this.context, this.item, pparams, this.response
                        .getOutputStream());
            }
            catch (CrosswalkException pe)
            {
                throw new DAVStatusException(
View Full Code Here

            throw new InvalidHandleException("Unable to resolve handle " + handle);
        }

        try
        {
            dip.disseminate(context, dso, pkgParams, file);
        }
        catch (Exception e)
        {
            log.error("Error creating package", e);
            throw new PackagerException("Error creating package", e);
View Full Code Here

                tempFile.deleteOnExit();

                // Disseminate item to temporary file
                PackageParameters pparams = PackageParameters.create(this.request);
                this.response.setContentType(dip.getMIMEType(pparams));
                dip.disseminate(this.context, this.item, pparams, tempFile);

                // Copy temporary file contents to response stream
                FileInputStream fileIn = null;
                try
                {
View Full Code Here

                pparams = new PackageParameters();
            }

            //actually disseminate to our temp file.
            Context context = new Context();
            dip.disseminate(context, dso, pparams, tempFile);
            context.complete();
           
            // if we ended up with a Zero-length output file,
            // this means dissemination was successful but had no results
            if(tempFile.exists() && tempFile.length()==0)
View Full Code Here

            File tempFile = File.createTempFile("METSDissemination" + dso.hashCode(), null, new File(tempDirectory));
            tempFile.deleteOnExit();

            // Disseminate METS to temp file
            Context context = new Context();
            dip.disseminate(context, dso, pparams, tempFile);
            context.complete();

            try
            {
                //Return just the root Element of the METS file
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.