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 * 006 */ 007package org.fcrepo.migration; 008 009import javax.xml.stream.XMLStreamException; 010 011/** 012 * A class that encapsulates an object for processing. This class represents a single object and 013 * exposes methods to query basic information about it and then to process it with an arbitrary 014 * StreamingFedoraObjectHandler. 015 * @author mdurbin 016 */ 017public interface FedoraObjectProcessor extends AutoCloseable { 018 019 /** 020 * get object information. 021 * @return the object info 022 */ 023 public ObjectInfo getObjectInfo(); 024 025 /** 026 * process the object. 027 * @param handler the handler 028 * @throws XMLStreamException xml stream exception 029 */ 030 public void processObject(StreamingFedoraObjectHandler handler) throws XMLStreamException; 031 032 /** 033 * Close resources associated to the processor 034 */ 035 void close(); 036 037}