1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 package org.openoffice.xmerge;
25 
26 import java.io.IOException;
27 
28 /**
29  *  <p>A <code>DocumentDeserializer</code> represents a converter that
30  *  converts &quot;Device&quot; <code>Document</code> objects into the
31  *  &quot;Office&quot; <code>Document</code> format.
32  *
33  *  <p>The <code>DocumentDeserializer</code> object is created by
34  *  the <code>PluginFactory</code> {@link
35  *  org.openoffice.xmerge.DocumentDeserializerFactory#createDocumentDeserializer
36  *  createDocumentDeserializer} method.  When it is constructed, a
37  *  <code>ConvertData</code> object is passed in to be used as input.
38  *
39  *  @author  Herbie Ong
40  *  @see     org.openoffice.xmerge.PluginFactory
41  *  @see     org.openoffice.xmerge.DocumentDeserializerFactory
42  */
43 public interface DocumentDeserializer {
44 
45     /**
46      *  <p>Convert the data passed into the <code>DocumentDeserializer</code>
47      *  constructor into the &quot;Office&quot; <code>Document</code>
48      *  format.</p>
49      *
50      *  <p>This method may or may not be thread-safe.  It is expected
51      *  that the user code does not call this method in more than one
52      *  thread.  And for most cases, this method is only done once.</p>
53      *
54      *  @return  The resulting <code>Document</code> object from conversion.
55      *
56      *  @throws  ConvertException  If any Convert error occurs.
57      *  @throws  IOException       If any I/O error occurs.
58      */
deserialize()59     public Document deserialize() throws ConvertException, IOException;
60 }
61 
62