Package org.dspace.content.packager

Examples of org.dspace.content.packager.PackageIngester.ingest()


                        + mycollections[i].getMetadata("name"));
            }

            try
            {
                WorkspaceItem wi = sip.ingest(context, mycollections[0],
                        source, pkgParams, null);
                if (useWorkflow)
                {
                    String handle = null;
View Full Code Here


     
      // We don't need to include any parameters
      PackageParameters params = new PackageParameters();
     
      // ingest the item
      WorkspaceItem wsi = pi.ingest(context, collection, is, params, licence);
      if (wsi == null)
      {
        swordService.message("Failed to ingest the package; throwing exception");
        throw new SWORDErrorException(DSpaceSWORDErrorCodes.UNPACKAGE_FAIL, "METS package ingester failed to unpack package");
      }
View Full Code Here

            {
                pis = new CountedInputStream(pis, contentLength);
                log.debug("put: Using CountedInputStream, length="
                        + String.valueOf(contentLength));
            }
            WorkspaceItem wi = sip.ingest(this.context, this.collection, pis,
                    PackageParameters.create(this.request), null);
            WorkflowItem wfi = WorkflowManager.startWithoutNotify(this.context, wi);

            // get new item's location: if workflow completed, then look
            // for handle (but be ready for disappointment); otherwise,
View Full Code Here

            PackageParameters params = PackageParameters.create(this.request);
            // Force package ingester to respect Collection workflows (i.e. start workflow automatically as needed)
            params.setWorkflowEnabled(true);

            //ingest from the temp file to create the new DSpaceObject
            DSpaceObject ingestedDso = sip.ingest(this.context, this.collection, tempFile,
                    params, null);
            Item item = (Item) ingestedDso;

            //schedule temp file for deletion
            tempFile.deleteOnExit();
View Full Code Here

        }

        //Actually call the ingester
        try
        {
            sip.ingest(context, dso, tempFile, pparams, license);
        }
        catch (PackageException e)
        {
            throw new CrosswalkInternalException(e);
        }
View Full Code Here

            // Whether or not to use the collection template
            params.setUseCollectionTemplate(ConfigurationManager.getBooleanProperty("mets.default.ingest.useCollectionTemplate", false));
     
      // ingest the item from the temp file
      DSpaceObject ingestedObject = pi.ingest(context, collection, depositFile, params, licence);
      if (ingestedObject == null)
      {
        swordService.message("Failed to ingest the package; throwing exception");
        throw new SWORDErrorException(DSpaceSWORDErrorCodes.UNPACKAGE_FAIL, "METS package ingester failed to unpack package");
      }
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.