Examples of disseminate()


Examples of org.dspace.content.crosswalk.StreamDisseminationCrosswalk.disseminate()

                            wrapper.setPackagingParameters(params);
                        }

                        // Disseminate crosswalk output to an outputstream
                        ByteArrayOutputStream disseminateOutput = new ByteArrayOutputStream();
                        sxwalk.disseminate(context, dso, disseminateOutput);
                        // Convert output to an inputstream, so we can write to manifest or Zip file
                        ByteArrayInputStream crosswalkedStream = new ByteArrayInputStream(disseminateOutput.toByteArray());

                        //If we are capturing extra files to put into a Zip package
                        if(extraStreams!=null)
View Full Code Here

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

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

            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

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

        {
            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

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

            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

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

                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

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

                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

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

            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.