Examples of DOIIdentifierException


Examples of org.dspace.identifier.doi.DOIIdentifierException

    public void deleteDOI(Context context, String doi)
            throws DOIIdentifierException
    {
        if (reserved.remove(doi) == null)
        {
            throw new DOIIdentifierException("Trying to delete a DOI that was "
                    + "never reserved!", DOIIdentifierException.DOI_DOES_NOT_EXIST);
        }
        registered.remove(doi);
    }
View Full Code Here

Examples of org.dspace.identifier.doi.DOIIdentifierException

            {
                return;
            }
            else
            {
                throw new DOIIdentifierException("Trying to reserve a DOI that "
                        + "is reserved for another object.",
                        DOIIdentifierException.MISMATCH);
            }
        }
        reserved.put(doi, new Integer(dso.getID()));
View Full Code Here

Examples of org.dspace.identifier.doi.DOIIdentifierException

    public void registerDOI(Context context, DSpaceObject dso, String doi)
            throws DOIIdentifierException
    {
        if (!reserved.containsKey(doi))
        {
            throw new DOIIdentifierException("Trying to register an unreserverd "
                    + "DOI.", DOIIdentifierException.RESERVE_FIRST);
        }
       
        if (reserved.get(doi).intValue() != dso.getID())
        {
            throw new DOIIdentifierException("Trying to register a DOI that is"
                    + " reserved for another item.", DOIIdentifierException.MISMATCH);
        }
       
        if (registered.containsKey(doi))
        {
            if (registered.get(doi).intValue() == dso.getID())
            {
                return;
            }
            else
            {
                throw new DOIIdentifierException("Trying to register a DOI that "
                        + "is registered for another item.",
                        DOIIdentifierException.MISMATCH);
            }
        }
       
View Full Code Here

Examples of org.dspace.identifier.doi.DOIIdentifierException

    public void updateMetadata(Context context, DSpaceObject dso, String doi)
            throws DOIIdentifierException
    {
        if (!reserved.containsKey(doi))
        {
            throw new DOIIdentifierException("Trying to update a DOI that is not "
                    + "registered!", DOIIdentifierException.DOI_DOES_NOT_EXIST);
        }
        if (reserved.get(doi).intValue() != dso.getID())
        {
            throw new DOIIdentifierException("Trying to update metadata of an "
                    + "unreserved DOI.", DOIIdentifierException.DOI_DOES_NOT_EXIST);
        }
    }
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.