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 /** 27 * <p>A <code>DocumentSerializer</code> object is used to convert 28 * from the "Office" <code>Document</code> format to the 29 * "Device" <code>Document</code> format.</p> 30 * 31 * <p>All plug-in implementations of the <code>PluginFactory</code> 32 * interface that also support serialization must also 33 * implement this interface.</p> 34 * 35 * @see PluginFactory 36 * @see DocumentSerializer 37 */ 38 public interface DocumentSerializerFactory { 39 40 /** 41 * <p>The <code>DocumentSerializer</code> is used to convert 42 * from the "Office" <code>Document</code> format 43 * to the "Device" <code>Document</code> format.</p> 44 * 45 * The <code>ConvertData</code> object is passed along to the 46 * created <code>DocumentSerializer</code> via its constructor. 47 * The <code>ConvertData</code> is read and converted when the 48 * the <code>DocumentSerializer</code> object's 49 * <code>serialize</code> method is called. 50 * 51 * @param doc <code>Document</code> object that the created 52 * <code>DocumentSerializer</code> object uses 53 * as input. 54 * 55 * @return A <code>DocumentSerializer</code> object. 56 */ createDocumentSerializer(Document doc)57 public DocumentSerializer createDocumentSerializer(Document doc); 58 } 59 60