001/*
002 * The contents of this file are subject to the license and copyright
003 * detailed in the LICENSE and NOTICE files at the root of the source
004 * tree.
005 */
006package org.fcrepo.kernel.impl.models;
007
008import org.fcrepo.kernel.api.Transaction;
009import org.fcrepo.kernel.api.identifiers.FedoraId;
010import org.fcrepo.kernel.api.models.FedoraResource;
011import org.fcrepo.kernel.api.models.ResourceFactory;
012import org.fcrepo.kernel.api.models.Tombstone;
013import org.fcrepo.persistence.api.PersistentStorageSessionManager;
014
015import java.net.URI;
016import java.util.Collections;
017import java.util.List;
018
019/**
020 * Tombstone class
021 *
022 * @author whikloj
023 */
024public class TombstoneImpl extends FedoraResourceImpl implements Tombstone {
025
026    private FedoraResource originalResource;
027
028    protected TombstoneImpl(final FedoraId fedoraID,
029                            final Transaction transaction,
030                            final PersistentStorageSessionManager pSessionManager,
031                            final ResourceFactory resourceFactory,
032                            final FedoraResource original) {
033        super(fedoraID, transaction, pSessionManager, resourceFactory, null);
034        this.originalResource = original;
035    }
036
037    @Override
038    public FedoraResource getDeletedObject() {
039        return originalResource;
040    }
041
042    @Override
043    public FedoraId getFedoraId() {
044        return this.originalResource.getFedoraId();
045    }
046
047    @Override
048    public List<URI> getUserTypes() {
049        return Collections.emptyList();
050    }
051
052    @Override
053    public List<URI> getSystemTypes(final boolean forRdf) {
054        return Collections.emptyList();
055    }
056}