Package org.dspace.submit.util

Examples of org.dspace.submit.util.ItemSubmissionLookupDTO


        if (submissionDTO == null)
        {
            return STATUS_SUBMISSION_EXPIRED;
        }

        ItemSubmissionLookupDTO itemLookup = null;
        if (fuuidLookup == null || fuuidLookup.isEmpty())
        {
            if (StringUtils.isNotBlank(uuidLookup))
            {
                itemLookup = submissionDTO.getLookupItem(uuidLookup);
                if (itemLookup == null)
                {
                    return STATUS_SUBMISSION_EXPIRED;
                }
            }
        }
        // if the user didn't select a collection,
        // send him/her back to "select a collection" page
        if (id < 0)
        {
            return STATUS_NO_COLLECTION;
        }

        // try to load the collection
        Collection col = Collection.find(context, id);

        // Show an error if the collection is invalid
        if (col == null)
        {
            return STATUS_INVALID_COLLECTION;
        }
        else
        {
            // create our new Workspace Item
            DCInputSet inputSet = null;
            try
            {
                inputSet = new DCInputsReader().getInputs(col.getHandle());
            }
            catch (Exception e)
            {
                log.error(e.getMessage(), e);
                throw new RuntimeException(e);
            }

            List<ItemSubmissionLookupDTO> dto = new ArrayList<ItemSubmissionLookupDTO>();

            if (itemLookup != null)
            {
                dto.add(itemLookup);
            }
            else if (fuuidLookup != null && !fuuidLookup.isEmpty())
            {
                String[] ss = fuuidLookup.split(",");
                for (String s : ss)
                {
                    itemLookup = submissionDTO.getLookupItem(s);
                    if (itemLookup == null)
                    {
                        return STATUS_SUBMISSION_EXPIRED;
                    }
                    dto.add(itemLookup);
                }
            }
            else
            {
                SubmissionLookupPublication manualPub = new SubmissionLookupPublication(
                        SubmissionLookupService.MANUAL_USER_INPUT);
                manualPub.add("title", titolo);
                manualPub.add("year", date);
                manualPub.add("allauthors", autori);

                Enumeration e = request.getParameterNames();

                while (e.hasMoreElements())
                {
                    String parameterName = (String) e.nextElement();
                    String parameterValue = request.getParameter(parameterName);

                    if (parameterName.startsWith("identifier_")
                            && StringUtils.isNotBlank(parameterValue))
                    {
                        manualPub
                                .add(parameterName.substring("identifier_"
                                        .length()), parameterValue);
                    }
                }
                List<Record> publications = new ArrayList<Record>();
                publications.add(manualPub);
                dto.add(new ItemSubmissionLookupDTO(publications));

            }

            List<WorkspaceItem> result = null;
View Full Code Here


            counter++;
        }
        for (Map.Entry<String, List<Record>> entry : record_sets.entrySet())
        {
            ItemSubmissionLookupDTO dto = new ItemSubmissionLookupDTO(
                    entry.getValue());
            dtoList.add(dto);
        }

        return new ArrayList<String>();
View Full Code Here

TOP

Related Classes of org.dspace.submit.util.ItemSubmissionLookupDTO

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.