1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> 2<!-- 3#************************************************************** 4# 5# Licensed to the Apache Software Foundation (ASF) under one 6# or more contributor license agreements. See the NOTICE file 7# distributed with this work for additional information 8# regarding copyright ownership. The ASF licenses this file 9# to you under the Apache License, Version 2.0 (the 10# "License"); you may not use this file except in compliance 11# with the License. You may obtain a copy of the License at 12# 13# http://www.apache.org/licenses/LICENSE-2.0 14# 15# Unless required by applicable law or agreed to in writing, 16# software distributed under the License is distributed on an 17# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 18# KIND, either express or implied. See the License for the 19# specific language governing permissions and limitations 20# under the License. 21# 22#************************************************************** 23 --> 24<html> 25<head> 26<title>org.openoffice.xmerge.merger package</title> 27</head> 28 29<body bgcolor="white"> 30<p>The <code>DiffAlgorithm</code> and <code>MergeAlgorithm</code> 31are used to provide the merge capabilities of this project.</p> 32 33<p>Merge is useful when an <code>OfficeDocument</code> 34is converted to a "Device" <code>Document</code> format, 35and the "Device" <code>Document</code> version is modified. 36Those changes can be merged back into the original 37<code>OfficeDocument</code> with the merger. The merger is capable 38of doing this even if the "Device" format is lossy in 39comparison to the <code>OfficeDocument</code> format.</p> 40 41<p>The <code>DiffAlgorithm</code> generates a list of 42<code>Difference</code> objects that represent the 43differences between two <code>OfficeDocument</code> objects. 44It is assumed that one is the original <code>OfficeDocument</code> 45object and the other is a "lossy" version of the same 46<code>Document</code> with edits to be merged. Typically the 47"lossy" version is created by converting a "Device" 48<code>Document</code> back into an <code>OfficeDocument</code>. 49 50<p>The <code>MergeAlgorithm</code> takes the <code>Difference</code> 51objects as input, and creates a merged <code>OfficeDocument</code>. 52A merged <code>OfficeDocument</code> has the following features:</p> 53 54<p><ul> 55<li>Tags in the <code>OfficeDocument</code> that are not 56 supported in the device format are not altered or removed. 57<li>Changes made to the device format are merged back into 58 the <code>OfficeDocument</code> in the location determined by 59 the <code>DiffAlgorithm</code>. 60</ul></p> 61 62<p>Each converter provides an implementation of the 63{@link org.openoffice.xmerge.ConverterCapabilities 64ConverterCapabilities} which specifies which 65<code>OfficeDocument</code> tags are supported for the 66device format.</p> 67 68</body> 69</html> 70