[Libreoffice-commits] core.git: xmerge/source
rbuj
robert.buj at gmail.com
Thu Sep 4 07:08:40 PDT 2014
xmerge/source/xmerge/java/org/openoffice/xmerge/Convert.java | 166 +--
xmerge/source/xmerge/java/org/openoffice/xmerge/ConvertData.java | 52 -
xmerge/source/xmerge/java/org/openoffice/xmerge/ConvertException.java | 10
xmerge/source/xmerge/java/org/openoffice/xmerge/ConverterCapabilities.java | 40
xmerge/source/xmerge/java/org/openoffice/xmerge/ConverterFactory.java | 50 -
xmerge/source/xmerge/java/org/openoffice/xmerge/Document.java | 62 -
xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentDeserializer.java | 40
xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentDeserializer2.java | 50 -
xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentDeserializerFactory.java | 41
xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentMerger.java | 87 --
xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentMergerFactory.java | 40
xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentSerializer.java | 44 -
xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentSerializer2.java | 54 -
xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentSerializerFactory.java | 40
xmerge/source/xmerge/java/org/openoffice/xmerge/MergeException.java | 10
xmerge/source/xmerge/java/org/openoffice/xmerge/PluginFactory.java | 196 ++--
xmerge/source/xmerge/java/org/openoffice/xmerge/Version.java | 27
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/dom/DOMDocument.java | 203 +---
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PalmDB.java | 284 ++----
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PalmDocument.java | 87 --
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PdbDecoder.java | 89 --
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PdbEncoder.java | 86 -
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PdbHeader.java | 83 -
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PdbUtil.java | 15
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/Record.java | 109 --
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/EmbeddedBinaryObject.java | 17
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/EmbeddedObject.java | 16
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/EmbeddedXMLObject.java | 102 +-
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeConstants.java | 117 +-
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeDocument.java | 434 +++-------
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeDocumentException.java | 35
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeZip.java | 194 +---
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/ParaStyle.java | 237 ++---
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/Style.java | 134 +--
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/StyleCatalog.java | 154 +--
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/TextStyle.java | 232 ++---
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/BookSettings.java | 68 -
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/CellStyle.java | 125 +-
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnRowInfo.java | 48 -
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnStyle.java | 95 +-
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/DocumentMergerImpl.java | 42
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/Format.java | 174 +---
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/NameDefinition.java | 80 -
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/RowStyle.java | 97 +-
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SheetSettings.java | 123 +-
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SpreadsheetDecoder.java | 93 --
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SpreadsheetEncoder.java | 58 -
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcConstants.java | 4
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocument.java | 32
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentDeserializer.java | 274 ++----
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentSerializer.java | 196 +---
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcPluginFactory.java | 30
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/SxwDocument.java | 36
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/SxwPluginFactory.java | 26
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/ConverterCapabilitiesImpl.java | 21
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentDeserializerImpl.java | 136 +--
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentMergerImpl.java | 11
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentSerializerImpl.java | 148 +--
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/GenericOfficeDocument.java | 38
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/PluginFactoryImpl.java | 144 +--
xmerge/source/xmerge/java/org/openoffice/xmerge/merger/DiffAlgorithm.java | 25
xmerge/source/xmerge/java/org/openoffice/xmerge/merger/Difference.java | 201 ++--
xmerge/source/xmerge/java/org/openoffice/xmerge/merger/Iterator.java | 61 -
xmerge/source/xmerge/java/org/openoffice/xmerge/merger/MergeAlgorithm.java | 29
xmerge/source/xmerge/java/org/openoffice/xmerge/merger/NodeMergeAlgorithm.java | 21
xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/CellNodeIterator.java | 40
xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/CharArrayLCSAlgorithm.java | 74 -
xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/CharacterParser.java | 46 -
xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/IteratorLCSAlgorithm.java | 62 -
xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/IteratorRowCompare.java | 62 -
xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/NodeIterator.java | 101 +-
xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/ObjectArrayIterator.java | 40
xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/ParaNodeIterator.java | 40
xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/RowIterator.java | 26
xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/TextNodeEntry.java | 34
xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/TextNodeIterator.java | 40
xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/CharacterBaseParagraphMerge.java | 37
xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/DocumentMerge.java | 46 -
xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/PositionBaseRowMerge.java | 27
xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/SheetMerge.java | 35
xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/SheetUtil.java | 28
xmerge/source/xmerge/java/org/openoffice/xmerge/test/ConverterInfoList.java | 44 -
xmerge/source/xmerge/java/org/openoffice/xmerge/test/Driver.java | 70 -
xmerge/source/xmerge/java/org/openoffice/xmerge/util/ActiveSyncDriver.java | 7
xmerge/source/xmerge/java/org/openoffice/xmerge/util/ColourConverter.java | 98 --
xmerge/source/xmerge/java/org/openoffice/xmerge/util/Debug.java | 160 +--
xmerge/source/xmerge/java/org/openoffice/xmerge/util/EndianConverter.java | 70 -
xmerge/source/xmerge/java/org/openoffice/xmerge/util/IntArrayList.java | 80 -
xmerge/source/xmerge/java/org/openoffice/xmerge/util/OfficeUtil.java | 15
xmerge/source/xmerge/java/org/openoffice/xmerge/util/Resources.java | 61 -
xmerge/source/xmerge/java/org/openoffice/xmerge/util/TwipsConverter.java | 42
xmerge/source/xmerge/java/org/openoffice/xmerge/util/XmlUtil.java | 47 -
xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfo.java | 224 ++---
xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfoMgr.java | 135 +--
xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfoReader.java | 141 +--
xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/RegistryException.java | 12
96 files changed, 3496 insertions(+), 4521 deletions(-)
New commits:
commit a5a9457609e8bbe76a8c6d620b81b8666c2e4491
Author: rbuj <robert.buj at gmail.com>
Date: Thu Sep 4 15:58:32 2014 +0200
xmerge: javadoc maintenance and minor code formatting
Javadoc:
* Replaces <code>..</code> tags with {@code ..}.
* Replaces HTML entities with {@literal ..}
* Removes <p>..</p> tags in the first sentence.
* Reduces code snippet spacing.
* Adds tables.
* Uses only one space after a comment delimiter.
* Adjusts the margins.
Minor code formating:
* Removes some extra blank lines (very few).
* Fixes some indentations (very few).
* Adjusts the margins in some method headers (very few).
Change-Id: I01bd9df58e4cb41bc3a38a2b2d3d7d2612081c32
Reviewed-on: https://gerrit.libreoffice.org/11202
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
Tested-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/Convert.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/Convert.java
index 982cb3f..122bffd 100644
--- a/xmerge/source/xmerge/java/org/openoffice/xmerge/Convert.java
+++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/Convert.java
@@ -25,64 +25,57 @@ import java.util.Iterator;
import org.openoffice.xmerge.util.registry.ConverterInfo;
/**
- * The <code>Convert</code> class manages a conversion from one
- * mime-type to another. The <code>ConvertFactory</code> is
- * responsible for returning the appropriate <code>Convert</code>
- * class for a specified conversion. This class is responsible
- * for all interactions with the <code>PluginFactory</code>
- * implementation.
+ * The {@code Convert} class manages a conversion from one mime-type to another.
*
- * @see ConverterFactory
- * @see PluginFactory
- * @see org.openoffice.xmerge.util.registry.ConverterInfo
+ * <p>The {@code ConvertFactory} is responsible for returning the appropriate
+ * {@code Convert} class for a specified conversion. This class is responsible
+ * for all interactions with the {@code PluginFactory} implementation.</p>
+ *
+ * @see ConverterFactory
+ * @see PluginFactory
+ * @see org.openoffice.xmerge.util.registry.ConverterInfo
*/
public class Convert implements Cloneable {
- /**
- * ConvertInfo that corresponds to the from-mime/to-mime
- * conversion.
- */
+ /** ConvertInfo that corresponds to the from-mime/to-mime conversion. */
private ConverterInfo ci;
/**
- * true if converting to the Office format, false if converting
- * to the device format.
+ * {@code true} if converting to the Office format, {@code false} if
+ * converting to the device format.
*/
private boolean toOffice;
- /**
- * Holds the convert input data.
- */
+ /** Holds the convert input data. */
private ConvertData inputCD = new ConvertData();
-
/**
- * Construct a Convert class with specified <code>ConvertInfo</code>
- * registry information.
- *
- * @param ci A <code>ConvertInfo</code> object containing
- * registry information corresponding to a
- * specific plug-in.
- * @param toOffice true if converting to the Office format,
- * false if converting to the device format.
+ * Construct a Convert class with specified {@code ConvertInfo} registry
+ * information.
+ *
+ * @param ci A {@code ConvertInfo} object containing registry
+ * information corresponding to a specific plug-in.
+ * @param toOffice {@code true} if converting to the Office format,
+ * {@code false} if converting to the device format.
*/
public Convert(ConverterInfo ci, boolean toOffice) {
this.ci = ci;
this.toOffice = toOffice;
}
-
/**
- * Adds an <code>InputStream</code> to be used as input by the
- * <code>Convert</code> class. It is possible that many files
- * need to be converted into a single output <code>Document</code>,
- * so this function may be called more than one time. It is the
- * plug-in's responsibility to know how to handle the input.
+ * Adds an {@code InputStream} to be used as input by the {@code Convert}
+ * class.
+ *
+ * <p>It is possible that many files need to be converted into a single
+ * output {@code Document}, so this function may be called more than one
+ * time. It is the plug-in's responsibility to know how to handle the input.
+ * </p>
*
- * @param name The name corresponding to the <code>InputStream</code>.
- * @param is <code>InputStream</code> to be used as input.
+ * @param name The name corresponding to the {@code InputStream}.
+ * @param is {@code InputStream} to be used as input.
*
- * @throws IOException If any I/O error occurs.
+ * @throws IOException If any I/O error occurs.
*/
public void addInputStream(String name, InputStream is)
throws IOException {
@@ -97,18 +90,20 @@ public class Convert implements Cloneable {
inputCD.addDocument(inputDoc);
}
- /**
- * Adds an <code>InputStream</code> to be used as input by the
- * <code>Convert</code> class. It is possible that many files
- * need to be converted into a single output <code>Document</code>,
- * so this function may be called more than one time. It is the
- * plug-in's responsibility to know how to handle the input.
+ /**
+ * Adds an {@code InputStream} to be used as input by the {@code Convert}
+ * class.
+ *
+ * <p>It is possible that many files need to be converted into a single
+ * output {@code Document}, so this function may be called more than one
+ * time. It is the plug-in's responsibility to know how to handle the input.
+ * </p>
*
- * @param name The name corresponding to the <code>InputStream</code>.
- * @param is <code>InputStream</code> to be used as input.
- * @param isZip <code>boolean</code> to identify that incoming stream is * zipped
+ * @param name The name corresponding to the {@code InputStream}.
+ * @param is {@code InputStream} to be used as input.
+ * @param isZip {@code boolean} to identify that incoming stream is * zipped.
*
- * @throws IOException If any I/O error occurs.
+ * @throws IOException If any I/O error occurs.
*/
public void addInputStream(String name, InputStream is,boolean isZip)
throws IOException {
@@ -125,40 +120,39 @@ public class Convert implements Cloneable {
/**
- * Returns a <code>DocumentMerger</code> for the given <code>Document</code>.
+ * Returns a {@code DocumentMerger} for the given {@code Document}.
*
- * @param origDoc The <code>Document</code> were later changes will be merged to
+ * @param origDoc The {@code Document} were later changes will be merged to.
*
- * @return The <code>DocumentMerger</code> object for the given document.
+ * @return The {@code DocumentMerger} object for the given document.
*
- * @throws IOException If any I/O error occurs.
+ * @throws IOException If any I/O error occurs.
*/
- public DocumentMerger getDocumentMerger(Document origDoc)
- throws IOException {
-
- DocumentMergerFactory myDocMergerFactory = ci.getDocMergerFactory();
- DocumentMerger merger = myDocMergerFactory.createDocumentMerger(origDoc);
- return merger;
+ public DocumentMerger getDocumentMerger(Document origDoc) throws IOException {
+ DocumentMergerFactory myDocMergerFactory = ci.getDocMergerFactory();
+ DocumentMerger merger = myDocMergerFactory.createDocumentMerger(origDoc);
+ return merger;
}
/**
- * Resets the input queue, so that the user can use this class to
- * perform another conversion. This causes the
- * <code>addInputStream</code> method to accept input for the next
- * conversion.
+ * Resets the input queue, so that the user can use this class to perform
+ * another conversion.
+ *
+ * <p>This causes the {@code addInputStream} method to accept input for the
+ * next conversion.</p>
*/
private void reset() {
inputCD.reset();
}
-
/**
- * Clones a Convert object so another Convert object can
- * do the same conversion. <code>InputStream</code> objects passed
- * in via calls to the <code>addInputStream</code> method are not
- * copied.
+ * Clones a {@code Convert} object so another Convert object can do the same
+ * conversion.
*
- * @return The cloned <code>Convert</code> object.
+ * <p>{@code InputStream} objects passed in via calls to the
+ * {@code addInputStream} method are not copied.</p>
+ *
+ * @return The cloned {@code Convert} object.
*/
@Override
public Object clone() {
@@ -175,16 +169,14 @@ public class Convert implements Cloneable {
return aClone;
}
-
/**
- * Convert the input specified in calls to the <code>addInputStream</code>
- * method to the output format specified by this <code>Convert</code>
- * class.
+ * Convert the input specified in calls to the {@code addInputStream}
+ * method to the output format specified by this {@code Convert} class.
*
- * @return The output data.
+ * @return The output data.
*
- * @throws ConvertException If any conversion error occurs.
- * @throws IOException If any I/O error occurs.
+ * @throws ConvertException If any conversion error occurs.
+ * @throws IOException If any I/O error occurs.
*/
public ConvertData convert() throws ConvertException, IOException {
@@ -192,7 +184,7 @@ public class Convert implements Cloneable {
if (toOffice) {
- // From device format to Office format
+ // From device format to Office format
DocumentDeserializerFactory myDocDeserializerFactory =
ci.getDocDeserializerFactory();
@@ -206,7 +198,7 @@ public class Convert implements Cloneable {
} else {
- // From Office format to device format
+ // From Office format to device format
DocumentSerializerFactory myDocSerializerFactory =
ci.getDocSerializerFactory();
@@ -221,27 +213,21 @@ public class Convert implements Cloneable {
}
}
-
-
/**
- * Returns the appropriate "Office" <code>Document</code>
- * object for this plug-in.
+ * Returns the appropriate "Office" {@code Document} object for
+ * this plug-in.
*
- * @param name The name of the <code>Document</code> to create.
- * @param is The <code>InputStream</code> corresponding to the
- * <code>Document</code> to create.
+ * @param name The name of the {@code Document} to create.
+ * @param is The {@code InputStream} corresponding to the
+ * {@code Document} to create.
*
- * @return The appropriate "Office" <code>Document</code>
- * object for this plug-in.
+ * @return The appropriate "Office" {@code Document} object for
+ * this plug-in.
*
- * @throws IOException If any I/O error occurs.
+ * @throws IOException If any I/O error occurs.
*/
public Document getOfficeDocument(String name, InputStream is)
throws IOException {
return(ci.getPluginFactory().createOfficeDocument(name, is));
}
-
-
-
-}
-
+}
\ No newline at end of file
diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/ConvertData.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/ConvertData.java
index 195e235..b355298 100644
--- a/xmerge/source/xmerge/java/org/openoffice/xmerge/ConvertData.java
+++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/ConvertData.java
@@ -22,29 +22,29 @@ import java.util.ArrayList;
import java.util.Iterator;
/**
- * <p><code>ConvertData</code> is used as a container for passing
- * <code>Document</code> objects in and out of the <code>Convert</code>
- * class. The <code>ConvertData</code> contains a <code>String</code>
- * name and a <code>Vector</code> of <code>Document</code> objects.</p>
+ * {@code ConvertData} is used as a container for passing {@code Document}
+ * objects in and out of the {@code Convert} class.
*
+ * <p>The {@code ConvertData} contains a {@code String} name and a
+ * {@code Vector} of {@code Document} objects.</p>
*/
public class ConvertData {
/**
- * Vector of <code>Document</code> objects.
+ * Vector of {@code Document} objects.
*/
private ArrayList<Object> v = new ArrayList<Object>();
/**
- * Name of the <code>ConvertData</code> object.
+ * Name of the {@code ConvertData} object.
*/
private String name;
-
/**
- * Resets ConvertData. This empties all <code>Document</code>
- * objects from this class. This allows reuse of a
- * <code>ConvertData</code>.
+ * Resets ConvertData.
+ *
+ * <p>This empties all {@code Document} objects from this class. This allows
+ * reuse of a {@code ConvertData}.</p>
*/
public void reset() {
name = null;
@@ -52,56 +52,50 @@ public class ConvertData {
}
/**
- * Returns the <code>Document</code> name.
+ * Returns the {@code Document} name.
*
- * @return The <code>Document</code> name.
+ * @return The {@code Document} name.
*/
public String getName() {
return name;
}
-
/**
- * Sets the <code>Document</code> name.
+ * Sets the {@code Document} name.
*
- * @param docName The name of the <code>Document</code>.
+ * @param docName The name of the {@code Document}.
*/
public void setName(String docName) {
name = docName;
}
-
/**
- * Adds a <code>Document</code> to the vector.
+ * Adds a {@code Document} to the vector.
*
- * @param doc The <code>Document</code> to add.
+ * @param doc The {@code Document} to add.
*/
public void addDocument(Document doc) {
v.add(doc);
}
-
/**
- * Gets an <code>Enumeration</code> to access the <code>Vector</code>
- * of <code>Document</code> objects.
+ * Gets an {@code Enumeration} to access the {@code Vector} of
+ * {@code Document} objects.
*
- * @return The <code>Enumeration</code> to access the
- * <code>Vector</code> of <code>Document</code> objects.
+ * @return The {@code Enumeration} to access the {@code Vector} of
+ * {@code Document} objects.
*/
public Iterator<Object> getDocumentEnumeration() {
Iterator<Object> enumerate = v.iterator();
return (enumerate);
}
-
/**
- * Gets the number of <code>Document</code> objects currently stored
+ * Gets the number of {@code Document} objects currently stored.
*
- * @return The number of <code>Document</code> objects currently
- * stored.
+ * @return The number of {@code Document} objects currently stored.
*/
public int getNumDocuments() {
return (v.size());
}
-}
-
+}
\ No newline at end of file
diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/ConvertException.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/ConvertException.java
index d907385..6d05e8d 100644
--- a/xmerge/source/xmerge/java/org/openoffice/xmerge/ConvertException.java
+++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/ConvertException.java
@@ -19,18 +19,16 @@
package org.openoffice.xmerge;
/**
- * This <code>Exception</code> is thrown by convert algorithms.
+ * This {@code Exception} is thrown by convert algorithms.
*/
public class ConvertException extends Exception {
/**
- * Exception thrown by convert algorithms.
+ * Exception thrown by convert algorithms.
*
- * @param message Message to be included in the
- * <code>Exception</code>.
+ * @param message Message to be included in the {@code Exception}.
*/
public ConvertException(String message) {
super(message);
}
-}
-
+}
\ No newline at end of file
diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/ConverterCapabilities.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/ConverterCapabilities.java
index 9bbe494..da36f7d 100644
--- a/xmerge/source/xmerge/java/org/openoffice/xmerge/ConverterCapabilities.java
+++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/ConverterCapabilities.java
@@ -19,40 +19,36 @@
package org.openoffice.xmerge;
/**
- * <p>A <code>ConverterCapabilities</code> object is used by
- * <code>DocumentMerger</code> implementations. The
- * <code>ConverterCapabilities</code> indicates which
- * "Office" XML tags are supported by the
- * "Device" format.</p>
+ * A {@code ConverterCapabilities} object is used by {@code DocumentMerger}
+ * implementations.
*
- * @see org.openoffice.xmerge.PluginFactory
- * @see org.openoffice.xmerge.DocumentMerger
+ * <p>The {@code ConverterCapabilities} indicates which "Office" XML
+ * tags are supported by the "Device" format.</p>
+ *
+ * @see org.openoffice.xmerge.PluginFactory
+ * @see org.openoffice.xmerge.DocumentMerger
*/
public interface ConverterCapabilities {
-
/**
- * Test to see if the device document format supports the
- * tag in question.
+ * Test to see if the device document format supports the tag in question.
*
- * @param tag The tag to check.
+ * @param tag The tag to check.
*
- * @return true if the device format supports the
- * tag, false otherwise.
+ * @return {@code true} if the device format supports the tag,
+ * {@code false} otherwise.
*/
boolean canConvertTag(String tag);
-
/**
- * Test to see if the device document format supports the
- * tag attribute in question.
+ * Test to see if the device document format supports the tag attribute in
+ * question.
*
- * @param tag The tag to check.
- * @param attribute The tag attribute to check.
+ * @param tag The tag to check.
+ * @param attribute The tag attribute to check.
*
- * @return true if the device format supports the
- * attribute, false otherwise.
+ * @return {@code true} if the device format supports the attribute,
+ * {@code false} otherwise.
*/
boolean canConvertAttribute(String tag, String attribute);
-}
-
+}
\ No newline at end of file
diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/ConverterFactory.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/ConverterFactory.java
index 75417be..2f12e45 100644
--- a/xmerge/source/xmerge/java/org/openoffice/xmerge/ConverterFactory.java
+++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/ConverterFactory.java
@@ -22,32 +22,30 @@ import org.openoffice.xmerge.util.registry.ConverterInfo;
import org.openoffice.xmerge.util.registry.ConverterInfoMgr;
/**
- * Factory that provides access to <code>Convert</code> objects, which
- * are used to do a conversion. The <code>ConvertFactory</code> does
- * this via the <code>ConvertInfoMgr</code> which maintains a list of
- * which <code>Convert</code> objects are available and their
- * capabilities.
+ * Factory that provides access to {@code Convert} objects, which are used to do
+ * a conversion.
*
- * @see Convert
- * @see org.openoffice.xmerge.util.registry.ConverterInfoMgr
+ * <p>The {@code ConvertFactory} does this via the {@code ConvertInfoMgr} which
+ * maintains a list of which {@code Convert} objects are available and their
+ * capabilities.</p>
*
+ * @see Convert
+ * @see org.openoffice.xmerge.util.registry.ConverterInfoMgr
*/
public class ConverterFactory {
-
-
-
/**
- * Returns the <code>Convert</code> object that converts
- * the specified device/office mime type conversion. If there
- * are multiple <code>Converter</code> objects registered
- * that support this conversion, only the first is returned.
+ * Returns the {@code Convert} object that converts the specified device/office
+ * mime type conversion.
+ *
+ * <p>If there are multiple {@code Converter} objects registered that support
+ * this conversion, only the first is returned.</p>
*
- * @param mimeTypeIn The mime input type.
- * @param mimeTypeOut The mime output type.
+ * @param mimeTypeIn The mime input type.
+ * @param mimeTypeOut The mime output type.
*
- * @return The first <code>Convert</code> object that supports
- * the specified conversion.
+ * @return The first {@code Convert} object that supports the specified
+ * conversion.
*/
public Convert getConverter(String mimeTypeIn, String mimeTypeOut) {
@@ -69,21 +67,19 @@ public class ConverterFactory {
return null;
}
-
/**
- * Returns the <code>Convert</code> object that is described
- * by the <code>ConverterInfo</code> parameter.
- *
- * @param ci The <code>ConverterInfo</code> describing the converter.
+ * Returns the {@code Convert} object that is described by the
+ * {@code ConverterInfo} parameter.
*
- * @param toOffice true to convert to office, false to convert to device.
+ * @param ci The {@code ConverterInfo} describing the converter.
+ * @param toOffice {@code true} to convert to office, {@code false} to
+ * convert to device.
*
- * @return The <code>Convert</code> object
+ * @return The {@code Convert} object
*/
public Convert getConverter(ConverterInfo ci, boolean toOffice) {
Convert myConvert = new Convert(ci, toOffice);
return myConvert;
}
-}
-
+}
\ No newline at end of file
diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/Document.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/Document.java
index c1a5d7b..851c153 100644
--- a/xmerge/source/xmerge/java/org/openoffice/xmerge/Document.java
+++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/Document.java
@@ -23,67 +23,57 @@ import java.io.InputStream;
import java.io.IOException;
/**
- * <p>A <code>Document</code> represents any <code>Document</code>
- * to be converted and the resulting <code>Document</code> from any
- * conversion.</p>
+ * A {@code Document} represents any {@code Document} to be converted and the
+ * resulting {@code Document} from any conversion.
*
- * <p>It is created by the <code>PluginFactory</code> object's {@link
- * org.openoffice.xmerge.PluginFactory#createOfficeDocument
- * createOfficeDocument} method or the {@link
- * org.openoffice.xmerge.PluginFactory#createDeviceDocument
- * createDeviceDocument} method.</p>
+ * <p>It is created by the {@code PluginFactory} object's {@link
+ * org.openoffice.xmerge.PluginFactory#createOfficeDocument createOfficeDocument}
+ * method or the {@link org.openoffice.xmerge.PluginFactory#createDeviceDocument
+ * createDeviceDocument} method.</p>
*
- * @see org.openoffice.xmerge.PluginFactory
+ * @see org.openoffice.xmerge.PluginFactory
*/
public interface Document {
/**
- * <p>Writes out the <code>Document</code> content to the specified
- * <code>OutputStream</code>.</p>
+ * Writes out the {@code Document} content to the specified
+ * {@code OutputStream}.
*
- * <p>This method may not be thread-safe.
- * Implementations may or may not synchronize this
- * method. User code (i.e. caller) must make sure that
- * calls to this method are thread-safe.</p>
+ * <p>This method may not be thread-safe. Implementations may or may not
+ * synchronize this method. User code (i.e. caller) must make sure that
+ * calls to this method are thread-safe.</p>
*
- * @param os <code>OutputStream</code> to write out the
- * <code>Document</code> content.
+ * @param os {@code OutputStream} to write out the {@code Document}
+ * content.
*
- * @throws IOException If any I/O error occurs.
+ * @throws IOException If any I/O error occurs.
*/
void write(OutputStream os) throws IOException;
-
/**
- * <p>Reads the content from the <code>InputStream</code> into
- * the <code>Document</code>.</p>
+ * Reads the content from the {@code InputStream} into the {@code Document}.
*
- * <p>This method may not be thread-safe.
- * Implementations may or may not synchronize this
- * method. User code (i.e. caller) must make sure that
- * calls to this method are thread-safe.</p>
+ * <p>This method may not be thread-safe. Implementations may or may not
+ * synchronize this method. User code (i.e. caller) must make sure that
+ * calls to this method are thread-safe.</p>
*
- * @param is <code>InputStream</code> to read in the
- * <code>Document</code> content.
+ * @param is {@code InputStream} to read in the {@code Document} content.
*
- * @throws IOException If any I/O error occurs.
+ * @throws IOException If any I/O error occurs.
*/
void read(InputStream is) throws IOException;
-
/**
- * Returns the <code>Document</code> name with no file extension.
+ * Returns the {@code Document} name with no file extension.
*
- * @return The <code>Document</code> name with no file extension.
+ * @return The {@code Document} name with no file extension.
*/
String getName();
-
/**
- * Returns the <code>Document</code> name with file extension.
+ * Returns the {@code Document} name with file extension.
*
- * @return The <code>Document</code> name with file extension.
+ * @return The {@code Document} name with file extension.
*/
String getFileName();
-}
-
+}
\ No newline at end of file
diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentDeserializer.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentDeserializer.java
index 5429a16..1bfadfc 100644
--- a/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentDeserializer.java
+++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentDeserializer.java
@@ -21,35 +21,33 @@ package org.openoffice.xmerge;
import java.io.IOException;
/**
- * <p>A <code>DocumentDeserializer</code> represents a converter that
- * converts "Device" <code>Document</code> objects into the
- * "Office" <code>Document</code> format.</p>
+ * A {@code DocumentDeserializer} represents a converter that converts
+ * "Device" {@code Document} objects into the "Office"
+ * {@code Document} format.
*
- * <p>The <code>DocumentDeserializer</code> object is created by
- * the <code>PluginFactory</code> {@link
- * org.openoffice.xmerge.DocumentDeserializerFactory#createDocumentDeserializer
- * createDocumentDeserializer} method. When it is constructed, a
- * <code>ConvertData</code> object is passed in to be used as input.</p>
+ * <p>The {@code DocumentDeserializer} object is created by the
+ * {@code PluginFactory} {@link
+ * org.openoffice.xmerge.DocumentDeserializerFactory#createDocumentDeserializer
+ * createDocumentDeserializer} method. When it is constructed, a
+ * {@code ConvertData} object is passed in to be used as input.</p>
*
- * @see org.openoffice.xmerge.PluginFactory
- * @see org.openoffice.xmerge.DocumentDeserializerFactory
+ * @see org.openoffice.xmerge.PluginFactory
+ * @see org.openoffice.xmerge.DocumentDeserializerFactory
*/
public interface DocumentDeserializer {
/**
- * <p>Convert the data passed into the <code>DocumentDeserializer</code>
- * constructor into the "Office" <code>Document</code>
- * format.</p>
+ * Convert the data passed into the {@code DocumentDeserializer} constructor
+ * into the "Office" {@code Document} format.
*
- * <p>This method may or may not be thread-safe. It is expected
- * that the user code does not call this method in more than one
- * thread. And for most cases, this method is only done once.</p>
+ * <p>This method may or may not be thread-safe. It is expected that the
+ * user code does not call this method in more than one thread. And for
+ * most cases, this method is only done once.</p>
*
- * @return The resulting <code>Document</code> object from conversion.
+ * @return The resulting {@code Document} object from conversion.
*
- * @throws ConvertException If any Convert error occurs.
- * @throws IOException If any I/O error occurs.
+ * @throws ConvertException If any Convert error occurs.
+ * @throws IOException If any I/O error occurs.
*/
Document deserialize() throws ConvertException, IOException;
-}
-
+}
\ No newline at end of file
diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentDeserializer2.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentDeserializer2.java
index a866f82..95f3441 100644
--- a/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentDeserializer2.java
+++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentDeserializer2.java
@@ -21,41 +21,41 @@ package org.openoffice.xmerge;
import java.io.IOException;
/**
- * <p>A <code>DocumentDeserializer</code> represents a converter that
- * converts "Device" <code>Document</code> objects into the
- * "Office" <code>Document</code> format.</p>
+ * A {@code DocumentDeserializer} represents a converter that converts
+ * "Device" {@code Document} objects into the "Office"
+ * {@code Document} format.
*
- * <p>The <code>PluginFactory</code> {@link
- * org.openoffice.xmerge.DocumentDeserializerFactory#createDocumentDeserializer
- * createDocumentDeserializer} method creates a <code>DocumentDeserializer</code>,
- * which may or may not implement <code>DocumentDeserializer2</code>.
- * When it is constructed, a
- * <code>ConvertData</code> object is passed in to be used as input.</p>
+ * <p>The {@code PluginFactory} {@link
+ * org.openoffice.xmerge.DocumentDeserializerFactory#createDocumentDeserializer
+ * createDocumentDeserializer} method creates a {@code DocumentDeserializer},
+ * which may or may not implement {@code DocumentDeserializer2}. When it is
+ * constructed, a {@code ConvertData} object is passed in to be used as input.
+ * </p>
*
- * @see org.openoffice.xmerge.PluginFactory
- * @see org.openoffice.xmerge.DocumentDeserializerFactory
+ * @see org.openoffice.xmerge.PluginFactory
+ * @see org.openoffice.xmerge.DocumentDeserializerFactory
*/
public interface DocumentDeserializer2 extends DocumentSerializer {
/**
- * <p>Convert the data passed into the <code>DocumentDeserializer2</code>
- * constructor into the "Office" <code>Document</code>
- * format. The URL's passed may be used to resolve links and to choose the
- * name of the output office document.</p>
+ * Convert the data passed into the {@code DocumentDeserializer2}
+ * constructor into the "Office" {@code Document} format.
*
- * <p>This method may or may not be thread-safe. It is expected
- * that the user code does not call this method in more than one
- * thread. And for most cases, this method is only done once.</p>
+ * <p>The URL's passed may be used to resolve links and to choose the name
+ * of the output office document.</p>
*
- * @return The resulting <code>Document</code> object from conversion.
+ * <p>This method may or may not be thread-safe. It is expected that the
+ * user code does not call this method in more than one thread. And for
+ * most cases, this method is only done once.</p>
*
- * @param deviceURL URL of the device document (may be null if unknown)
- * @param officeURL URL of the office document (may be null if unknown)
+ * @return The resulting {@code Document} object from conversion.
*
- * @throws ConvertException If any Convert error occurs.
- * @throws IOException If any I/O error occurs.
+ * @param deviceURL URL of the device document (may be null if unknown)
+ * @param officeURL URL of the office document (may be null if unknown)
+ *
+ * @throws ConvertException If any Convert error occurs.
+ * @throws IOException If any I/O error occurs.
*/
Document deserialize(String deviceURL, String officeURL) throws
ConvertException, IOException;
-}
-
+}
\ No newline at end of file
diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentDeserializerFactory.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentDeserializerFactory.java
index 1eccfde..3d10d03 100644
--- a/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentDeserializerFactory.java
+++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentDeserializerFactory.java
@@ -19,38 +19,33 @@
package org.openoffice.xmerge;
/**
- * <p>A <code>DocumentDeserializer</code> object is used to convert
- * from the "Device" <code>Document</code> format to the
- * "Office" <code>Document</code> format.</p>
+ * A {@code DocumentDeserializer} object is used to convert from the
+ * "Device" {@code Document} format to the "Office"
+ * {@code Document} format.
*
- * <p>All plug-in implementations of the <code>PluginFactory</code>
- * interface that also support deserialization must also
- * implement this interface.</p>
+ * <p>All plug-in implementations of the {@code PluginFactory} interface that
+ * also support deserialization must also implement this interface.</p>
*
- * @see PluginFactory
- * @see DocumentDeserializer
+ * @see PluginFactory
+ * @see DocumentDeserializer
*/
public interface DocumentDeserializerFactory {
/**
- * <p>The <code>DocumentDeserializer</code> is used to convert
- * from the "Device" <code>Document</code> format to
- * the "Office" <code>Document</code> format.</p>
+ * The {@code DocumentDeserializer} is used to convert from the
+ * "Device" {@code Document} format to the "Office"
+ * {@code Document} format.
*
- * <p>The <code>ConvertData</code> object is passed along to the
- * created <code>DocumentDeserializer</code> via its constructor.
- * The <code>ConvertData</code> is read and converted when the
- * the <code>DocumentDeserializer</code> object's
- * <code>deserialize</code> method is called.
- * </p>
+ * <p>The {@code ConvertData} object is passed along to the created
+ * {@code DocumentDeserializer} via its constructor. The {@code ConvertData}
+ * is read and converted when the {@code DocumentDeserializer} object's
+ * {@code deserialize} method is called.</p>
*
- * @param cd <code>ConvertData</code> object that the created
- * <code>DocumentDeserializer</code> object uses as
- * input.
+ * @param cd {@code ConvertData} object that the created
+ * {@code DocumentDeserializer} object uses as input.
*
- * @return A <code>DocumentDeserializer</code> object.
+ * @return A {@code DocumentDeserializer} object.
*/
DocumentDeserializer createDocumentDeserializer(ConvertData cd);
-}
-
+}
\ No newline at end of file
diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentMerger.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentMerger.java
index c575ef8..4347c70 100644
--- a/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentMerger.java
+++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentMerger.java
@@ -19,65 +19,56 @@
package org.openoffice.xmerge;
/**
- * <p>A <code>DocumentMerger</code> can merge changes from a modified
- * "Device" <code>Document</code> to the assigned original
- * "Office" <code>Document</code>.</p>
+ * A {@code DocumentMerger} can merge changes from a modified "Device"
+ * {@code Document} to the assigned original "Office" {@code Document}.
*
- * <p>Merge is useful when an <code>OfficeDocument</code>
- * is converted to a "Device" <code>Document</code> format,
- * and the "Device" <code>Document</code> version is modified.
- * Those changes can be merged back into the original
- * <code>OfficeDocument</code> with the merger. The merger is capable
- * of doing this even if the "Device" format is lossy in
- * comparison to the <code>OfficeDocument</code> format.</p>
+ * <p>Merge is useful when an {@code OfficeDocument} is converted to a
+ * "Device" {@code Document} format, and the "Device"
+ * {@code Document} version is modified. Those changes can be merged back into
+ * the original {@code OfficeDocument} with the merger. The merger is capable
+ * of doing this even if the "Device" format is lossy in
+ * comparison to the {@code OfficeDocument} format.</p>
*
- * <p>The <code>ConverterCapabilities</code> object is what the
- * DocumentMerger utilizes to know how the "Office"
- * <code>Document</code> tags are supported in the "Device"
- * format.</p>
+ * <p>The {@code ConverterCapabilities} object is what the DocumentMerger
+ * utilizes to know how the "Office" {@code Document} tags are
+ * supported in the "Device" format.</p>
*
- * <p>The <code>DocumentMerger</code> object is created by a
- * the <code>DocumentMergerFactory</code> {@link
- * org.openoffice.xmerge.DocumentMergerFactory#createDocumentMerger
- * createDocumenMerger} method. When it is constructed, the
- * "Original Office" <code>Document</code> object is
- * passed in to be used as input.</p>
+ * <p>The {@code DocumentMerger} object is created by a the
+ * {@code DocumentMergerFactory} {@link
+ * org.openoffice.xmerge.DocumentMergerFactory#createDocumentMerger
+ * createDocumenMerger} method. When it is constructed, the "Original
+ * Office" {@code Document} object is passed in to be used as input.</p>
*
- * @see org.openoffice.xmerge.PluginFactory
- * @see org.openoffice.xmerge.DocumentMergerFactory
- * @see org.openoffice.xmerge.ConverterCapabilities
+ * @see org.openoffice.xmerge.PluginFactory
+ * @see org.openoffice.xmerge.DocumentMergerFactory
+ * @see org.openoffice.xmerge.ConverterCapabilities
*/
public interface DocumentMerger {
/**
- * <p>This method will find the changes that had happened
- * in the <code>modifiedDoc</code> <code>Document</code>
- * object given the designated original <code>Document</code>.</p>
+ * This method will find the changes that had happened in the
+ * {@code modifiedDoc} {@code Document} object given the designated original
+ * {@code Document}.
*
- * <p>Note that this process may need the knowledge of the
- * conversion process since some conversion process are lossy.
- * Items/Data that are lost during the conversion process are not
- * classified as changes. The main target of this method
- * is to apply the changes done in <code>modifiedDoc</code>
- * into the assigned original <code>Document</code> object, thus
- * it also will try to preserve items that were originally in
- * the original <code>Document</code>, but never got transferred
- * during the
- * {@link org.openoffice.xmerge.DocumentSerializer#serialize
- * serialize} process/method call. After this method call, the
- * original <code>Document</code> object will contain the changes
- * applied.</p>
+ * <p>Note that this process may need the knowledge of the conversion
+ * process since some conversion process are lossy. Items/Data that are
+ * lost during the conversion process are not classified as changes. The
+ * main target of this method is to apply the changes done in
+ * {@code modifiedDoc} into the assigned original {@code Document} object,
+ * thus it also will try to preserve items that were originally in the
+ * original {@code Document}, but never got transferred during the
+ * {@link org.openoffice.xmerge.DocumentSerializer#serialize serialize}
+ * process/method call. After this method call, the original
+ * {@code Document} object will contain the changes applied.</p>
*
- * <p>This method may or may not be thread-safe.
- * Also, it is expected that the user uses only one instance
- * of a <code>DocumentMerger</code> object per merge process.
- * Create another <code>DocumentMerger</code> object for another
- * merge process.</p>
+ * <p>This method may or may not be thread-safe. Also, it is expected that
+ * the user uses only one instance of a {@code DocumentMerger} object per
+ * merge process. Create another {@code DocumentMerger} object for another
+ * merge process.</p>
*
- * @param modifiedDoc device <code>Document</code> object.
+ * @param modifiedDoc device {@code Document} object.
*
- * @throws MergeException If any merge error occurs.
+ * @throws MergeException If any merge error occurs.
*/
void merge(Document modifiedDoc) throws MergeException;
-}
-
+}
\ No newline at end of file
diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentMergerFactory.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentMergerFactory.java
index 3ddbc56..e665d66 100644
--- a/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentMergerFactory.java
+++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentMergerFactory.java
@@ -19,36 +19,32 @@
package org.openoffice.xmerge;
/**
- * <p>All plug-in implementations of the <code>PluginFactory</code>
- * interface that also support merging must also implement
- * this interface.</p>
+ * All plug-in implementations of the {@code PluginFactory} interface that also
+ * support merging must also implement this interface.
*
- * <p>Merge is useful when an <code>OfficeDocument</code>
- * is converted to a "Device" <code>Document</code> format,
- * and the "Device" <code>Document</code> version is modified.
- * Those changes can be merged back into the original
- * <code>OfficeDocument</code> with the merger. The merger is capable
- * of doing this even if the "Device" format is lossy in
- * comparison to the <code>OfficeDocument</code> format.</p>
+ * <p>Merge is useful when an {@code OfficeDocument} is converted to a
+ * "Device" {@code Document} format, and the "Device"
+ * {@code Document} version is modified.</p>
*
- * @see PluginFactory
- * @see DocumentMerger
- * @see ConverterCapabilities
+ * <p>Those changes can be merged back into the original {@code OfficeDocument}
+ * with the merger. The merger is capable of doing this even if the
+ * "Device" format is lossy in comparison to the {@code OfficeDocument}
+ * format.</p>
*
+ * @see PluginFactory
+ * @see DocumentMerger
+ * @see ConverterCapabilities
*/
public interface DocumentMergerFactory {
/**
- * <p>Create a <code>DocumentMerger</code> object given a
- * <code>Document</code> object.</p>
+ * Create a {@code DocumentMerger} object given a {@code Document} object.
*
- * @param doc <code>Document</code> object that the created
- * <code>DocumentMerger</code> object uses as a base
- * <code>Document</code> for merging changes into.
+ * @param doc {@code Document} object that the created
+ * {@code DocumentMerger} object uses as a base {@code Document}
+ * for merging changes into.
*
- * @return A <code>DocumentMerger</code> object or null if none
- * exists.
+ * @return A {@code DocumentMerger} object or {@code null} if none exists.
*/
DocumentMerger createDocumentMerger(Document doc);
-}
-
+}
\ No newline at end of file
diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentSerializer.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentSerializer.java
index 6937fc4..c31e07c 100644
--- a/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentSerializer.java
+++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentSerializer.java
@@ -21,36 +21,34 @@ package org.openoffice.xmerge;
import java.io.IOException;
/**
- * <p>A <code>DocumentSerializer</code> represents a converter that
- * converts a "Office" <code>Document</code> to a
- * "Device" <code>Document</code> format.</p>
+ * A {@code DocumentSerializer} represents a converter that converts a
+ * "Office" {@code Document} to a "Device" {@code Document}
+ * format.
*
- * <p>The <code>DocumentSerializer</code> object is created by a
- * the <code>PluginFactory</code> {@link
- * org.openoffice.xmerge.DocumentSerializerFactory#createDocumentSerializer
- * createDocumentSerializer} method. When it is constructed, a
- * "Office" <code>Document</code> object is passed in to
- * be used as input.</p>
- * @see org.openoffice.xmerge.PluginFactory
- * @see org.openoffice.xmerge.DocumentSerializerFactory
+ * <p>The {@code DocumentSerializer} object is created by a the
+ * {@code PluginFactory} {@link
+ * org.openoffice.xmerge.DocumentSerializerFactory#createDocumentSerializer
+ * createDocumentSerializer} method. When it is constructed, a
+ * "Office" {@code Document} object is passed in to be used as input.
+ * </p>
+ *
+ * @see org.openoffice.xmerge.PluginFactory
+ * @see org.openoffice.xmerge.DocumentSerializerFactory
*/
public interface DocumentSerializer {
/**
- * <p>Convert the data passed into the <code>DocumentSerializer</code>
- * constructor into the "Device" <code>Document</code>
- * format.</p>
+ * Convert the data passed into the {@code DocumentSerializer} constructor
+ * into the "Device" {@code Document} format.
*
- * <p>This method may or may not be thread-safe. It is expected
- * that the user code does not call this method in more than one
- * thread. And for most cases, this method is only done once.</p>
+ * <p>This method may or may not be thread-safe. It is expected that the
+ * user code does not call this method in more than one thread. And for
+ * most cases, this method is only done once.</p>
*
- * @return <code>ConvertData</code> object to pass back the
- * converted data.
+ * @return {@code ConvertData} object to pass back the converted data.
*
- * @throws ConvertException If any conversion error occurs.
- * @throws IOException If any I/O error occurs.
+ * @throws ConvertException If any conversion error occurs.
+ * @throws IOException If any I/O error occurs.
*/
ConvertData serialize() throws ConvertException, IOException;
-}
-
+}
\ No newline at end of file
diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentSerializer2.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentSerializer2.java
index e2aee84..56a1a11 100644
--- a/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentSerializer2.java
+++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentSerializer2.java
@@ -21,43 +21,43 @@ package org.openoffice.xmerge;
import java.io.IOException;
/**
- * <p>A <code>DocumentSerializer2</code> represents a converter that
- * converts a "Office" <code>Document</code> to a
- * "Device" <code>Document</code> format.</p>
+ * A {@code DocumentSerializer2} represents a converter that converts a
+ * "Office" {@code Document} to a "Device" {@code Document}
+ * format.
*
- * <p>The <code>PluginFactory</code> {@link
- * org.openoffice.xmerge.DocumentSerializerFactory#createDocumentSerializer
- * createDocumentSerializer} method creates a <code>DocumentSerializer</code>,
- * which may or may not implement <code>DocumentSerializer2</code>.
- * When it is constructed, a
- * "Office" <code>Document</code> object is passed in to
- * be used as input.</p>
+ * <p>The {@code PluginFactory} {@link
+ * org.openoffice.xmerge.DocumentSerializerFactory#createDocumentSerializer
+ * createDocumentSerializer} method creates a {@code DocumentSerializer}, which
+ * may or may not implement {@code DocumentSerializer2}. When it is constructed,
+ * a "Office" {@code Document} object is passed in to be used as
+ * input.</p>
*
- * @see org.openoffice.xmerge.PluginFactory
- * @see org.openoffice.xmerge.DocumentSerializerFactory
+ * @see org.openoffice.xmerge.PluginFactory
+ * @see org.openoffice.xmerge.DocumentSerializerFactory
*/
public interface DocumentSerializer2 extends DocumentSerializer {
/**
- * <p>Convert the data passed into the <code>DocumentSerializer2</code>
- * constructor into the "Device" <code>Document</code>
- * format. The URL's passed may be used to resolve links and to name
- * the output device document(s).</p>
+ * Convert the data passed into the {@code DocumentSerializer2} constructor
+ * into the "Device" {@code Document} format.
*
- * <p>This method may or may not be thread-safe. It is expected
- * that the user code does not call this method in more than one
- * thread. And for most cases, this method is only done once.</p>
+ * <p>The URL's passed may be used to resolve links and to name the output
+ * device document(s).</p>
*
- * @return <code>ConvertData</code> object to pass back the
- * converted data.
+ * <p>This method may or may not be thread-safe. It is expected that the
+ * user code does not call this method in more than one thread. And for
+ * most cases, this method is only done once.</p>
*
- * @param officeURL URL of the office document (may be null if unknown)
- * @param deviceURL URL of the device document (may be null if unknown)
+ * @return {@code ConvertData} object to pass back the converted data.
*
- * @throws ConvertException If any conversion error occurs.
- * @throws IOException If any I/O error occurs.
+ * @param officeURL URL of the office document (may be null if
+ * unknown)
+ * @param deviceURL URL of the device document (may be null if
+ * unknown)
+ *
+ * @throws ConvertException If any conversion error occurs.
+ * @throws IOException If any I/O error occurs.
*/
ConvertData serialize(String officeURL, String deviceURL) throws
ConvertException, IOException;
-}
-
+}
\ No newline at end of file
diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentSerializerFactory.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentSerializerFactory.java
index 2622566..12ab4c0 100644
--- a/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentSerializerFactory.java
+++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentSerializerFactory.java
@@ -19,36 +19,32 @@
package org.openoffice.xmerge;
/**
- * <p>A <code>DocumentSerializer</code> object is used to convert
- * from the "Office" <code>Document</code> format to the
- * "Device" <code>Document</code> format.</p>
+ * A {@code DocumentSerializer} object is used to convert from the
+ * "Office" {@code Document} format to the "Device"
+ * {@code Document} format.
*
- * <p>All plug-in implementations of the <code>PluginFactory</code>
- * interface that also support serialization must also
- * implement this interface.</p>
+ * <p>All plug-in implementations of the {@code PluginFactory} interface that
+ * also support serialization must also implement this interface.</p>
*
- * @see PluginFactory
- * @see DocumentSerializer
+ * @see PluginFactory
+ * @see DocumentSerializer
*/
public interface DocumentSerializerFactory {
/**
- * <p>The <code>DocumentSerializer</code> is used to convert
- * from the "Office" <code>Document</code> format
- * to the "Device" <code>Document</code> format.</p>
+ * The {@code DocumentSerializer} is used to convert from the
+ * "Office" {@code Document} format to the "Device"
+ * {@code Document} format.
*
- * The <code>ConvertData</code> object is passed along to the
- * created <code>DocumentSerializer</code> via its constructor.
- * The <code>ConvertData</code> is read and converted when the
- * the <code>DocumentSerializer</code> object's
- * <code>serialize</code> method is called.
+ * <p>The {@code ConvertData} object is passed along to the created
+ * {@code DocumentSerializer} via its constructor. The {@code ConvertData}
+ * is read and converted when the the {@code DocumentSerializer} object's
+ * {@code serialize} method is called.</p>
*
- * @param doc <code>Document</code> object that the created
- * <code>DocumentSerializer</code> object uses
- * as input.
+ * @param doc {@code Document} object that the created
+ * {@code DocumentSerializer} object uses as input.
*
- * @return A <code>DocumentSerializer</code> object.
+ * @return A <code>DocumentSerializer</code> object.
*/
DocumentSerializer createDocumentSerializer(Document doc);
-}
-
+}
\ No newline at end of file
diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/MergeException.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/MergeException.java
index 3ac78c6..c592bfb 100644
--- a/xmerge/source/xmerge/java/org/openoffice/xmerge/MergeException.java
+++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/MergeException.java
@@ -19,18 +19,16 @@
package org.openoffice.xmerge;
/**
- * This <code>Exception</code> is thrown by merge algorithms.
+ * This {@code Exception} is thrown by merge algorithms.
*/
public class MergeException extends Exception {
/**
- * Exception thrown by merge algorithms.
+ * Exception thrown by merge algorithms.
*
- * @param message Message to be included in the
- * <code>Exception</code>.
+ * @param message Message to be included in the {@code Exception}.
*/
public MergeException(String message) {
super(message);
}
-}
-
+}
\ No newline at end of file
diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/PluginFactory.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/PluginFactory.java
index 62df009..c00a21b 100644
--- a/xmerge/source/xmerge/java/org/openoffice/xmerge/PluginFactory.java
+++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/PluginFactory.java
@@ -23,161 +23,141 @@ import java.io.InputStream;
import java.io.IOException;
/**
- * <p>A <code>PluginFactory</code> encapsulates the
- * conversions from one <code>Document</code> format to another.
- * It provides conversions in both directions. Refer to the
- * <a href="package-summary.html#package_description">
- * package description</a> for its usage.</p>
+ * A {@code PluginFactory} encapsulates the conversions from one {@code Document}
+ * format to another.
*
- * <p>Conversion from the "Office" <code>Document</code>
- * format to a "Device" <code>Document</code> format may
- * be lossy, i.e. some information may be lost. If a plug-in
- * implements the <code>DocumentMergerFactory</code> interface,
- * then there is the possibility for merging the changes done on the
- * "Device" <code>Document</code> back to the original
- * "Office" <code>Document</code> via the
- * <code>DocumentMerger</code> interface.</p>
+ * <p>It provides conversions in both directions. Refer to the
+ * <a href="package-summary.html#package_description"> package description</a>
+ * for its usage.</p>
*
- * <p>Plug-ins that convert from the "Device"
- * <code>Document</code> format to the "Office"
- * <code>Document</code> format must implement the
- * <code>DocumentDeserializerFactory</code> interface. Plug-ins
- * that convert from the "Office" <code>Document</code>
- * format to the "Device" format must implement the
- * <code>DocumentSerializerFactory</code> interface.
+ * <p>Conversion from the "Office" {@code Document} format to a
+ * "Device" {@code Document} format may be lossy, i.e. some
+ * information may be lost. If a plug-in implements the
+ * {@code DocumentMergerFactory} interface, then there is the possibility for
+ * merging the changes done on the "Device" {@code Document} back to
+ * the original "Office" {@code Document} via the {@code DocumentMerger}
+ * interface.</p>
*
- * <p>All plug-ins should have an associated Plugin Configuration XML
- * File which describes the capabilities of the plug-in. If the
- * plug-in is bundled in a jarfile, then this XML file is also bundled
- * with the jarfile. The data in the XML file is managed by the
- * <code>ConverterInfo</code> object. The <code>ConverterInfoMgr</code>
- * manages a registry of all <code>ConverterInfo</code> objects. For
- * more information about this XML file, refer to
- * <a href="converter/xml/sxc/package-summary.html">
- * org.openoffice.xmerge.util.registry</a>.</p>
+ * <p>Plug-ins that convert from the "Device" {@code Document} format
+ * to the "Office" {@code Document} format must implement the
+ * {@code DocumentDeserializerFactory} interface. Plug-ins that convert from
+ * the "Office" {@code Document} format to the "Device"
+ * format must implement the {@code DocumentSerializerFactory} interface.</p>
*
- * @see Document
- * @see DocumentSerializer
- * @see DocumentSerializerFactory
- * @see DocumentDeserializer
- * @see DocumentDeserializerFactory
- * @see DocumentMerger
- * @see DocumentMergerFactory
- * @see ConverterInfo
- * @see org.openoffice.xmerge.util.registry.ConverterInfoMgr
+ * <p>All plug-ins should have an associated Plug-in Configuration XML File which
+ * describes the capabilities of the plug-in. If the plug-in is bundled in a
+ * jarfile, then this XML file is also bundled with the jarfile. The data in
+ * the XML file is managed by the {@code ConverterInfo} object. The
+ * {@code ConverterInfoMgr} manages a registry of all {@code ConverterInfo}
+ * objects. For more information about this XML file, refer to
+ * <a href="converter/xml/sxc/package-summary.html">org.openoffice.xmerge.util.registry</a>.
+ * </p>
+ *
+ * @see Document
+ * @see DocumentSerializer
+ * @see DocumentSerializerFactory
+ * @see DocumentDeserializer
+ * @see DocumentDeserializerFactory
+ * @see DocumentMerger
+ * @see DocumentMergerFactory
+ * @see ConverterInfo
+ * @see org.openoffice.xmerge.util.registry.ConverterInfoMgr
*/
public abstract class PluginFactory {
/**
- * Cached <code>ConvertInfo</code> object.
+ * Cached {@code ConvertInfo} object.
*/
private ConverterInfo ciCache;
-
/**
- * Constructor that caches the <code>ConvertInfo</code> that
- * corresponds to the registry information for this plug-in.
+ * Constructor that caches the {@code ConvertInfo} that corresponds to the
+ * registry information for this plug-in.
*
- * @param ci <code>ConvertInfo</code> object.
+ * @param ci {@code ConvertInfo} object.
*/
public PluginFactory(ConverterInfo ci) {
ciCache=ci;
}
-
/**
- * Returns the <code>ConvertInfo</code> that corresponds to this
- * plug-in.
+ * Returns the {@code ConvertInfo} that corresponds to this plug-in.
*
- * @return The <code>ConvertInfo</code> that corresponds to this
- * plug-in.
+ * @return The {@code ConvertInfo} that corresponds to this plug-in.
*/
public ConverterInfo getConverterInfo () {
return ciCache;
}
-
/**
- * <p>Create a <code>Document</code> object that corresponds to
- * the Office data passed in via the <code>InputStream</code>
- * object. This abstract method must be implemented for each
- * plug-in.</p>
+ * Create a {@code Document} object that corresponds to the Office data
+ * passed in via the {@code InputStream} object.
+ *
+ * <p>This abstract method must be implemented for each plug-in.</p>
*
- * <p>This method will read from the given <code>InputStream</code>
- * object. The returned <code>Document</code> object will contain
- * the necessary data for the other objects created by the
- * <code>PluginFactory</code> to process, like a
- * <code>DocumentSerializer</code> object and a
- * <code>DocumentMerger</code> object.</p>
+ * <p>This method will read from the given {@code InputStream} object. The
+ * returned {@code Document} object will contain the necessary data for the
+ * other objects created by the {@code PluginFactory} to process, like a
+ * {@code DocumentSerializer} object and a {@code DocumentMerger} object.</p>
*
- * @param name The <code>Document</code> name.
- * @param is <code>InputStream</code> object corresponding
- * to the <code>Document</code>.
+ * @param name The {@code Document} name.
+ * @param is {@code InputStream} object corresponding to the
+ * {@code Document}.
*
- * @return A <code>Document</code> object representing the
- * particular <code>Document</code> format for the
- * <code>PluginFactory</code>.
+ * @return A {@code Document} object representing the particular
+ * {@code Document} format for the {@code PluginFactory}.
*
- * @throws IOException If any I/O error occurs.
+ * @throws IOException If any I/O error occurs.
*/
public abstract Document createOfficeDocument(String name, InputStream is)
throws IOException;
-
/**
- * <p>Create a <code>Document</code> object that corresponds to
- * the Office data passed in via the <code>InputStream</code>
- * object. This abstract method must be implemented for each
- * plug-in.</p>
+ * Create a {@code Document} object that corresponds to the Office data
+ * passed in via the {@code InputStream} object.
*
- * <p>This method will read from the given <code>InputStream</code>
- * object. The returned <code>Document</code> object will contain
- * the necessary data for the other objects created by the
- * <code>PluginFactory</code> to process, like a
- * <code>DocumentSerializer</code> object and a
- * <code>DocumentMerger</code> object.</p>
+ * <p>This abstract method must be implemented for each plug-in.</p>
*
- * @param name The <code>Document</code> name.
- * @param is <code>InputStream</code> object corresponding
- * to the <code>Document</code>.
- * @param isZip <code>boolean</code> to show that the created office
- * document is to be zipped.
+ * <p>This method will read from the given {@code InputStream} object. The
+ * returned {@code Document} object will contain the necessary data for the
+ * other objects created by the {@code PluginFactory} to process, like a
+ * {@code DocumentSerializer} object and a {@code DocumentMerger} object.</p>
*
- * @return A <code>Document</code> object representing the
- * particular <code>Document</code> format for the
- * <code>PluginFactory</code>.
+ * @param name The {@code Document} name.
+ * @param is {@code InputStream} object corresponding to the
+ * {@code Document}.
+ * @param isZip {@code boolean} to show that the created office document
+ * is to be zipped.
*
- * @throws IOException If any I/O error occurs.
+ * @return A {@code Document} object representing the particular
+ * {@code Document} format for the {@code PluginFactory}.
+ *
+ * @throws IOException If any I/O error occurs.
*/
- public abstract Document createOfficeDocument(String name, InputStream is,boolean isZip)
- throws IOException;
-
+ public abstract Document createOfficeDocument(String name, InputStream is,
+ boolean isZip) throws IOException;
/**
- * <p>Create a <code>Document</code> object that corresponds to
- * the device data passed in via the <code>InputStream</code>
- * object. This abstract method must be implemented for each
- * plug-in.</p>
+ * Create a {@code Document} object that corresponds to the device data
+ * passed in via the {@code InputStream} object.
*
- * <p>This method will read from the given <code>InputStream</code>
- * object. The returned <code>Document</code> object will contain
- * the necessary data for the other objects created by the
- * <code>PluginFactory</code> to process, like a
- * <code>DocumentSerializer</code> object and a
- * <code>DocumentMerger</code> object.</p>
+ * <p>This abstract method must be implemented for each plug-in.</p>
*
- * @param name The <code>Document</code> name.
- * @param is <code>InputStream</code> object corresponding
- * to the <code>Document</code>.
+ * <p>This method will read from the given {@code InputStream} object. The
+ * returned {@code Document} object will contain the necessary data for the
+ * other objects created by the {@code PluginFactory} to process, like a
+ * {@code DocumentSerializer} object and a {@code DocumentMerger} object.</p>
*
- * @return A <code>Document</code> object representing the
- * particular <code>Document</code> format for the
- * <code>PluginFactory</code>.
+ * @param name The {@code Document} name.
+ * @param is {@code InputStream} object corresponding to the
+ * {@code Document}.
*
- * @throws IOException If any I/O error occurs.
+ * @return A {@code Document} object representing the particular
+ * {@code Document} format for the {@code PluginFactory}.
+ *
+ * @throws IOException If any I/O error occurs.
*/
public abstract Document createDeviceDocument(String name, InputStream is)
throws IOException;
-}
-
+}
\ No newline at end of file
diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/Version.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/Version.java
index 27c2519..02d16ee 100644
--- a/xmerge/source/xmerge/java/org/openoffice/xmerge/Version.java
+++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/Version.java
@@ -19,10 +19,10 @@
package org.openoffice.xmerge;
/**
- * This class provides a quick utility to check the version of the
- * jar file. It has a main method that prints out the version
- * info. It also provides two static methods for runtime classes
- * to query.
+ * This class provides a quick utility to check the version of the jar file.
+ *
+ * <p>It has a main method that prints out the version info. It also provides
+ * two static methods for runtime classes to query.</p>
*/
public final class Version {
@@ -31,41 +31,38 @@ public final class Version {
private static final Package pkg = version.getClass().getPackage();
/**
- * Private constructor to provide a singleton instance.
+ * Private constructor to provide a singleton instance.
*/
private Version() {
}
/**
- * Returns specification version.
+ * Returns specification version.
*
- * @return The specification version.
+ * @return The specification version.
*/
public static String getSpecificationVersion() {
return pkg.getSpecificationVersion();
}
/**
- * Returns implementation version.
+ * Returns implementation version.
*
- * @return The implementation version.
+ * @return The implementation version.
*/
-
public static String getImplementationVersion() {
return pkg.getImplementationVersion();
}
/**
- * Main method for printing out version info.
+ * Main method for printing out version info.
*
- * @param args Array of arguments, not used.
+ * @param args Array of arguments, not used.
*/
public static void main(String args[]) {
-
System.out.println("Specification-Title: " + pkg.getSpecificationTitle());
System.out.println("Specification-Vendor: " + pkg.getSpecificationVendor());
System.out.println("Specification-Version: " + pkg.getSpecificationVersion());
System.out.println("Implementation-Version: " + pkg.getImplementationVersion());
}
-}
-
+}
\ No newline at end of file
diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/dom/DOMDocument.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/dom/DOMDocument.java
index c7088a6..a2e67c0 100644
--- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/dom/DOMDocument.java
+++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/dom/DOMDocument.java
@@ -24,7 +24,6 @@ import java.io.StringWriter;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
-
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.ParserConfigurationException;
@@ -41,17 +40,16 @@ import org.xml.sax.SAXException;
import org.openoffice.xmerge.util.Debug;
/**
- * An implementation of <code>Document</code> for
- * StarOffice documents.
+ * An implementation of {@code Document} for StarOffice documents.
*/
public class DOMDocument
implements org.openoffice.xmerge.Document {
- /** Factory for <code>DocumentBuilder</code> objects. */
+ /** Factory for {@code DocumentBuilder} objects. */
private static DocumentBuilderFactory factory =
DocumentBuilderFactory.newInstance();
- /** DOM <code>Document</code> of content.xml. */
+ /** DOM {@code Document} of content.xml. */
private Document contentDoc = null;
private String documentName = null;
@@ -59,54 +57,50 @@ public class DOMDocument
private String fileExt = null;
/**
- * Default constructor.
+ * Default constructor.
*
- * @param name <code>Document</code> name.
- * @param ext <code>Document</code> extension.
+ * @param name {@code Document} name.
+ * @param ext {@code Document} extension.
*/
- public DOMDocument(String name,String ext)
- {
- this(name,ext,true, false);
+ public DOMDocument(String name,String ext) {
+ this(name,ext,true, false);
}
- /**
- * Returns the file extension of the <code>Document</code>
- * represented.
+ /**
+ * Returns the file extension of the {@code Document} represented.
*
- * @return file extension of the <code>Document</code>.
+ * @return file extension of the {@code Document}.
*/
private String getFileExtension() {
return fileExt;
}
-
/**
- * Constructor with arguments to set <code>namespaceAware</code>
- * and <code>validating</code> flags.
+ * Constructor with arguments to set {@code namespaceAware} and
+ * {@code validating} flags.
*
- * @param name <code>Document</code> name (may or may not
- * contain extension).
- * @param ext <code>Document</code> extension.
- * @param namespaceAware Value for <code>namespaceAware</code> flag.
- * @param validating Value for <code>validating</code> flag.
+ * @param name {@code Document} name (may or may not contain
+ * extension).
+ * @param ext {@code Document} extension.
+ * @param namespaceAware Value for {@code namespaceAware} flag.
+ * @param validating Value for {@code validating} flag.
*/
- private DOMDocument(String name, String ext,boolean namespaceAware, boolean validating) {
+ private DOMDocument(String name, String ext,boolean namespaceAware,
+ boolean validating) {
factory.setValidating(validating);
factory.setNamespaceAware(namespaceAware);
this.fileExt = ext;
- this.documentName = trimDocumentName(name);
+ this.documentName = trimDocumentName(name);
this.fileName = documentName + getFileExtension();
}
-
/**
- * Removes the file extension from the <code>Document</code>
- * name.
+ * Removes the file extension from the {@code Document} name.
*
- * @param name Full <code>Document</code> name with extension.
+ * @param name Full {@code Document} name with extension.
*
- * @return Name of <code>Document</code> without the extension.
+ * @return Name of {@code Document} without the extension.
*/
private String trimDocumentName(String name) {
String temp = name.toLowerCase();
@@ -122,15 +116,15 @@ public class DOMDocument
return name;
}
-
/**
- * Return a DOM <code>Document</code> object of the document content
- * file. Note that a content DOM is not created when the constructor
- * is called. So, either the <code>read</code> method or the
- * <code>initContentDOM</code> method will need to be called ahead
- * on this object before calling this method.
+ * Return a DOM {@code Document} object of the document content file.
+ *
+ * <p>Note that a content DOM is not created when the constructor is called.
+ * So, either the {@code read} method or the {@code initContentDOM} method
+ * will need to be called ahead on this object before calling this method.
+ * </p>
*
- * @return DOM <code>Document</code> object.
+ * @return DOM {@code Document} object.
*/
public Document getContentDOM() {
@@ -138,46 +132,42 @@ public class DOMDocument
}
/**
- * Sets the Content of the <code>Document</code> to the contents of the
- * supplied <code>Node</code> list.
+ * Sets the Content of the {@code Document} to the contents of the supplied
+ * {@code Node} list.
*
- * @param newDom DOM <code>Document</code> object.
+ * @param newDom DOM {@code Document} object.
*/
public void setContentDOM( Node newDom) {
contentDoc=(Document)newDom;
}
-
/**
- * Return the name of the <code>Document</code>.
+ * Return the name of the {@code Document}.
*
- * @return The name of <code>Document</code>.
+ * @return The name of {@code Document}.
*/
public String getName() {
return documentName;
}
-
/**
- * Return the file name of the <code>Document</code>, possibly
- * with the standard extension.
+ * Return the file name of the {@code Document}, possibly with the standard
+ * extension.
*
- * @return The file name of <code>Document</code>.
+ * @return The file name of {@code Document}.
*/
public String getFileName() {
return fileName;
}
-
/**
- * Read the Office <code>Document</code> from the specified
- * <code>InputStream</code>.
+ * Read the Office {@code Document} from the specified {@code InputStream}.
*
- * @param is Office document <code>InputStream</code>.
+ * @param is Office document {@code InputStream}.
*
- * @throws IOException If any I/O error occurs.
+ * @throws IOException If any I/O error occurs.
*/
public void read(InputStream is) throws IOException {
Debug.log(Debug.INFO, "reading file");
@@ -185,19 +175,18 @@ public class DOMDocument
DocumentBuilder builder = factory.newDocumentBuilder();
contentDoc = builder.parse(is);
} catch (ParserConfigurationException ex) {
- System.out.println("Error:"+ ex);
+ System.out.println("Error:"+ ex);
} catch (SAXException ex) {
- System.out.println("Error:"+ ex);
+ System.out.println("Error:"+ ex);
}
}
-
/**
- * Write out content to the supplied <code>OutputStream</code>.
+ * Write out content to the supplied {@code OutputStream}.
*
- * @param os XML <code>OutputStream</code>.
+ * @param os XML {@code OutputStream}.
*
- * @throws IOException If any I/O error occurs.
+ * @throws IOException If any I/O error occurs.
*/
public void write(OutputStream os) throws IOException {
@@ -207,20 +196,17 @@ public class DOMDocument
os.write(contentBytes);
}
-
/**
- * <p>Write out a <code>org.w3c.dom.Document</code> object into a
- * <code>byte</code> array.</p>
+ * Write out a {@code org.w3c.dom.Document} object into a {@code byte} array.
*
- * <p>TODO: remove dependency on com.sun.xml.tree.XmlDocument
- * package!</p>
+ * <p>TODO: remove dependency on {@code com.sun.xml.tree.XmlDocument} package!
+ * </p>
*
- * @param doc DOM <code>Document</code> object.
+ * @param doc DOM {@code Document} object.
*
- * @return <code>byte</code> array of DOM <code>Document</code>
- * object.
+ * @return {@code byte} array of DOM {@code Document} object.
*
- * @throws IOException If any I/O error occurs.
+ * @throws IOException If any I/O error occurs.
*/
private byte[] docToBytes(Document doc)
throws IOException {
@@ -248,83 +234,71 @@ public class DOMDocument
// The method is in the XMLDocument class itself, not a helper
meth = jaxpDoc.getMethod("write",
- new Class[] { Class.forName("java.io.OutputStream") } );
+ new Class[]{Class.forName("java.io.OutputStream")});
- meth.invoke(doc, new Object [] { baos } );
- }
- else if (domImpl.equals("org.apache.crimson.tree.XmlDocument"))
- {
- System.out.println("Using Crimson");
- Class<?> crimsonDoc = Class.forName("org.apache.crimson.tree.XmlDocument");
- // The method is in the XMLDocument class itself, not a helper
+ meth.invoke(doc, new Object[]{baos});
+ } else if (domImpl.equals("org.apache.crimson.tree.XmlDocument")) {
+ System.out.println("Using Crimson");
+ Class<?> crimsonDoc = Class.forName("org.apache.crimson.tree.XmlDocument");
+ // The method is in the XMLDocument class itself, not a helper
meth = crimsonDoc.getMethod("write",
- new Class[] { Class.forName("java.io.OutputStream") } );
+ new Class[]{Class.forName("java.io.OutputStream")});
- meth.invoke(doc, new Object [] { baos } );
- }
- else if (domImpl.equals("org.apache.xerces.dom.DocumentImpl")
- || domImpl.equals("org.apache.xerces.dom.DeferredDocumentImpl")) {
+ meth.invoke(doc, new Object[]{baos});
+ } else if (domImpl.equals("org.apache.xerces.dom.DocumentImpl")
+ || domImpl.equals("org.apache.xerces.dom.DeferredDocumentImpl")) {
System.out.println("Using Xerces");
// Try for Xerces
- Class<?> xercesSer =
- Class.forName("org.apache.xml.serialize.XMLSerializer");
+ Class<?> xercesSer
+ = Class.forName("org.apache.xml.serialize.XMLSerializer");
// Get the OutputStream constructor
// May want to use the OutputFormat parameter at some stage too
- con = xercesSer.getConstructor(new Class []
- { Class.forName("java.io.OutputStream"),
- Class.forName("org.apache.xml.serialize.OutputFormat") } );
-
+ con = xercesSer.getConstructor(new Class[]{Class.forName("java.io.OutputStream"),
+ Class.forName("org.apache.xml.serialize.OutputFormat")});
// Get the serialize method
meth = xercesSer.getMethod("serialize",
- new Class [] { Class.forName("org.w3c.dom.Document") } );
-
+ new Class[]{Class.forName("org.w3c.dom.Document")});
// Get an instance
- Object serializer = con.newInstance(new Object [] { baos, null } );
-
+ Object serializer = con.newInstance(new Object[]{baos, null});
// Now call serialize to write the document
- meth.invoke(serializer, new Object [] { doc } );
- }
- else if (domImpl.equals("gnu.xml.dom.DomDocument")) {
+ meth.invoke(serializer, new Object[]{doc});
+ } else if (domImpl.equals("gnu.xml.dom.DomDocument")) {
System.out.println("Using GNU");
Class<?> gnuSer = Class.forName("gnu.xml.dom.ls.DomLSSerializer");
// Get the serialize method
meth = gnuSer.getMethod("serialize",
- new Class [] { Class.forName("org.w3c.dom.Node"),
- Class.forName("java.io.OutputStream") } );
+ new Class[]{Class.forName("org.w3c.dom.Node"),
+ Class.forName("java.io.OutputStream")});
// Get an instance
Object serializer = gnuSer.newInstance();
// Now call serialize to write the document
- meth.invoke(serializer, new Object [] { doc, baos } );
- }
- else {
+ meth.invoke(serializer, new Object[]{doc, baos});
+ } else {
// We dont have another parser
try {
- DOMSource domSource = new DOMSource(doc);
- StringWriter writer = new StringWriter();
- StreamResult result = new StreamResult(writer);
- TransformerFactory tf = TransformerFactory.newInstance();
- Transformer transformer = tf.newTransformer();
- transformer.transform(domSource, result);
- return writer.toString().getBytes();
- }
- catch (Exception e) {
+ DOMSource domSource = new DOMSource(doc);
+ StringWriter writer = new StringWriter();
+ StreamResult result = new StreamResult(writer);
+ TransformerFactory tf = TransformerFactory.newInstance();
+ Transformer transformer = tf.newTransformer();
+ transformer.transform(domSource, result);
+ return writer.toString().getBytes();
+ } catch (Exception e) {
// We don't have another parser
throw new IOException("No appropriate API (JAXP/Xerces) to serialize XML document: " + domImpl);
}
}
- }
- catch (ClassNotFoundException cnfe) {
+ } catch (ClassNotFoundException cnfe) {
throw new IOException(cnfe.toString());
- }
- catch (Exception e) {
+ } catch (Exception e) {
// We may get some other errors, but the bottom line is that
// the steps being executed no longer work
throw new IOException(e.toString());
@@ -334,9 +308,4 @@ public class DOMDocument
return bytes;
}
-
-}
-
-
-
-
+}
\ No newline at end of file
diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PalmDB.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PalmDB.java
index 643cd64..765c6f8 100644
--- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PalmDB.java
+++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PalmDB.java
@@ -21,139 +21,130 @@ package org.openoffice.xmerge.converter.palm;
import java.io.UnsupportedEncodingException;
/**
- * <p>This class contains data for a single Palm database for use during
- * a conversion process.</p>
+ * This class contains data for a single Palm database for use during a
+ * conversion process.
*
- * <p>It contains zero or more <code>Record</code> objects stored in an
- * array. The index of the <code>Record</code> object in the array is
- * the <code>Record</code> id or number for that specific <code>Record</code> object.
- * Note that this class does not check for maximum number of Records
- * allowable in an actual PDB.</p>
+ * <p>It contains zero or more {@code Record} objects stored in an array. The
+ * index of the {@code Record} object in the array is the {@code Record} id or
+ * number for that specific {@code Record} object. Note that this class does
+ * not check for maximum number of Records allowable in an actual PDB.</p>
*
- * <p>This class also contains the PDB name associated with the Palm
- * database it represents. A PDB name consists of 32 bytes of a
- * certain encoding (extended ASCII in this case).</p>
+ * <p>This class also contains the PDB name associated with the Palm database
+ * it represents. A PDB name consists of 32 bytes of a certain encoding
+ * (extended ASCII in this case).</p>
*
- * <p>The non default constructors take in a name parameter which may not
- * be the exact PDB name to be used. The name parameter in
- * <code>String</code> or <code>byte</code> array are converted to an exact
- * <code>NAME_LENGTH</code> byte array. If the length of the name is less
- * than <code>NAME_LENGTH</code>, it is padded with '\0' characters. If it
- * is more, it gets truncated. The last character in the resulting byte
- * array is always a '\0' character. The resulting byte array is stored in
- * <code>bName</code>, and a corresponding String object <code>sName</code>
- * that contains characters without the '\0' characters.</p>
+ * <p>The non default constructors take in a name parameter which may not be
+ * the exact PDB name to be used. The name parameter in {@code String} or
+ * {@code byte} array are converted to an exact {@code NAME_LENGTH} byte array.
+ * If the length of the name is less than {@code NAME_LENGTH}, it is padded
+ * with {@code '\0'} characters. If it is more, it gets truncated. The last
+ * character in the resulting byte array is always a {@code '\0'} character.
+ * The resulting byte array is stored in {@code bName}, and a corresponding
+ * {@code String} object {@code sName} that contains characters without the
+ * {@code '\0'} characters.</p>
*
- * <p>The <code>write</code> method is called within the
- * {@link org.openoffice.xmerge.converter.palm.PalmDocument#write
- * PalmDocument.write} method for writing out its data to the <code>OutputStream</code>
- * object.</p>
+ * <p>The {@code write} method is called within the {@link
+ * org.openoffice.xmerge.converter.palm.PalmDocument#write
+ * PalmDocument.write} method for writing out its data to the
+ * {@code OutputStream} object.</p>
*
- * <p>The <code>read</code> method is called within the
- * {@link org.openoffice.xmerge.converter.palm.PalmDocument#read
- * PalmDocument.read} method for reading in its data from the <code>InputStream</code>
- * object.</p>
+ * <p>The {@code read} method is called within the {@link
+ * org.openoffice.xmerge.converter.palm.PalmDocument#read PalmDocument.read}
+ * method for reading in its data from the {@code InputStream} object.</p>
*
- * @see PalmDocument
- * @see Record
+ * @see PalmDocument
+ * @see Record
*/
public final class PalmDB {
-
-
- /** Number of bytes for the name field in the PDB. */
+ /** Number of bytes for the name field in the PDB. */
public final static int NAME_LENGTH = 32;
- /** List of <code>Record</code> objects. */
+ /** List of {@code Record} objects. */
private Record[] records;
- /** PDB name in bytes. */
+ /** PDB name in bytes. */
private byte[] bName = null;
- /** PDB name in String. */
+ /** PDB name in String. */
private String sName = null;
- /** Creator ID. */
+ /** Creator ID. */
private int creatorID = 0;
- /** Type ID */
+ /** Type ID */
private int typeID = 0;
/**
- * PDB version. Palm UInt16.
- * It is treated as a number here, since there is no unsigned 16 bit
- * in Java, int is used instead, but only 2 bytes are written out or
- * read in.
+ * PDB version. Palm UInt16.
+ * It is treated as a number here, since there is no unsigned 16 bit in Java,
+ * {@code int} is used instead, but only 2 bytes are written out or read in.
*/
private int version = 0;
/**
- * PDB attribute - flags for the database.
- * Palm UInt16. Unsignedness should be irrelevant.
+ * PDB attribute - flags for the database.
+ * Palm UInt16. Unsignedness should be irrelevant.
*/
private short attribute = 0;
-
/**
- * Default constructor.
+ * Default constructor.
*
- * @param creatorID The PDB Creator ID.
- * @param typeID The PDB Type ID.
- * @param version The PDB header version.
- * @param attribute The PDB header attribute.
+ * @param creatorID The PDB Creator ID.
+ * @param typeID The PDB Type ID.
+ * @param version The PDB header version.
+ * @param attribute The PDB header attribute.
*/
public PalmDB(int creatorID, int typeID, int version, short attribute) {
-
records = new Record[0];
setAttributes(creatorID, typeID, version, attribute);
}
-
/**
- * Constructor to create <code>PalmDB</code> object with
- * <code>Record</code> objects. <code>recs.length</code>
- * can be zero for an empty PDB.
+ * Constructor to create {@code PalmDB} object with {@code Record} objects.
+ *
+ * <p>{@code recs.length} can be zero for an empty PDB.</p>
*
- * @param name Suggested PDB name in a <code>String</code>.
- * @param creatorID The PDB Creator ID.
- * @param typeID The PDB Type ID.
- * @param version The PDB header version.
- * @param attribute The PDB header attribute.
- * @param recs Array of <code>Record</code> objects.
+ * @param name Suggested PDB name in a {@code String}.
+ * @param creatorID The PDB Creator ID.
+ * @param typeID The PDB Type ID.
+ * @param version The PDB header version.
+ * @param attribute The PDB header attribute.
+ * @param recs Array of {@code Record} objects.
*
- * @throws UnsupportedEncodingException If <code>name</code> is
- * not properly encoded.
- * @throws NullPointerException If <code>recs</code> is null.
+ * @throws UnsupportedEncodingException If {@code name} is not properly
+ * encoded.
+ * @throws NullPointerException If {@code recs} is {@code null}.
*/
public PalmDB(String name, int creatorID, int typeID, int version,
- short attribute, Record[] recs)
- throws UnsupportedEncodingException {
+ short attribute, Record[] recs)
+ throws UnsupportedEncodingException {
this(name.getBytes(PdbUtil.ENCODING), creatorID, typeID, version,
attribute, recs);
}
-
/**
- * Constructor to create object with <code>Record</code>
- * objects. <code>recs.length</code> can be zero for an
- * empty PDB.
+ * Constructor to create object with {@code Record} objects.
+ *
+ * <p>{@code recs.length} can be zero for an empty PDB.</p>
*
- * @param name Suggested PDB name in a <code>byte</code>
- * array.
- * @param creatorID The PDB Creator ID.
- * @param typeID The PDB Type ID.
- * @param version The PDB header version.
- * @param attribute The PDB header attribute.
- * @param recs Array of <code>Record</code> objects.
+ * @param name Suggested PDB name in a {@code byte} array.
+ * @param creatorID The PDB Creator ID.
+ * @param typeID The PDB Type ID.
+ * @param version The PDB header version.
+ * @param attribute The PDB header attribute.
+ * @param recs Array of {@code Record} objects.
*
- * @throws UnsupportedEncodingException If <code>name</code> is
- * not properly encoded.
- * @throws NullPointerException If recs is null.
+ * @throws UnsupportedEncodingException If {@code name} is not properly
+ * encoded.
+ * @throws NullPointerException If {@code recs} is {@code null}.
*/
public PalmDB(byte[] name, int creatorID, int typeID, int version,
- short attribute, Record[] recs) throws UnsupportedEncodingException {
+ short attribute, Record[] recs)
+ throws UnsupportedEncodingException {
store(name);
@@ -162,36 +153,35 @@ public final class PalmDB {
setAttributes(creatorID, typeID, version, attribute);
}
-
/**
- * Set the attributes for the <code>PalmDB</code> object.
+ * Set the attributes for the {@code PalmDB} object.
*
- * @param creatorID The PDB Creator ID.
- * @param typeID The PDB Type ID.
- * @param version The PDB header version.
- * @param attribute The PDB header attribute.
+ * @param creatorID The PDB Creator ID.
+ * @param typeID The PDB Type ID.
+ * @param version The PDB header version.
+ * @param attribute The PDB header attribute.
*/
- private void setAttributes (int creatorID, int typeID, int version, short attribute) {
+ private void setAttributes (int creatorID, int typeID, int version,
+ short attribute) {
this.creatorID = creatorID;
this.typeID = typeID;
this.version = version;
this.attribute = attribute;
}
-
/**
- * This private method is mainly used by the constructors above.
- * to store bytes into name and also create a <code>String</code>
- * representation. and also by the <code>read</code> method.
+ * This private method is mainly used by the constructors above.
+ *
+ * <p>to store bytes into name and also create a {@code String}
+ * representation, and also by the {@code read} method.</p>
*
- * TODO: Note that this method assumes that the <code>byte</code>
- * array parameter contains one character per <code>byte</code>,
- * else it would truncate improperly.
+ * <p>TODO: Note that this method assumes that the {@code byte} array
+ * parameter contains one character per {@code byte}, else it would
+ * truncate improperly.</p>
*
- * @param bytes PDB name in <code>byte</code> array.
+ * @param bytes PDB name in {@code byte<} array.
*
- * @throws UnsupportedEncodingException If ENCODING is
- * not supported.
+ * @throws UnsupportedEncodingException If ENCODING is not supported.
*/
private void store(byte[] bytes) throws UnsupportedEncodingException {
@@ -202,11 +192,9 @@ public final class PalmDB {
// Note that the last byte in bName has to be '\0'.
int lastIndex = NAME_LENGTH - 1;
-
int len = (bytes.length < lastIndex)? bytes.length: lastIndex;
int i;
-
for (i = 0; i < len; i++) {
if (bytes[i] == 0) {
@@ -220,130 +208,105 @@ public final class PalmDB {
sName = new String(bName, 0, i, PdbUtil.ENCODING);
}
-
/**
- * Returns creator ID.
+ * Returns creator ID.
*
- * @return The creator ID.
+ * @return The creator ID.
*/
public int getCreatorID() {
-
return creatorID;
}
-
/**
- * Returns type ID.
+ * Returns type ID.
*
- * @return The type ID.
+ * @return The type ID.
*/
public int getTypeID() {
-
return typeID;
}
-
/**
- * Returns attribute flag.
+ * Returns attribute flag.
*
- * @return The attribute flag.
+ * @return The attribute flag.
*/
public short getAttribute() {
-
return attribute;
}
-
/**
- * Returns version.
+ * Returns version.
*
- * @return The version.
+ * @return The version.
*/
public int getVersion() {
-
return version;
}
-
/**
- * Return the number of Records contained in this
- * PDB <code>PalmDB</code> object.
+ * Return the number of Records contained in this PDB {@code PalmDB} object.
*
- * @return Number of <code>Record</code> objects.
+ * @return Number of {@code Record} objects.
*/
public int getRecordCount() {
-
return records.length;
}
-
/**
- * Return the specific <code>Record</code> object associated
- * with the <code>Record</code> number.
+ * Return the specific {@code Record} object associated with the
+ * {@code Record} number.
*
- * @param index <code>Record</code> index number.
+ * @param index {@code Record} index number.
*
- * @return The <code>Record</code> object in the specified index
+ * @return The {@code Record} object in the specified index
*
- * @throws ArrayIndexOutOfBoundsException If index is out of bounds.
+ * @throws ArrayIndexOutOfBoundsException If index is out of bounds.
*/
public Record getRecord(int index) {
-
return records[index];
}
-
/**
- * Return the list of <code>Record</code> objects.
+ * Return the list of {@code Record} objects.
*
- * @return The array of <code>Record</code> objects.
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list