001/*
002 * Copyright 2015 DuraSpace, Inc.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *     http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package org.fcrepo.migration;
017
018import java.util.List;
019
020/**
021 * A reference to a Fedora 3 object.  Through the methods, all metadata and datastream
022 * content is available.
023 * @author mdurbin
024 */
025public interface ObjectReference {
026
027    /**
028     * @return all the basic object information.
029     */
030    public ObjectInfo getObjectInfo();
031
032    /**
033     * @return all the object properties.
034     */
035    public ObjectProperties getObjectProperties();
036
037    /**
038     * Lists all datastream ids.
039     * @return all datastream ids
040     */
041    public List<String> listDatastreamIds();
042
043    /**
044     * Gets all versions of the datastream with the given id, from oldest to newest.
045     * @param datastreamId the id (a value returned from listDatastreams()) of the
046     *                     datastream whose versions are being requested.
047     * @return a list of datastream versions ordered from oldest to newest.
048     */
049    public List<DatastreamVersion> getDatastreamVersions(String datastreamId);
050
051    /**
052     * @return true if the underlying object had a Fedora2-style disseminator
053     *         that was lost in the migration.
054     */
055    public boolean hadFedora2Disseminators();
056}