Thread: [FOray-commit] SF.net SVN: foray:[10907] trunk/foray (Page 4)
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2010-02-01 18:44:44
|
Revision: 10907
http://foray.svn.sourceforge.net/foray/?rev=10907&view=rev
Author: victormote
Date: 2010-02-01 18:44:35 +0000 (Mon, 01 Feb 2010)
Log Message:
-----------
Push Commons CLI in a bit further.
Modified Paths:
--------------
trunk/foray/foray-app/src/java/org/foray/app/CommandLineOptions.java
trunk/foray/foray-app/src/java/org/foray/app/FOray.java
trunk/foray/foray-app/src/java/org/foray/app/FOraySpecific.java
trunk/foray/foray-common/src/java/org/foray/common/StringUtil.java
trunk/foray/foray-core/src/java/org/foray/core/ConfigurationParser.java
trunk/foray/foray-core/src/java/org/foray/core/SessionConfig.java
Modified: trunk/foray/foray-app/src/java/org/foray/app/CommandLineOptions.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/CommandLineOptions.java 2010-02-01 17:09:24 UTC (rev 10906)
+++ trunk/foray/foray-app/src/java/org/foray/app/CommandLineOptions.java 2010-02-01 18:44:35 UTC (rev 10907)
@@ -29,12 +29,14 @@
package org.foray.app;
import org.foray.common.Logging;
+import org.foray.common.StringUtil;
import org.foray.common.url.URLFactory;
import org.foray.common.url.URLUtil;
import org.foray.core.FOrayException;
import org.foray.core.SessionConfig;
import org.foray.output.OutputConfig;
+import org.apache.commons.cli.CommandLine;
import org.apache.commons.logging.Log;
import org.xml.sax.InputSource;
@@ -99,16 +101,21 @@
/** State variable indicating current index into args[]. */
private transient int currentArgument = 0;
+ /** The command line parsed by Commons CLI. */
+ private CommandLine parsedCommandLine;
+
/**
* Constructor.
* @param args The command-line arguments.
* @param logger The logger.
+ * @param parsedCommandLine The command line parsed by Commons CLI.
* @throws FOrayException For errors parsing options.
* @throws FileNotFoundException For errors finding specified files.
*/
- public CommandLineOptions(final String[] args, final Log logger)
+ public CommandLineOptions(final String[] args, final Log logger, final CommandLine parsedCommandLine)
throws FOrayException, FileNotFoundException {
this.log = logger;
+ this.parsedCommandLine = parsedCommandLine;
boolean optionsParsed = true;
this.sessionConfig = new SessionConfig(this.log);
@@ -127,6 +134,7 @@
printUsage(this.log);
throw e;
}
+ this.setConfigurationOptions();
}
/**
@@ -334,9 +342,6 @@
} else if (this.outputmode == null) {
this.outputmode = OutputTargetType.PDF;
this.outfile = new File(args[this.currentArgument]);
- } else {
- throw new FOrayException("Don't know what to do with "
- + args[this.currentArgument]);
}
return true;
}
@@ -351,8 +356,8 @@
this.currentArgument++;
return true;
}
- throw new FOrayException("Invalid command-line option: \""
- + args[this.currentArgument] + "\"");
+ /* TODO: Next statement is not right. This section will be removed after we get converted to Commons CLI. */
+ return true;
}
/**
@@ -386,6 +391,16 @@
}
/**
+ * Sets configuration options from parsed command-line options.
+ */
+ private void setConfigurationOptions() {
+ if (this.parsedCommandLine.hasOption("catalogs")) {
+ this.sessionConfig.parseOption("xml-catalog", this.parsedCommandLine.getOptionValue("catalogs"),
+ OutputConfig.PRECEDENCE_COMMAND_LINE);
+ }
+ }
+
+ /**
* Sets the output mode.
* @param mode The new output mode to set.
* @throws FOrayException If the output mode has already been set.
@@ -460,10 +475,6 @@
}
}
-// private void setLogger(final Log newLogger) {
-// this.log = newLogger;
-// }
-
/**
* Returns the output type specifiedon the command-line.
* @return The integer representing a Renderer type.
@@ -584,72 +595,90 @@
return this.language;
}
-// /**
-// * return either the fofile or the xmlfile
-// */
-// public File getInputFile() {
-// switch (inputmode) {
-// case INPUT_FO:
-// return foInput;
-// case INPUT_XSLT:
-// return xmlInput;
-// default:
-// return foInput;
-// }
-// }
-
/**
* Shows the commandline syntax including a summary of all available
* options and some examples.
* @param logger The logger on which to print the message.
*/
public static void printUsage(final Log logger) {
- logger.error("\nUSAGE\nFOray [options] [-fo|-xml] infile "
+ final String indent1 = " ";
+ final String indent2 = " ";
+ final String indent2ndLine = " ";
+ logger.error(
+ StringUtil.LINE_SEPARATOR
+ + "USAGE"
+ + StringUtil.LINE_SEPARATOR
+ + "FOray [options] [-fo|-xml] infile "
+ "[-xsl file] [-awt|-pdf|-mif|-pcl|-ps|-txt|-at|-print] "
- + "<outfile>\n"
- + " [OPTIONS]\n"
- + " -c cfg.xml use additional configuration file cfg.xml\n"
- + " -so option-key option-value\n"
- + " configure a session-option key-value pair\n"
- + "\n"
- + " [INPUT]\n"
- + " infile xsl:fo input file (the same as the "
- + "next)\n"
- + " -fo infile xsl:fo input file\n"
- + " -xml infile xml input file, must be used together "
- + "with -xsl\n"
- + " -xsl stylesheet xslt stylesheet\n"
- + "\n"
- + " [OUTPUT]\n"
- + " outfile input will be rendered as pdf file "
- + "into outfile\n"
- + " -pdf outfile input will be rendered as pdf file "
- + "(outfile req'd)\n"
- + " -awt input will be displayed on screen\n"
- + " -mif outfile input will be rendered as mif file "
- + "(outfile req'd)\n"
- + " -pcl outfile input will be rendered as pcl file "
- + "(outfile req'd)\n"
- + " -ps outfile input will be rendered as PostScript "
- + "file (outfile req'd)\n"
- + " -txt outfile input will be rendered as text file "
- + "(outfile req'd)\n"
- + " -svg outfile input will be rendered as an svg slides "
- + "file (outfile req'd)\n"
- + " -at outfile representation of area tree as XML "
- + "(outfile req'd)\n"
- + " -print input file will be rendered and sent to "
- + "the printer\n"
- + " see print specific options with "
- + "\"-print help\"\n"
- + "\n [Examples]\n"
- + " FOray foo.fo foo.pdf\n"
- + " FOray -fo foo.fo -pdf foo.pdf (does the same as the "
- + "previous line)\n"
- + " FOray -xsl foo.xsl -xml foo.xml -pdf foo.pdf\n"
- + " FOray foo.fo -mif foo.mif\n"
- + " FOray foo.fo -print or FOray -print foo.fo\n"
- + " FOray foo.fo -awt\n");
+ + "<outfile>"
+ + StringUtil.LINE_SEPARATOR
+ + indent1 + "[OPTIONS]"
+ + StringUtil.LINE_SEPARATOR
+ + indent2 + "-c cfg.xml use additional configuration file cfg.xml"
+ + StringUtil.LINE_SEPARATOR
+ + indent2 + "-so option-key option-value"
+ + StringUtil.LINE_SEPARATOR
+ + indent2ndLine + "configure a session-option key-value pair"
+ + StringUtil.LINE_SEPARATOR
+ + StringUtil.LINE_SEPARATOR
+ + indent1 + "[INPUT]"
+ + StringUtil.LINE_SEPARATOR
+ + indent2 + "infile xsl:fo input file (the same as the "
+ + "next)"
+ + StringUtil.LINE_SEPARATOR
+ + indent2 + "-fo infile xsl:fo input file"
+ + StringUtil.LINE_SEPARATOR
+ + indent2 + "-xml infile xml input file, must be used together "
+ + "with -xsl"
+ + StringUtil.LINE_SEPARATOR
+ + indent2 + "-xsl stylesheet xslt stylesheet"
+ + StringUtil.LINE_SEPARATOR
+ + StringUtil.LINE_SEPARATOR
+ + indent1 + "[OUTPUT]"
+ + StringUtil.LINE_SEPARATOR
+ + indent2 + "outfile input will be rendered as pdf file "
+ + "into outfile"
+ + StringUtil.LINE_SEPARATOR
+ + indent2 + "-pdf outfile input will be rendered as pdf file "
+ + "(outfile req'd)"
+ + StringUtil.LINE_SEPARATOR
+ + indent2 + "-awt input will be displayed on screen"
+ + StringUtil.LINE_SEPARATOR
+ + indent2 + "-mif outfile input will be rendered as mif file "
+ + "(outfile req'd)"
+ + StringUtil.LINE_SEPARATOR
+ + indent2 + "-pcl outfile input will be rendered as pcl file "
+ + "(outfile req'd)"
+ + StringUtil.LINE_SEPARATOR
+ + indent2 + "-ps outfile input will be rendered as PostScript "
+ + "file (outfile req'd)"
+ + StringUtil.LINE_SEPARATOR
+ + indent2 + "-txt outfile input will be rendered as text file "
+ + "(outfile req'd)"
+ + StringUtil.LINE_SEPARATOR
+ + indent2 + "-svg outfile input will be rendered as an svg slides "
+ + "file (outfile req'd)"
+ + StringUtil.LINE_SEPARATOR
+ + indent2 + "-at outfile representation of area tree as XML "
+ + "(outfile req'd)"
+ + StringUtil.LINE_SEPARATOR
+ + indent2 + "-print input file will be rendered and sent to "
+ + "the printer"
+ + StringUtil.LINE_SEPARATOR
+ + indent2ndLine + "see print specific options with "
+ + "\"-print help\""
+ + StringUtil.LINE_SEPARATOR
+ + StringUtil.LINE_SEPARATOR
+ + indent1 + "[Examples]"
+ + StringUtil.LINE_SEPARATOR
+ + indent2 + FOray.class.getName() + StringUtil.SINGLE_SPACE + FOray.COMMAND_LINE_EXAMPLE_001
+ + StringUtil.LINE_SEPARATOR
+ + indent2 + FOray.class.getName() + StringUtil.SINGLE_SPACE + FOray.COMMAND_LINE_EXAMPLE_002
+ + StringUtil.LINE_SEPARATOR
+ + indent2 + FOray.class.getName() + StringUtil.SINGLE_SPACE + FOray.COMMAND_LINE_EXAMPLE_003
+ + StringUtil.LINE_SEPARATOR
+ + indent2 + FOray.class.getName() + StringUtil.SINGLE_SPACE + FOray.COMMAND_LINE_EXAMPLE_004
+ + StringUtil.LINE_SEPARATOR);
}
/**
Modified: trunk/foray/foray-app/src/java/org/foray/app/FOray.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/FOray.java 2010-02-01 17:09:24 UTC (rev 10906)
+++ trunk/foray/foray-app/src/java/org/foray/app/FOray.java 2010-02-01 18:44:35 UTC (rev 10907)
@@ -92,6 +92,12 @@
configurationFile.setArgName("file");
clOptions.addOption(configurationFile);
+ final Option catalogOption = new Option("catalogs", "xml-catalog", true, "path to an OASOS XML catalog");
+ catalogOption.setRequired(false);
+ catalogOption.setArgName("file");
+ catalogOption.setArgs(Option.UNLIMITED_VALUES);
+ clOptions.addOption(catalogOption);
+
/* Input. */
final OptionGroup inputGroup = new OptionGroup();
inputGroup.setRequired(true);
@@ -179,9 +185,9 @@
public static void main(final String[] args) {
/* Checkstyle-GenericIllegalRegexp-Off. */
final Options commandLineOptions = FOray.getCommandLineOptions();
+ CommandLine parsedCommandLine = null;
try {
- /* TODO: Keep the return value and use it downstream. Right now all we are doing is testing the options. */
- FOray.parseCommandLine(commandLineOptions, args);
+ parsedCommandLine = FOray.parseCommandLine(commandLineOptions, args);
} catch (final ParseException e) {
System.out.println(e.getMessage());
final HelpFormatter helpFormatter = new HelpFormatter();
@@ -193,7 +199,7 @@
final Log logger = Logging.makeDefaultLogger();
try {
- options = new CommandLineOptions(args, logger);
+ options = new CommandLineOptions(args, logger, parsedCommandLine);
final Starter starter = options.getStarter();
starter.run();
} catch (final FOrayException e) {
Modified: trunk/foray/foray-app/src/java/org/foray/app/FOraySpecific.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/FOraySpecific.java 2010-02-01 17:09:24 UTC (rev 10906)
+++ trunk/foray/foray-app/src/java/org/foray/app/FOraySpecific.java 2010-02-01 18:44:35 UTC (rev 10907)
@@ -53,7 +53,6 @@
import org.axsl.text.TextServer;
import org.apache.commons.logging.Log;
-import org.apache.xerces.util.XMLCatalogResolver;
import org.xml.sax.EntityResolver;
@@ -135,7 +134,7 @@
*/
public static FontServer makeFontServer(final Log logger,
final SessionConfig configuration) throws FOrayException {
- final EntityResolver entityResolver = makeEntityResolver(configuration);
+ final EntityResolver entityResolver = configuration.makeEntityResolver();
final PsServer psServer = FOraySpecific.makePsServer();
final FontServer4a forayFontServer = new FontServer4a(logger, psServer);
forayFontServer.setBaseFontURL(
@@ -268,23 +267,4 @@
return new PsServer4a();
}
- /**
- * Create a standard entity resolver for use with FOray.
- * @param configuration The session configuration.
- * @return The newly-created entity resolver, or null if no XML catalog
- * is specified.
- */
- public static EntityResolver makeEntityResolver(
- final SessionConfig configuration) {
- final String catalog = configuration.optionXMLCatalog();
- if (catalog == null) {
- return null;
- }
- final String [] catalogs = {catalog};
- final XMLCatalogResolver resolver = new XMLCatalogResolver();
- resolver.setPreferPublic(true);
- resolver.setCatalogList(catalogs);
- return resolver;
- }
-
}
Modified: trunk/foray/foray-common/src/java/org/foray/common/StringUtil.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/StringUtil.java 2010-02-01 17:09:24 UTC (rev 10906)
+++ trunk/foray/foray-common/src/java/org/foray/common/StringUtil.java 2010-02-01 18:44:35 UTC (rev 10907)
@@ -37,6 +37,12 @@
/** An empty string suitable for String comparisons or initializations. */
public static final String EMPTY_STRING = "";
+ /** A single space. */
+ public static final String SINGLE_SPACE = " ";
+
+ /** A static capture of the system line separator. */
+ public static final String LINE_SEPARATOR = System.getProperty("line.separator");
+
/** The null terminator character, used to mark the end of Strings in char arrays in some
* applications, U+0000. */
public static final char NULL_TERMINATOR = 0;
Modified: trunk/foray/foray-core/src/java/org/foray/core/ConfigurationParser.java
===================================================================
--- trunk/foray/foray-core/src/java/org/foray/core/ConfigurationParser.java 2010-02-01 17:09:24 UTC (rev 10906)
+++ trunk/foray/foray-core/src/java/org/foray/core/ConfigurationParser.java 2010-02-01 18:44:35 UTC (rev 10907)
@@ -31,7 +31,6 @@
import org.foray.common.Configuration;
import org.apache.commons.logging.Log;
-import org.apache.xerces.util.XMLCatalogResolver;
import org.xml.sax.Attributes;
import org.xml.sax.EntityResolver;
@@ -172,8 +171,7 @@
/* TODO: This is not the right EntityResolver to use. We need to
* use or create one that can find the configuration parser DTD
* in a jar file that is part of the distribution. */
- final EntityResolver entityResolver = makeEntityResolver(
- this.sessionConfig);
+ final EntityResolver entityResolver = this.sessionConfig.makeEntityResolver();
xmlReader.setEntityResolver(entityResolver);
this.logger.debug("Config: Using "
+ xmlReader.getClass().getName() + " as SAX2 Parser.");
@@ -186,26 +184,6 @@
}
/**
- * Creates and returns an entity resolver.
- * @param sessionConfig The session configuration, which may contain a
- * specifier for an XML catalog.
- * @return The entity resolver, if a catalog has been specified, or null
- * if not.
- */
- public static EntityResolver makeEntityResolver(
- final SessionConfig sessionConfig) {
- final String catalog = sessionConfig.optionXMLCatalog();
- if (catalog == null) {
- return null;
- }
- final String [] catalogs = {catalog};
- final XMLCatalogResolver resolver = new XMLCatalogResolver();
- resolver.setPreferPublic(true);
- resolver.setCatalogList(catalogs);
- return resolver;
- }
-
- /**
* {@inheritDoc}
*/
public void startDocument() {
Modified: trunk/foray/foray-core/src/java/org/foray/core/SessionConfig.java
===================================================================
--- trunk/foray/foray-core/src/java/org/foray/core/SessionConfig.java 2010-02-01 17:09:24 UTC (rev 10906)
+++ trunk/foray/foray-core/src/java/org/foray/core/SessionConfig.java 2010-02-01 18:44:35 UTC (rev 10907)
@@ -31,7 +31,10 @@
import org.foray.common.Configuration;
import org.apache.commons.logging.Log;
+import org.apache.xerces.util.XMLCatalogResolver;
+import org.xml.sax.EntityResolver;
+
import java.net.URL;
/**
@@ -252,6 +255,23 @@
}
/**
+ * Creates and returns an entity resolver.
+ * @return The entity resolver, if a catalog has been specified, or null
+ * if not.
+ */
+ public EntityResolver makeEntityResolver() {
+ final String catalog = this.optionXMLCatalog();
+ if (catalog == null) {
+ return null;
+ }
+ final String [] catalogs = {catalog};
+ final XMLCatalogResolver resolver = new XMLCatalogResolver();
+ resolver.setPreferPublic(true);
+ resolver.setCatalogList(catalogs);
+ return resolver;
+ }
+
+ /**
* Sets the path to the base document that should be used for finding
* resources with relative URLs.
* @param baseDocument The path to the base document.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2010-02-01 22:00:47
|
Revision: 10912
http://foray.svn.sourceforge.net/foray/?rev=10912&view=rev
Author: victormote
Date: 2010-02-01 22:00:33 +0000 (Mon, 01 Feb 2010)
Log Message:
-----------
Clean up more command-line logic.
Modified Paths:
--------------
trunk/foray/foray-app/src/java/org/foray/app/CommandLineOptions.java
trunk/foray/foray-app/src/java/org/foray/app/FOray.java
trunk/foray/foray-app/src/java/org/foray/app/ant/FOrayAntTaskStarter.java
trunk/foray/foray-app/src/java/org/foray/app/test/TestConverter.java
trunk/foray/foray-common/src/java/org/foray/common/Configuration.java
trunk/foray/foray-core/src/java/org/foray/core/ConfigurationParser.java
trunk/foray/foray-core/src/java/org/foray/core/SessionConfig.java
trunk/foray/foray-output/src/java/org/foray/output/OutputConfig.java
Added Paths:
-----------
trunk/foray/foray-common/src/java/org/foray/common/ConfigurationException.java
Modified: trunk/foray/foray-app/src/java/org/foray/app/CommandLineOptions.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/CommandLineOptions.java 2010-02-01 20:38:24 UTC (rev 10911)
+++ trunk/foray/foray-app/src/java/org/foray/app/CommandLineOptions.java 2010-02-01 22:00:33 UTC (rev 10912)
@@ -28,6 +28,7 @@
package org.foray.app;
+import org.foray.common.ConfigurationException;
import org.foray.common.Logging;
import org.foray.common.StringUtil;
import org.foray.common.url.URLFactory;
@@ -39,7 +40,6 @@
import org.apache.commons.logging.Log;
import java.io.File;
-import java.io.FileNotFoundException;
import java.net.MalformedURLException;
import java.net.URL;
@@ -57,10 +57,6 @@
/** Constant indicating that the input is XML + XSLT. */
public static final int INPUT_XSLT = 2;
- /** The number of command-line arguments needed to specify standard options,
- * that is, one for the "-so", one for the key, and one for the value. */
- private static final int STANDARD_OPTIONS_QTY_ARGUMENTS = 3;
-
/** The user configuration file. */
private URL userConfig = null;
@@ -94,9 +90,6 @@
/** The logger. */
private Log log;
- /** State variable indicating current index into args[]. */
- private transient int currentArgument = 0;
-
/** The command line parsed by Commons CLI. */
private CommandLine parsedCommandLine;
@@ -109,11 +102,10 @@
* If they are not, the results are undefined.
* Any testing for consistency should be done upstream.
* This does NOT mean, for example, that all URLs are valid, only that they are specified in the right place.
- * @throws FOrayException For errors parsing options.
- * @throws FileNotFoundException For errors finding specified files.
+ * @throws ConfigurationException For errors parsing options.
*/
public CommandLineOptions(final String[] args, final Log logger, final CommandLine parsedCommandLine)
- throws FOrayException, FileNotFoundException {
+ throws ConfigurationException {
this.sessionConfig = new SessionConfig(this.log);
this.rendererOptions = new OutputConfig(this.log);
this.log = logger;
@@ -124,7 +116,7 @@
try {
this.foInput = URLFactory.createURL(foValue);
} catch (final MalformedURLException e) {
- throw new FOrayException("Command-line error: Malformed URL for -fo: " + foValue);
+ throw new ConfigurationException("Command-line error: Malformed URL for -fo: " + foValue, e);
}
this.sessionConfig.setBaseDocument(this.foInput);
} else {
@@ -133,14 +125,14 @@
try {
this.xmlInput = URLFactory.createURL(xmlValue);
} catch (final MalformedURLException e) {
- throw new FOrayException("Command-line error: Malformed URL for -xml: " + xmlValue);
+ throw new ConfigurationException("Command-line error: Malformed URL for -xml: " + xmlValue, e);
}
this.sessionConfig.setBaseDocument(this.xmlInput);
final String xslValue = this.parsedCommandLine.getOptionValue("xsl");
try {
this.xsltInput = URLFactory.createURL(xslValue);
} catch (final MalformedURLException e) {
- throw new FOrayException("Command-line error: Malformed URL for -xsl: " + xslValue);
+ throw new ConfigurationException("Command-line error: Malformed URL for -xsl: " + xslValue, e);
}
}
@@ -148,17 +140,8 @@
- boolean optionsParsed = true;
- try {
- optionsParsed = parseOptions(args);
- if (optionsParsed) {
- adjustLogger();
- debug();
- }
- } catch (final FOrayException e) {
- printUsage(this.log);
- throw e;
- }
+ adjustLogger();
+ debug();
this.setConfigurationOptions();
}
@@ -230,93 +213,18 @@
}
/**
- * Parses the commandline arguments.
- * @param args The command-line arguments to parse.
- * @return true if parse was successful and procesing can continue, false
- * if processing should stop.
- * @throws FOrayException if there was an error in the format of the
- * options.
+ * Sets configuration options from parsed command-line options.
+ * @throws ConfigurationException For errors in the configuration values.
*/
- private boolean parseOptions(final String args[]) throws FOrayException {
- this.currentArgument = 0;
- while (this.currentArgument < args.length) {
- final boolean optionParsedSuccessfully = parseOneOption(args);
- if (! optionParsedSuccessfully) {
- printUsage(this.log);
- return false;
- }
- this.currentArgument ++;
- }
- return true;
- }
-
- /**
- * Parses one command-line option.
- * @param args The command-line arguments.
- * @return True if the option was successfully parsed, false otherwise.
- * @throws FOrayException For errors in the options.
- */
- private boolean parseOneOption(final String[] args) throws FOrayException {
- if (args[this.currentArgument].equals("-c")) {
- if ((this.currentArgument + 1 == args.length)
- || (args[this.currentArgument + 1].charAt(0) == '-')) {
- throw new FOrayException("if you use '-c', you must "
- + "specify the name of the configuration file");
- }
+ private void setConfigurationOptions() throws ConfigurationException {
+ if (this.parsedCommandLine.hasOption("c")) {
try {
- this.userConfig = URLFactory.createURL(
- args[this.currentArgument + 1]);
+ final String configurationValue = this.parsedCommandLine.getOptionValue("c");
+ this.userConfig = URLFactory.createURL(configurationValue);
} catch (final MalformedURLException e) {
- throw new FOrayException(e);
+ throw new ConfigurationException("Command-line error: Malformed URL for -c");
}
- this.currentArgument++;
- return true;
}
- if (args[this.currentArgument].equals("-so")) {
- final boolean success = parseConfigurationOption(args);
- if (success) {
- this.currentArgument += 2;
- }
- return success;
- }
- /* TODO: Next statement is not right. This section will be removed after we get converted to Commons CLI. */
- return true;
- }
-
- /**
- * Parses a configuration option.
- * @param args The command-line arguments.
- * @return True iff the option was successfully parsed.
- * @throws FOrayException If the option is not in the expected key-value
- * pair.
- */
- private boolean parseConfigurationOption(final String[] args)
- throws FOrayException {
- /*
- * Configuration options are always in key-value pairs, so there are
- * a total of 3 arguments for each, the current one "-so", indicating
- * that it is a configuration option, followed by the key and the value.
- */
- if (this.currentArgument
- + CommandLineOptions.STANDARD_OPTIONS_QTY_ARGUMENTS
- > args.length) {
- throw new FOrayException("Argument " + this.currentArgument
- + " must be followed by key and value.");
- }
- final String key = args[this.currentArgument + 1];
- final String value = args[this.currentArgument + 2];
- if (this.sessionConfig.parseOption(key, value,
- SessionConfig.PRECEDENCE_COMMAND_LINE)) {
- return true;
- }
- return this.rendererOptions.parseOption(key, value,
- OutputConfig.PRECEDENCE_COMMAND_LINE);
- }
-
- /**
- * Sets configuration options from parsed command-line options.
- */
- private void setConfigurationOptions() {
if (this.parsedCommandLine.hasOption("catalogs")) {
this.sessionConfig.parseOption("xml-catalog", this.parsedCommandLine.getOptionValue("catalogs"),
OutputConfig.PRECEDENCE_COMMAND_LINE);
Modified: trunk/foray/foray-app/src/java/org/foray/app/FOray.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/FOray.java 2010-02-01 20:38:24 UTC (rev 10911)
+++ trunk/foray/foray-app/src/java/org/foray/app/FOray.java 2010-02-01 22:00:33 UTC (rev 10912)
@@ -28,6 +28,7 @@
package org.foray.app;
+import org.foray.common.ConfigurationException;
import org.foray.common.Logging;
import org.foray.core.FOrayException;
import org.foray.core.SessionConfig;
@@ -43,8 +44,6 @@
import org.apache.commons.cli.PosixParser;
import org.apache.commons.logging.Log;
-import java.io.FileNotFoundException;
-
/**
* Command-line entry point to the FOray application.
*/
@@ -228,7 +227,7 @@
}
}
System.exit(2);
- } catch (final FileNotFoundException e) {
+ } catch (final ConfigurationException e) {
logger.error("" + e.getMessage());
if (options != null) {
final SessionConfig sessionConfig = options.getSessionConfig();
Modified: trunk/foray/foray-app/src/java/org/foray/app/ant/FOrayAntTaskStarter.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/ant/FOrayAntTaskStarter.java 2010-02-01 20:38:24 UTC (rev 10911)
+++ trunk/foray/foray-app/src/java/org/foray/app/ant/FOrayAntTaskStarter.java 2010-02-01 22:00:33 UTC (rev 10912)
@@ -33,6 +33,7 @@
import org.foray.app.OutputTargetFactory;
import org.foray.app.OutputTargetType;
import org.foray.app.Starter;
+import org.foray.common.ConfigurationException;
import org.foray.core.FOrayDocument;
import org.foray.core.FOrayException;
import org.foray.core.FOraySession;
@@ -229,6 +230,9 @@
} catch (final IOException e) {
this.task.log("Error setting base directory: " + e,
Project.MSG_ERR);
+ } catch (final ConfigurationException e) {
+ this.task.log("Error setting base directory: " + e,
+ Project.MSG_ERR);
}
// Render if "force" flag is set OR
@@ -313,8 +317,7 @@
inputSource, null);
if (this.task.getRendererType() == OutputTargetType.XML) {
- this.outputConfig.parseOption("fineDetail", "true",
- SessionConfig.PRECEDENCE_DEFAULT);
+ this.outputConfig.setFineDetail(Boolean.TRUE, SessionConfig.PRECEDENCE_DEFAULT);
}
final OutputTarget outputTarget =
OutputTargetFactory.makeOutputTarget(
Modified: trunk/foray/foray-app/src/java/org/foray/app/test/TestConverter.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/test/TestConverter.java 2010-02-01 20:38:24 UTC (rev 10911)
+++ trunk/foray/foray-app/src/java/org/foray/app/test/TestConverter.java 2010-02-01 22:00:33 UTC (rev 10912)
@@ -31,6 +31,7 @@
import org.foray.app.FOraySpecific;
import org.foray.app.OutputTargetFactory;
import org.foray.app.OutputTargetType;
+import org.foray.common.ConfigurationException;
import org.foray.common.Logging;
import org.foray.common.url.URLFactory;
import org.foray.core.FOrayDocument;
@@ -321,6 +322,8 @@
SessionConfig.PRECEDENCE_DEFAULT);
} catch (final IOException e) {
this.log.error("Error setting base directory");
+ } catch (final ConfigurationException e) {
+ this.log.error("Error setting base directory");
}
final FOraySession session = FOraySpecific.makeFOraySession(
@@ -359,10 +362,8 @@
}
final OutputConfig renderOptions = new OutputConfig(this.log);
- renderOptions.parseOption("fineDetail", "false",
- SessionConfig.PRECEDENCE_DEFAULT);
- renderOptions.parseOption("consistentOutput", "true",
- SessionConfig.PRECEDENCE_DEFAULT);
+ renderOptions.setFineDetail(Boolean.FALSE, SessionConfig.PRECEDENCE_DEFAULT);
+ renderOptions.setConsistentOutput(Boolean.TRUE, SessionConfig.PRECEDENCE_DEFAULT);
final OutputTarget renderer = OutputTargetFactory.makeOutputTarget(
rendererType, renderOptions, bos, session.getLogger(),
session.getGraphicServer());
Modified: trunk/foray/foray-common/src/java/org/foray/common/Configuration.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/Configuration.java 2010-02-01 20:38:24 UTC (rev 10911)
+++ trunk/foray/foray-common/src/java/org/foray/common/Configuration.java 2010-02-01 22:00:33 UTC (rev 10912)
@@ -67,9 +67,6 @@
* the command-line. */
public static final byte PRECEDENCE_COMMAND_LINE = 40;
- /** The logger. */
- private Log logger;
-
/**
* Map whose key is the option name, and whose value is the option
* value. Every member of options should have a corresponding item in
@@ -90,7 +87,6 @@
* @param logger The Log instance to be used.
*/
protected Configuration(final Log logger) {
- this.logger = logger;
setDefaults();
}
@@ -214,9 +210,9 @@
* value.
* @return True if the option was successfully added, false if it does not
* belong in this Configuration implementation.
+ * @throws ConfigurationException For an invalid value for the given key.
*/
- public abstract boolean parseOption(String key, String value,
- int precedenceValue);
+ public abstract boolean parseOption(String key, String value, int precedenceValue) throws ConfigurationException;
/**
* Adds an item to the configuration without giving the subclass an
@@ -252,17 +248,16 @@
* @param key A string containing the key value for the configuration value.
* @param value The unparsed boolean value.
* @return The parsed Boolean.
+ * @throws ConfigurationException If <code>value</code> is neither "true" nor "false".
*/
- protected Boolean parseBoolean(final String key, final String value) {
+ protected Boolean parseBoolean(final String key, final String value) throws ConfigurationException {
if (value.equalsIgnoreCase("true")) {
return Boolean.TRUE;
}
if (value.equalsIgnoreCase("false")) {
return Boolean.FALSE;
}
- this.getLogger().error("Value true or false expected for " + key + ": "
- + value + ".");
- return null;
+ throw new ConfigurationException("Value true or false expected for " + key + ": " + value + ".");
}
/**
@@ -271,16 +266,16 @@
* @param key A string containing the key value for the configuration value.
* @param directory The unparsed URL directory value.
* @return The parsed URL.
+ * @throws ConfigurationException If <code>fileName</code> is malformed, or if it is not a directory.
*/
- protected URL parseURLDirectory(final String key, final String directory) {
+ protected URL parseURLDirectory(final String key, final String directory) throws ConfigurationException {
final URL url = parseURL(key, directory);
if (url == null) {
return null;
}
final boolean isDirectory = URLUtil.isDirectory(url);
if (! isDirectory) {
- this.getLogger().warn("Configuration \"" + key
- + "\" should be a directory, not a file:\n "
+ throw new ConfigurationException("Configuration \"" + key + "\" should be a directory, not a file:\n "
+ directory);
}
return url;
@@ -292,16 +287,16 @@
* @param key A string containing the key value for the configuration value.
* @param fileName The unparsed URL name.
* @return The parsed URL.
+ * @throws ConfigurationException If <code>fileName</code> is malformed, or if it is not a file.
*/
- protected URL parseURLFile(final String key, final String fileName) {
+ protected URL parseURLFile(final String key, final String fileName) throws ConfigurationException {
final URL url = parseURL(key, fileName);
if (url == null) {
return null;
}
final boolean isDirectory = URLUtil.isDirectory(url);
if (isDirectory) {
- this.getLogger().warn("Configuration \"" + key
- + "\" should be a file, not a directory:\n "
+ throw new ConfigurationException("Configuration \"" + key + "\" should be a file, not a directory:\n "
+ fileName);
}
return url;
@@ -312,8 +307,9 @@
* @param key A string containing the key value for the configuration value.
* @param urlString The unparsed URL name.
* @return The parsed URL.
+ * @throws ConfigurationException If <code>urlString</code> is malformed.
*/
- protected URL parseURL(final String key, final String urlString) {
+ protected URL parseURL(final String key, final String urlString) throws ConfigurationException {
if (urlString == null) {
return null;
}
@@ -321,9 +317,7 @@
try {
url = URLFactory.createURL(urlString);
} catch (final MalformedURLException mfue) {
- this.getLogger().error("Invalid " + key + ": " + urlString);
- this.getLogger().error(mfue.getMessage());
- return null;
+ throw new ConfigurationException("Invalid " + key + ": " + urlString, mfue);
}
return url;
}
@@ -346,16 +340,18 @@
}
/**
- * Writes the items in this Configuration to the logger. Usually used
- * for debugging.
+ * Returns the contents of this Configuration as a String, suitable for logging.
+ * Usually used for debugging.
+ * @return The contents of this Configuration.
*/
- public void dumpConfiguration() {
- this.logger.info("Dumping configuration: " + getName());
+ public String dumpConfiguration() {
+ final StringBuilder builder = new StringBuilder();
+ builder.append("Dumping configuration: " + getName());
for (String key : this.options.keySet()) {
- this.logger.info("key: " + key);
+ builder.append("key: " + key);
final Object value = this.options.get(key);
if (value instanceof String) {
- this.logger.info(" value: " + value);
+ builder.append(" value: " + value);
} else if (value instanceof List<?>) {
final StringBuilder valueString = new StringBuilder();
final List<?> list = (List<?>) value;
@@ -364,21 +360,14 @@
final String item = (String) list.get(i);
valueString.append(item + " ");
}
- this.logger.info(valueString.toString());
+ builder.append(valueString.toString());
} else if (value instanceof Boolean) {
- this.logger.info(" value: " + ((Boolean) value).toString());
+ builder.append(" value: " + ((Boolean) value).toString());
} else {
- this.logger.info(" value: " + value.toString());
+ builder.append(" value: " + value.toString());
}
}
+ return builder.toString();
}
- /**
- * Returns the logger.
- * @return The logger.
- */
- protected Log getLogger() {
- return this.logger;
- }
-
}
Added: trunk/foray/foray-common/src/java/org/foray/common/ConfigurationException.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/ConfigurationException.java (rev 0)
+++ trunk/foray/foray-common/src/java/org/foray/common/ConfigurationException.java 2010-02-01 22:00:33 UTC (rev 10912)
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2010 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.foray.common;
+
+/**
+ * Exception class for errors in configuring FOray.
+ */
+public class ConfigurationException extends Exception {
+
+ /** Constant needed for serialization. */
+ private static final long serialVersionUID = 8761091373689923647L;
+
+ /**
+ * Constructs a new exception with the specified detail message.
+ * The cause is not initialized, and may subsequently be initialized by a call to {@link #initCause}.
+ * @param message The detail message.
+ * The detail message is saved for later retrieval by the {@link #getMessage()} method.
+ */
+ public ConfigurationException(final String message) {
+ super(message);
+ }
+
+ /**
+ * Constructs a new exception with the specified detail message and cause.
+ * @param message The detail message (which is saved for later retrieval by the {@link #getMessage()} method).
+ * @param cause The cause (which is saved for later retrieval by the {@link #getCause()} method).
+ * (A <code>null</code> value is permitted, and indicates that the cause is nonexistent or unknown.)
+ */
+ public ConfigurationException(final String message, final Throwable cause) {
+ super(message, cause);
+ }
+
+}
Modified: trunk/foray/foray-core/src/java/org/foray/core/ConfigurationParser.java
===================================================================
--- trunk/foray/foray-core/src/java/org/foray/core/ConfigurationParser.java 2010-02-01 20:38:24 UTC (rev 10911)
+++ trunk/foray/foray-core/src/java/org/foray/core/ConfigurationParser.java 2010-02-01 22:00:33 UTC (rev 10912)
@@ -29,6 +29,7 @@
package org.foray.core;
import org.foray.common.Configuration;
+import org.foray.common.ConfigurationException;
import org.apache.commons.logging.Log;
@@ -223,10 +224,13 @@
/**
* {@inheritDoc}
*/
- public void endElement(final String uri, final String localName,
- final String qName) {
+ public void endElement(final String uri, final String localName, final String qName) throws SAXException {
if (localName.equals("entry")) {
- this.store(this.key, this.value);
+ try {
+ this.store(this.key, this.value);
+ } catch (final ConfigurationException e) {
+ throw new SAXException(e);
+ }
this.status = ConfigurationParser.OUT;
this.key = "";
this.value = "";
@@ -258,8 +262,9 @@
* Stores configuration entry into configuration Map according to the role.
* @param key a string containing the key value for the configuration
* @param value a string containing the value for the configuration
+ * @throws ConfigurationException For errors in <code>value</code>.
*/
- private void store(final String key, final String value) {
+ private void store(final String key, final String value) throws ConfigurationException {
// Try the SessionConfig first.
if (this.sessionConfig.parseOption(key, value,
SessionConfig.PRECEDENCE_CONFIG_FILE)) {
Modified: trunk/foray/foray-core/src/java/org/foray/core/SessionConfig.java
===================================================================
--- trunk/foray/foray-core/src/java/org/foray/core/SessionConfig.java 2010-02-01 20:38:24 UTC (rev 10911)
+++ trunk/foray/foray-core/src/java/org/foray/core/SessionConfig.java 2010-02-01 22:00:33 UTC (rev 10912)
@@ -29,6 +29,7 @@
package org.foray.core;
import org.foray.common.Configuration;
+import org.foray.common.ConfigurationException;
import org.apache.commons.logging.Log;
import org.apache.xerces.util.XMLCatalogResolver;
@@ -67,8 +68,13 @@
* {@inheritDoc}
*/
protected void setDefaults() {
- final URL baseDirectory = parseURLDirectory("base-directory",
- "file:///" + System.getProperty("user.dir") + "/");
+ URL baseDirectory = null;
+ try {
+ baseDirectory = parseURLDirectory("base-directory",
+ "file:///" + System.getProperty("user.dir") + "/");
+ } catch (final ConfigurationException e) {
+ /* Ignore this. If it is malformed or not a directory, it is our fault. */
+ }
put("base-directory", baseDirectory, PRECEDENCE_DEFAULT);
put("cache-graphics", Boolean.FALSE, PRECEDENCE_DEFAULT);
@@ -86,8 +92,8 @@
/**
* {@inheritDoc}
*/
- public boolean parseOption(final String key, final String value,
- final int precedenceValue) {
+ public boolean parseOption(final String key, final String value, final int precedenceValue)
+ throws ConfigurationException {
if (key.equals("cache-graphics")
|| key.equals("dump-configuration")
|| key.equals("stroke-svg-text")) {
Modified: trunk/foray/foray-output/src/java/org/foray/output/OutputConfig.java
===================================================================
--- trunk/foray/foray-output/src/java/org/foray/output/OutputConfig.java 2010-02-01 20:38:24 UTC (rev 10911)
+++ trunk/foray/foray-output/src/java/org/foray/output/OutputConfig.java 2010-02-01 22:00:33 UTC (rev 10912)
@@ -29,6 +29,7 @@
package org.foray.output;
import org.foray.common.Configuration;
+import org.foray.common.ConfigurationException;
import org.apache.commons.logging.Log;
@@ -85,8 +86,8 @@
/**
* {@inheritDoc}
*/
- public boolean parseOption(final String key, final String value,
- final int precedenceValue) {
+ public boolean parseOption(final String key, final String value, final int precedenceValue)
+ throws ConfigurationException {
if (key.equals("at-sparse")
|| key.equals("pdf-user-print")
|| key.equals("pdf-user-copy")
@@ -202,4 +203,22 @@
return getStringValue("pdf-version");
}
+ /**
+ * Sets the "fineDetail" option.
+ * @param value The value which should be set.
+ * @param precedenceValue The precedence with which this option should be treated.
+ */
+ public void setFineDetail(final Boolean value, final int precedenceValue) {
+ this.put("fineDetail", value, precedenceValue);
+ }
+
+ /**
+ * Sets the "consistentOutput" option.
+ * @param value The value which should be set.
+ * @param precedenceValue The precedence with which this option should be treated.
+ */
+ public void setConsistentOutput(final Boolean value, final int precedenceValue) {
+ this.put("consistentOutput", value, precedenceValue);
+ }
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2010-02-01 22:15:35
|
Revision: 10913
http://foray.svn.sourceforge.net/foray/?rev=10913&view=rev
Author: victormote
Date: 2010-02-01 22:15:28 +0000 (Mon, 01 Feb 2010)
Log Message:
-----------
Clean up more startup logic.
Modified Paths:
--------------
trunk/foray/foray-app/src/java/org/foray/app/CommandLineOptions.java
trunk/foray/foray-app/src/java/org/foray/app/ant/FOrayAntTaskStarter.java
trunk/foray/foray-app/src/java/org/foray/app/test/TestConverter.java
trunk/foray/foray-app/src/java/org/foray/demo/embed/DemoXML2PDF.java
trunk/foray/foray-app/src/javatest/org/foray/app/fo/FoDocumentReader.java
trunk/foray/foray-common/src/java/org/foray/common/Configuration.java
trunk/foray/foray-core/src/java/org/foray/core/FOraySession.java
trunk/foray/foray-core/src/java/org/foray/core/SessionConfig.java
trunk/foray/foray-output/src/java/org/foray/output/OutputConfig.java
Modified: trunk/foray/foray-app/src/java/org/foray/app/CommandLineOptions.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/CommandLineOptions.java 2010-02-01 22:00:33 UTC (rev 10912)
+++ trunk/foray/foray-app/src/java/org/foray/app/CommandLineOptions.java 2010-02-01 22:15:28 UTC (rev 10913)
@@ -106,8 +106,8 @@
*/
public CommandLineOptions(final String[] args, final Log logger, final CommandLine parsedCommandLine)
throws ConfigurationException {
- this.sessionConfig = new SessionConfig(this.log);
- this.rendererOptions = new OutputConfig(this.log);
+ this.sessionConfig = new SessionConfig();
+ this.rendererOptions = new OutputConfig();
this.log = logger;
this.parsedCommandLine = parsedCommandLine;
if (this.parsedCommandLine.hasOption("fo")) {
Modified: trunk/foray/foray-app/src/java/org/foray/app/ant/FOrayAntTaskStarter.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/ant/FOrayAntTaskStarter.java 2010-02-01 22:00:33 UTC (rev 10912)
+++ trunk/foray/foray-app/src/java/org/foray/app/ant/FOrayAntTaskStarter.java 2010-02-01 22:15:28 UTC (rev 10913)
@@ -114,8 +114,8 @@
* {@inheritDoc}
*/
public void run() throws FOrayException {
- this.sessionConfig = new SessionConfig(getLogger());
- this.outputConfig = new OutputConfig(getLogger());
+ this.sessionConfig = new SessionConfig();
+ this.outputConfig = new OutputConfig();
if (this.task.getUserConfig() != null) {
new Options(this.getLogger(), this.sessionConfig, this.outputConfig,
this.task.getUserConfig());
Modified: trunk/foray/foray-app/src/java/org/foray/app/test/TestConverter.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/test/TestConverter.java 2010-02-01 22:00:33 UTC (rev 10912)
+++ trunk/foray/foray-app/src/java/org/foray/app/test/TestConverter.java 2010-02-01 22:15:28 UTC (rev 10913)
@@ -314,7 +314,7 @@
try {
final File xmlFile = new File(this.baseDir + "/" + xml);
- final SessionConfig configuration = new SessionConfig(this.log);
+ final SessionConfig configuration = new SessionConfig();
try {
configuration.parseOption("base-directory",
@@ -361,7 +361,7 @@
rendererType = OutputTargetType.XML;
}
- final OutputConfig renderOptions = new OutputConfig(this.log);
+ final OutputConfig renderOptions = new OutputConfig();
renderOptions.setFineDetail(Boolean.FALSE, SessionConfig.PRECEDENCE_DEFAULT);
renderOptions.setConsistentOutput(Boolean.TRUE, SessionConfig.PRECEDENCE_DEFAULT);
final OutputTarget renderer = OutputTargetFactory.makeOutputTarget(
Modified: trunk/foray/foray-app/src/java/org/foray/demo/embed/DemoXML2PDF.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/demo/embed/DemoXML2PDF.java 2010-02-01 22:00:33 UTC (rev 10912)
+++ trunk/foray/foray-app/src/java/org/foray/demo/embed/DemoXML2PDF.java 2010-02-01 22:15:28 UTC (rev 10913)
@@ -68,7 +68,7 @@
throws FOrayException {
// Setup FOraySession
- final SessionConfig config = new SessionConfig(getLogger());
+ final SessionConfig config = new SessionConfig();
final FOraySession session = FOraySpecific.makeFOraySession(config);
// Setup FOrayDocument
Modified: trunk/foray/foray-app/src/javatest/org/foray/app/fo/FoDocumentReader.java
===================================================================
--- trunk/foray/foray-app/src/javatest/org/foray/app/fo/FoDocumentReader.java 2010-02-01 22:00:33 UTC (rev 10912)
+++ trunk/foray/foray-app/src/javatest/org/foray/app/fo/FoDocumentReader.java 2010-02-01 22:15:28 UTC (rev 10913)
@@ -82,7 +82,7 @@
*/
private FoDocumentReader() throws IOException, FOrayException {
final Log logger = Logging.makeQuietLogger();
- final SessionConfig sessionConfig = new SessionConfig(logger);
+ final SessionConfig sessionConfig = new SessionConfig();
this.testDirectory = TestFOrayCommon.getTestDirectory();
Modified: trunk/foray/foray-common/src/java/org/foray/common/Configuration.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/Configuration.java 2010-02-01 22:00:33 UTC (rev 10912)
+++ trunk/foray/foray-common/src/java/org/foray/common/Configuration.java 2010-02-01 22:15:28 UTC (rev 10913)
@@ -31,8 +31,6 @@
import org.foray.common.url.URLFactory;
import org.foray.common.url.URLUtil;
-import org.apache.commons.logging.Log;
-
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
@@ -84,9 +82,8 @@
/**
* Constructor.
- * @param logger The Log instance to be used.
*/
- protected Configuration(final Log logger) {
+ protected Configuration() {
setDefaults();
}
Modified: trunk/foray/foray-core/src/java/org/foray/core/FOraySession.java
===================================================================
--- trunk/foray/foray-core/src/java/org/foray/core/FOraySession.java 2010-02-01 22:00:33 UTC (rev 10912)
+++ trunk/foray/foray-core/src/java/org/foray/core/FOraySession.java 2010-02-01 22:15:28 UTC (rev 10913)
@@ -150,7 +150,7 @@
/* Validate Configuration. */
this.configuration = configuration;
if (this.configuration == null) {
- this.configuration = new SessionConfig(logger);
+ this.configuration = new SessionConfig();
}
/* Validate FontServer. */
Modified: trunk/foray/foray-core/src/java/org/foray/core/SessionConfig.java
===================================================================
--- trunk/foray/foray-core/src/java/org/foray/core/SessionConfig.java 2010-02-01 22:00:33 UTC (rev 10912)
+++ trunk/foray/foray-core/src/java/org/foray/core/SessionConfig.java 2010-02-01 22:15:28 UTC (rev 10913)
@@ -31,7 +31,6 @@
import org.foray.common.Configuration;
import org.foray.common.ConfigurationException;
-import org.apache.commons.logging.Log;
import org.apache.xerces.util.XMLCatalogResolver;
import org.xml.sax.EntityResolver;
@@ -51,10 +50,9 @@
/**
* Constructor.
- * @param logger The logger for user messages.
*/
- public SessionConfig(final Log logger) {
- super(logger);
+ public SessionConfig() {
+ super();
}
/**
Modified: trunk/foray/foray-output/src/java/org/foray/output/OutputConfig.java
===================================================================
--- trunk/foray/foray-output/src/java/org/foray/output/OutputConfig.java 2010-02-01 22:00:33 UTC (rev 10912)
+++ trunk/foray/foray-output/src/java/org/foray/output/OutputConfig.java 2010-02-01 22:15:28 UTC (rev 10913)
@@ -31,8 +31,6 @@
import org.foray.common.Configuration;
import org.foray.common.ConfigurationException;
-import org.apache.commons.logging.Log;
-
import java.util.ArrayList;
import java.util.List;
@@ -49,10 +47,9 @@
/**
* Constructor.
- * @param logger The logger.
*/
- public OutputConfig(final Log logger) {
- super(logger);
+ public OutputConfig() {
+ super();
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2010-02-01 22:42:50
|
Revision: 10916
http://foray.svn.sourceforge.net/foray/?rev=10916&view=rev
Author: victormote
Date: 2010-02-01 22:42:44 +0000 (Mon, 01 Feb 2010)
Log Message:
-----------
Clean up some more weird leftover dependencies.
Modified Paths:
--------------
trunk/foray/foray-app/src/java/org/foray/app/AWTStarter.java
trunk/foray/foray-app/src/java/org/foray/demo/embed/DemoAWTViewer.java
trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/LoadableProperties.java
trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/SecureResourceBundle.java
trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/UserMessage.java
Modified: trunk/foray/foray-app/src/java/org/foray/app/AWTStarter.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/AWTStarter.java 2010-02-01 22:23:33 UTC (rev 10915)
+++ trunk/foray/foray-app/src/java/org/foray/app/AWTStarter.java 2010-02-01 22:42:44 UTC (rev 10916)
@@ -199,7 +199,7 @@
* @return The secure resource bundle.
*/
private SecureResourceBundle getResourceBundle(final String path) {
- InputStream in = null;
+ SecureResourceBundle bundle = null;
try {
URL url = getClass().getResource(path);
@@ -213,18 +213,15 @@
* uses as default */
modifiedPath = path.substring(0, path.lastIndexOf(".")) + ".en";
url = getClass().getResource(modifiedPath);
- }
-
- in = url.openStream();
+ }
+ final InputStream in = url.openStream();
+ bundle = new SecureResourceBundle(in);
} catch (final IOException ex) {
getLogger().error("Can't find URL to: <" + path + "> "
+ ex.getMessage());
getLogger().error(ex.getMessage());
}
- return new SecureResourceBundle(in, getLogger());
+ return bundle;
}
}
-
-
-
Modified: trunk/foray/foray-app/src/java/org/foray/demo/embed/DemoAWTViewer.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/demo/embed/DemoAWTViewer.java 2010-02-01 22:23:33 UTC (rev 10915)
+++ trunk/foray/foray-app/src/java/org/foray/demo/embed/DemoAWTViewer.java 2010-02-01 22:42:44 UTC (rev 10916)
@@ -118,7 +118,7 @@
modifiedPath = path.substring(0, path.lastIndexOf(".")) + ".en";
url = getClass().getResource(modifiedPath);
}
- return new SecureResourceBundle(url.openStream(), getLogger());
+ return new SecureResourceBundle(url.openStream());
}
/**
Modified: trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/LoadableProperties.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/LoadableProperties.java 2010-02-01 22:23:33 UTC (rev 10915)
+++ trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/LoadableProperties.java 2010-02-01 22:42:44 UTC (rev 10916)
@@ -47,20 +47,17 @@
*
*/
public class LoadableProperties extends Hashtable<String, String> {
+ /* TODO: This class looks a lot like a parser for a standard java.util.Properties file. Can it be replaced with
+ * that class? */
/** Constant needed for serialization. */
static final long serialVersionUID = 733955308698967466L;
- /** The parent resource bundle. */
- private SecureResourceBundle parent;
-
/**
* Constructor.
- * @param bundle The parent resource bundle.
*/
- public LoadableProperties(final SecureResourceBundle bundle) {
+ public LoadableProperties() {
super();
- this.parent = bundle;
}
/**
@@ -109,9 +106,6 @@
if (index > 0 && str.length() > index) {
return true;
}
- this.parent.getLogger().info(getClass().getName()
- + ": load(): invalid line " + str + "."
- + " Character '=' missed.");
return false;
}
Modified: trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/SecureResourceBundle.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/SecureResourceBundle.java 2010-02-01 22:23:33 UTC (rev 10915)
+++ trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/SecureResourceBundle.java 2010-02-01 22:42:44 UTC (rev 10916)
@@ -28,8 +28,6 @@
package org.foray.render.awt.viewer;
-import org.apache.commons.logging.Log;
-
import java.io.IOException;
import java.io.InputStream;
import java.util.Enumeration;
@@ -48,23 +46,15 @@
public class SecureResourceBundle extends ResourceBundle implements Translator {
/** The properties in this bundle. */
- private LoadableProperties lookup = new LoadableProperties(this);
+ private LoadableProperties lookup = new LoadableProperties();
- /** The logger. */
- private Log logger;
-
/**
* Constructor.
* @param in The input stream containing the unparsed resources.
- * @param logger The logger.
+ * @throws IOException For errors reading <code>in</code>.
*/
- public SecureResourceBundle(final InputStream in, final Log logger) {
- this.logger = logger;
- try {
- this.lookup.load(in);
- } catch (final IOException ex) {
- logger.info("Exception caught: " + ex.getMessage());
- }
+ public SecureResourceBundle(final InputStream in) throws IOException {
+ this.lookup.load(in);
}
/**
@@ -98,12 +88,4 @@
return this.lookup.get(key) != null;
}
- /**
- * Returns the logger.
- * @return The logger.
- */
- public Log getLogger() {
- return this.logger;
- }
-
}
Modified: trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/UserMessage.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/UserMessage.java 2010-02-01 22:23:33 UTC (rev 10915)
+++ trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/UserMessage.java 2010-02-01 22:42:44 UTC (rev 10916)
@@ -30,6 +30,8 @@
import org.apache.commons.logging.Log;
+import java.io.IOException;
+
import javax.swing.JOptionPane;
/**
@@ -74,7 +76,11 @@
this.res = aRes;
if (this.res == null) {
this.logger.info("UserMessage: setTranslator(null) !");
- this.res = new SecureResourceBundle(null, this.logger);
+ try {
+ this.res = new SecureResourceBundle(null);
+ } catch (final IOException e) {
+ this.res = null;
+ }
}
MessagesDialog.setTranslator(this.res);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2010-02-01 22:48:10
|
Revision: 10917
http://foray.svn.sourceforge.net/foray/?rev=10917&view=rev
Author: victormote
Date: 2010-02-01 22:48:03 +0000 (Mon, 01 Feb 2010)
Log Message:
-----------
Clean up some more weird leftover dependencies.
Modified Paths:
--------------
trunk/foray/foray-app/src/java/org/foray/app/AWTStarter.java
trunk/foray/foray-app/src/java/org/foray/demo/embed/DemoAWTViewer.java
trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/UserMessage.java
Modified: trunk/foray/foray-app/src/java/org/foray/app/AWTStarter.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/AWTStarter.java 2010-02-01 22:42:44 UTC (rev 10916)
+++ trunk/foray/foray-app/src/java/org/foray/app/AWTStarter.java 2010-02-01 22:48:03 UTC (rev 10917)
@@ -103,7 +103,7 @@
* @throws FOrayException For errors during initialization.
*/
private void init() throws FOrayException {
- this.userMessage = new UserMessage(getLogger());
+ this.userMessage = new UserMessage();
try {
UIManager.setLookAndFeel(
new javax.swing.plaf.metal.MetalLookAndFeel());
Modified: trunk/foray/foray-app/src/java/org/foray/demo/embed/DemoAWTViewer.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/demo/embed/DemoAWTViewer.java 2010-02-01 22:42:44 UTC (rev 10916)
+++ trunk/foray/foray-app/src/java/org/foray/demo/embed/DemoAWTViewer.java 2010-02-01 22:48:03 UTC (rev 10917)
@@ -132,7 +132,7 @@
final String language = System.getProperty("user.language");
final Translator translator = getResourceBundle(
DemoAWTViewer.TRANSLATION_PATH + "resources." + language);
- final UserMessage userMessage = new UserMessage(getLogger());
+ final UserMessage userMessage = new UserMessage();
userMessage.setTranslator(getResourceBundle(
DemoAWTViewer.TRANSLATION_PATH + "messages." + language));
// TODO: userMessage doesn't seem to be used anywhere.
Modified: trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/UserMessage.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/UserMessage.java 2010-02-01 22:42:44 UTC (rev 10916)
+++ trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/UserMessage.java 2010-02-01 22:48:03 UTC (rev 10917)
@@ -28,8 +28,6 @@
package org.foray.render.awt.viewer;
-import org.apache.commons.logging.Log;
-
import java.io.IOException;
import javax.swing.JOptionPane;
@@ -57,15 +55,10 @@
/** The Translator resource. */
private Translator res = null;
- /** The logger. */
- private Log logger;
-
/**
* Constructor.
- * @param logger The logger.
*/
- public UserMessage(final Log logger) {
- this.logger = logger;
+ public UserMessage() {
}
/**
@@ -75,7 +68,6 @@
public void setTranslator(final Translator aRes) {
this.res = aRes;
if (this.res == null) {
- this.logger.info("UserMessage: setTranslator(null) !");
try {
this.res = new SecureResourceBundle(null);
} catch (final IOException e) {
@@ -93,25 +85,15 @@
* @return The cooked message.
*/
String prepareMessage(final String rawText, final String[] par) {
- this.logger.info("prepareMessage(): " + rawText + ", parameter: "
- + par);
int index = rawText.indexOf(UserMessage.PARAMETER_TAG);
String composedMess = "";
if ((index == -1) && (par == null)) {
return rawText;
}
if ((index != -1) && (par == null)) {
- this.logger.info("Message "
- + " erwartet Parameter. Aufgerufen ohne Parameter");
return rawText;
}
if ((index == -1) && (par != null)) {
- this.logger.info("Message "
- + " erwartet keine Parameter. Aufgerufen mit folgenden "
- + "Parametern:");
- for (int i = 0; i < par.length; ++i) {
- this.logger.info(par[i].toString());
- }
return rawText;
}
int tagCount = 0;
@@ -121,9 +103,6 @@
try {
composedMess += rawText.substring(0, index) + par[tagCount];
} catch (final ArrayIndexOutOfBoundsException ex) {
- this.logger.info(
- "Anzahl der übergebenen Parameter zu der Meldung "
- + " ist weniger als erwartet.");
return composedMess + rawText;
}
modifiedText = rawText.substring(index
@@ -131,11 +110,6 @@
tagCount++;
}
composedMess += modifiedText;
- if (tagCount != par.length) {
- this.logger.info("Die zu der Meldung "
- + " übergebenen Parameter sind mehr als die Meldung "
- + "vorsieht.");
- }
return composedMess;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2010-02-01 23:27:36
|
Revision: 10918
http://foray.svn.sourceforge.net/foray/?rev=10918&view=rev
Author: victormote
Date: 2010-02-01 23:27:29 +0000 (Mon, 01 Feb 2010)
Log Message:
-----------
Remove more unnecessary logging code.
Modified Paths:
--------------
trunk/foray/foray-app/src/java/org/foray/app/Options.java
trunk/foray/foray-core/src/java/org/foray/core/ConfigurationParser.java
Modified: trunk/foray/foray-app/src/java/org/foray/app/Options.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/Options.java 2010-02-01 22:48:03 UTC (rev 10917)
+++ trunk/foray/foray-app/src/java/org/foray/app/Options.java 2010-02-01 23:27:29 UTC (rev 10918)
@@ -143,8 +143,7 @@
throws FOrayException {
// read user configuration
final ConfigurationParser reader =
- new ConfigurationParser(this.sessionConfig, this.renderConfig,
- userConfigSource, this.logger);
+ new ConfigurationParser(this.sessionConfig, this.renderConfig, userConfigSource);
try {
reader.parseDocument();
} catch (final FOrayException error) {
Modified: trunk/foray/foray-core/src/java/org/foray/core/ConfigurationParser.java
===================================================================
--- trunk/foray/foray-core/src/java/org/foray/core/ConfigurationParser.java 2010-02-01 22:48:03 UTC (rev 10917)
+++ trunk/foray/foray-core/src/java/org/foray/core/ConfigurationParser.java 2010-02-01 23:27:29 UTC (rev 10918)
@@ -31,13 +31,12 @@
import org.foray.common.Configuration;
import org.foray.common.ConfigurationException;
-import org.apache.commons.logging.Log;
-
import org.xml.sax.Attributes;
import org.xml.sax.EntityResolver;
+import org.xml.sax.ErrorHandler;
import org.xml.sax.InputSource;
-import org.xml.sax.Locator;
import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
import org.xml.sax.XMLReader;
import org.xml.sax.helpers.DefaultHandler;
@@ -86,15 +85,9 @@
/** The current value being processed. */
private String value = "";
- /** Locator for line number information. */
- private Locator locator;
-
/** Inputsource for configuration file. */
private InputSource filename;
- /** The logger that should be used by this parser. */
- private Log logger;
-
/**
* Constructor.
* @param sessionConfig The SessionConfig instance which should be updated
@@ -103,18 +96,14 @@
* with renderer-specific options found in the configuration file.
* @param source the SAX InputSource which encapsulates the configuration
* file XML that should be parsed.
- * @param logger The logger to which errors and other messages
- * should be sent.
* @throws FOrayException For null <code>sessionConfig</code> or null
* <code>outputConfig</code>.
*/
- public ConfigurationParser(final SessionConfig sessionConfig,
- final Configuration outputConfig, final InputSource source,
- final Log logger) throws FOrayException {
+ public ConfigurationParser(final SessionConfig sessionConfig, final Configuration outputConfig,
+ final InputSource source) throws FOrayException {
this.sessionConfig = sessionConfig;
this.outputConfig = outputConfig;
this.filename = source;
- this.logger = logger;
if (this.sessionConfig == null) {
throw new FOrayException("Session Configuration is null.");
}
@@ -130,22 +119,6 @@
*/
public void parseDocument() throws FOrayException {
final XMLReader parser = createParser();
- parser.setContentHandler(this);
- final EntityResolver resolver = new EntityResolver() {
- public InputSource resolveEntity(final String publicId, final String systemId) throws SAXException,
- IOException {
- if (ConfigurationParser.FORAY_CONFIG_DTD_PUBLIC_ID.equals(publicId)) {
- final InputStream inputStream = ConfigurationParser.class.getResourceAsStream(
- "/org/foray/common/dtds/foray-config.dtd");
- if (inputStream == null) {
- return null;
- }
- return new InputSource(inputStream);
- }
- return null;
- }
- };
- parser.setEntityResolver(resolver);
try {
parser.parse(this.filename);
} catch (final SAXException e) {
@@ -165,22 +138,48 @@
*/
private XMLReader createParser() throws FOrayException {
try {
- final SAXParserFactory spf = javax.xml.parsers.SAXParserFactory
- .newInstance();
+ final SAXParserFactory spf = javax.xml.parsers.SAXParserFactory.newInstance();
spf.setNamespaceAware(true);
+ spf.setValidating(true);
final XMLReader xmlReader = spf.newSAXParser().getXMLReader();
/* TODO: This is not the right EntityResolver to use. We need to
* use or create one that can find the configuration parser DTD
* in a jar file that is part of the distribution. */
final EntityResolver entityResolver = this.sessionConfig.makeEntityResolver();
xmlReader.setEntityResolver(entityResolver);
- this.logger.debug("Config: Using "
- + xmlReader.getClass().getName() + " as SAX2 Parser.");
+ xmlReader.setContentHandler(this);
+ final ErrorHandler errorHandler = new ErrorHandler() {
+ public void warning(final SAXParseException exception) throws SAXException {
+ throw exception;
+ }
+ public void error(final SAXParseException exception) throws SAXException {
+ throw exception;
+ }
+ public void fatalError(final SAXParseException exception) throws SAXException {
+ throw exception;
+ }
+ };
+ xmlReader.setErrorHandler(errorHandler);
+ final EntityResolver resolver = new EntityResolver() {
+ public InputSource resolveEntity(final String publicId, final String systemId) throws SAXException,
+ IOException {
+ if (ConfigurationParser.FORAY_CONFIG_DTD_PUBLIC_ID.equals(publicId)) {
+ final InputStream inputStream = ConfigurationParser.class.getResourceAsStream(
+ "/org/foray/common/dtds/foray-config.dtd");
+ if (inputStream == null) {
+ return null;
+ }
+ return new InputSource(inputStream);
+ }
+ return null;
+ }
+ };
+ xmlReader.setEntityResolver(resolver);
return xmlReader;
} catch (final javax.xml.parsers.ParserConfigurationException e) {
- throw new FOrayException(e);
+ throw new FOrayException(e);
} catch (final SAXException e) {
- throw new FOrayException(e);
+ throw new FOrayException(e);
}
}
@@ -193,13 +192,6 @@
/**
* {@inheritDoc}
*/
- public void setDocumentLocator(final Locator locator) {
- this.locator = locator;
- }
-
- /**
- * {@inheritDoc}
- */
public void startElement(final String uri, final String localName,
final String qName, final Attributes attributes) {
if (localName.equals("key")) {
@@ -216,9 +208,6 @@
if (localName.equals("foray-config")) {
return;
}
- // to make sure that user knows about false tag
- this.logger.error(getFormattedLocation() + "\nUnknown tag in "
- + "configuration file: " + localName);
}
/**
@@ -275,18 +264,4 @@
SessionConfig.PRECEDENCE_CONFIG_FILE);
}
- /**
- * Put the location information in a format suitable for logging and error
- * messages.
- * @return The location information, formatted.
- */
- private String getFormattedLocation() {
- if (this.locator == null) {
- return "";
- }
- return this.locator.getSystemId() + ":"
- + this.locator.getLineNumber() + ":"
- + this.locator.getColumnNumber();
- }
-
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2010-02-02 00:04:46
|
Revision: 10921
http://foray.svn.sourceforge.net/foray/?rev=10921&view=rev
Author: victormote
Date: 2010-02-02 00:04:40 +0000 (Tue, 02 Feb 2010)
Log Message:
-----------
Clean up more logging/error handling.
Modified Paths:
--------------
trunk/foray/foray-app/src/java/org/foray/app/AWTStarter.java
trunk/foray/foray-app/src/java/org/foray/demo/embed/DemoAWTViewer.java
trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/Command.java
trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/GoToPageDialog.java
trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/PreviewDialog.java
Modified: trunk/foray/foray-app/src/java/org/foray/app/AWTStarter.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/AWTStarter.java 2010-02-01 23:52:06 UTC (rev 10920)
+++ trunk/foray/foray-app/src/java/org/foray/app/AWTStarter.java 2010-02-02 00:04:40 UTC (rev 10921)
@@ -46,6 +46,8 @@
import org.foray.render.awt.viewer.Translator;
import org.foray.render.awt.viewer.UserMessage;
+import org.axsl.output.OutputException;
+
import org.apache.commons.logging.Log;
import java.awt.Dimension;
@@ -135,7 +137,11 @@
final OutputConfig renderOptions =
getCommandLineOptions().getRendererOptions();
this.renderer = new AWTRenderer(this.getLogger(), renderOptions);
- this.frame = createPreviewDialog(this.renderer, this.resource);
+ try {
+ this.frame = createPreviewDialog(this.renderer, this.resource);
+ } catch (final OutputException e) {
+ throw new FOrayException(e);
+ }
this.renderer.setComponent(this.frame);
this.frame.progress(this.resource.getString("Init parser") + " ...");
}
@@ -161,9 +167,10 @@
* @param renderer The rendere.
* @param res The language resources.
* @return The newly-created preview dialog.
+ * @throws OutputException For errors loading resources.
*/
protected PreviewDialog createPreviewDialog(final AWTRenderer renderer,
- final Translator res) {
+ final Translator res) throws OutputException {
final PreviewDialog frame = new PreviewDialog(renderer, res,
getLogger());
frame.validate();
Modified: trunk/foray/foray-app/src/java/org/foray/demo/embed/DemoAWTViewer.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/demo/embed/DemoAWTViewer.java 2010-02-01 23:52:06 UTC (rev 10920)
+++ trunk/foray/foray-app/src/java/org/foray/demo/embed/DemoAWTViewer.java 2010-02-02 00:04:40 UTC (rev 10921)
@@ -40,6 +40,8 @@
import org.foray.render.awt.viewer.Translator;
import org.foray.render.awt.viewer.UserMessage;
+import org.axsl.output.OutputException;
+
import org.xml.sax.InputSource;
import java.awt.Dimension;
@@ -71,10 +73,10 @@
* @param renderer The Renderer.
* @param res The Translator resource.
* @return The newly-created PreviewDialog.
+ * @throws OutputException For errors loading resources.
*/
- protected PreviewDialog createPreviewDialog(
- final AWTRenderer renderer,
- final Translator res) {
+ protected PreviewDialog createPreviewDialog(final AWTRenderer renderer, final Translator res)
+ throws OutputException {
final PreviewDialog frame = new PreviewDialog(renderer, res);
frame.validate();
frame.addWindowListener(new WindowAdapter() {
@@ -152,7 +154,12 @@
new FOrayTarget(document, renderer, null, null);
//Create preview dialog (target for the AWTRenderer)
- final PreviewDialog frame = createPreviewDialog(renderer, translator);
+ PreviewDialog frame;
+ try {
+ frame = createPreviewDialog(renderer, translator);
+ } catch (final OutputException e) {
+ throw new FOrayException(e);
+ }
renderer.setComponent(frame);
// TODO: This is probably not right. Needs to run session.process().
Modified: trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/Command.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/Command.java 2010-02-01 23:52:06 UTC (rev 10920)
+++ trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/Command.java 2010-02-02 00:04:40 UTC (rev 10921)
@@ -35,7 +35,7 @@
package org.foray.render.awt.viewer;
-import org.apache.commons.logging.Log;
+import org.axsl.output.OutputException;
import java.awt.event.ActionEvent;
import java.net.URL;
@@ -61,9 +61,6 @@
private static final String IMAGE_DIR =
"/org/foray/render/awt/viewer/images/";
- /** The parent dialog box. */
- private PreviewDialog parent;
-
/**
* Constructor for no icon.
* @param dialog The parent dialog.
@@ -82,7 +79,6 @@
public Command(final PreviewDialog dialog, final String name,
final ImageIcon anIcon) {
super(name, anIcon);
- this.parent = dialog;
}
/**
@@ -90,15 +86,14 @@
* @param dialog The parent dialog.
* @param name The command name.
* @param iconName The name of the icon to use.
+ * @throws OutputException If the icon cannot be found.
*/
- public Command(final PreviewDialog dialog, final String name,
- final String iconName) {
+ public Command(final PreviewDialog dialog, final String name, final String iconName) throws OutputException {
super(name);
- this.parent = dialog;
final String path = Command.IMAGE_DIR + iconName + ".gif";
final URL url = getClass().getResource(path);
if (url == null) {
- getLogger().error("Icon not found: " + path);
+ throw new OutputException("Icon not found: " + path);
} else {
putValue(SMALL_ICON, new ImageIcon(url));
}
@@ -115,22 +110,12 @@
* Action handler which can be overriden by subclasses.
*/
public void doit() {
- getLogger().error("Not implemented.");
}
/**
* Action handler which can be overriden by subclasses.
*/
public void undoit() {
- getLogger().error("Not implemented.");
}
- /**
- * Returns the logger.
- * @return The logger.
- */
- public Log getLogger() {
- return this.parent.getLogger();
- }
-
}
Modified: trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/GoToPageDialog.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/GoToPageDialog.java 2010-02-01 23:52:06 UTC (rev 10920)
+++ trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/GoToPageDialog.java 2010-02-02 00:04:40 UTC (rev 10921)
@@ -28,8 +28,6 @@
package org.foray.render.awt.viewer;
-import org.apache.commons.logging.Log;
-
import java.awt.Dimension;
import java.awt.Frame;
import java.awt.GridBagConstraints;
@@ -104,10 +102,9 @@
* @param title The title of the dialog.
* @param modal Indicates whether this dialog is modal.
* @param resource The Translator resource.
- * @param logger The logger.
*/
public GoToPageDialog(final Frame frame, final String title,
- final boolean modal, final Translator resource, final Log logger) {
+ final boolean modal, final Translator resource) {
super(frame, title, modal);
this.res = resource;
jbInit();
Modified: trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/PreviewDialog.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/PreviewDialog.java 2010-02-01 23:52:06 UTC (rev 10920)
+++ trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/PreviewDialog.java 2010-02-02 00:04:40 UTC (rev 10921)
@@ -46,6 +46,7 @@
import org.foray.render.awt.AWTRenderer;
import org.axsl.galley.GalleyVisitorException;
+import org.axsl.output.OutputException;
import org.apache.commons.logging.Log;
@@ -66,6 +67,7 @@
import javax.swing.BorderFactory;
import javax.swing.ImageIcon;
import javax.swing.JComboBox;
+import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JMenu;
@@ -230,20 +232,16 @@
/** Label for the preview image. */
private JLabel previewImageLabel = new JLabel();
- /** The logger. */
- private Log logger;
-
/**
* Create a new PreviewDialog that uses the given starter, renderer and
* translator.
* @param aRenderer The AWTRenderer to use.
* @param aRes The Translator translator.
* @param logger The logger to use.
+ * @throws OutputException For errors loading resources.
*/
- public PreviewDialog(final AWTRenderer aRenderer, final Translator aRes,
- final Log logger) {
+ public PreviewDialog(final AWTRenderer aRenderer, final Translator aRes, final Log logger) throws OutputException {
this(aRenderer, aRes);
- this.logger = logger;
}
/**
@@ -251,8 +249,9 @@
*
* @param aRenderer the to use renderer
* @param aRes the to use translator
+ * @throws OutputException For errors loading resources.
*/
- public PreviewDialog(final AWTRenderer aRenderer, final Translator aRes) {
+ public PreviewDialog(final AWTRenderer aRenderer, final Translator aRes) throws OutputException {
this.res = aRes;
this.renderer = aRenderer;
@@ -647,9 +646,7 @@
* Shows a page by number.
*/
private void goToPage() {
- final GoToPageDialog d = new GoToPageDialog(this,
- this.res.getString("Go to Page"), true,
- this.res, getLogger());
+ final GoToPageDialog d = new GoToPageDialog(this, this.res.getString("Go to Page"), true, this.res);
d.setLocation((int) getLocation().getX()
+ PreviewDialog.NEW_PAGE_OFFSET,
(int) getLocation().getY() + PreviewDialog.NEW_PAGE_OFFSET);
@@ -837,12 +834,4 @@
);
}
- /**
- * Returns the logger.
- * @return The logger.
- */
- public Log getLogger() {
- return this.logger;
- }
-
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2010-02-02 00:10:35
|
Revision: 10922
http://foray.svn.sourceforge.net/foray/?rev=10922&view=rev
Author: victormote
Date: 2010-02-02 00:10:29 +0000 (Tue, 02 Feb 2010)
Log Message:
-----------
Clean up more logging/error handling.
Modified Paths:
--------------
trunk/foray/foray-app/src/java/org/foray/app/AWTStarter.java
trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/PreviewDialog.java
Modified: trunk/foray/foray-app/src/java/org/foray/app/AWTStarter.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/AWTStarter.java 2010-02-02 00:04:40 UTC (rev 10921)
+++ trunk/foray/foray-app/src/java/org/foray/app/AWTStarter.java 2010-02-02 00:10:29 UTC (rev 10922)
@@ -169,10 +169,9 @@
* @return The newly-created preview dialog.
* @throws OutputException For errors loading resources.
*/
- protected PreviewDialog createPreviewDialog(final AWTRenderer renderer,
- final Translator res) throws OutputException {
- final PreviewDialog frame = new PreviewDialog(renderer, res,
- getLogger());
+ protected PreviewDialog createPreviewDialog(final AWTRenderer renderer, final Translator res)
+ throws OutputException {
+ final PreviewDialog frame = new PreviewDialog(renderer, res);
frame.validate();
frame.addWindowListener(new WindowAdapter() {
public void windowClosed(final WindowEvent we) {
Modified: trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/PreviewDialog.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/PreviewDialog.java 2010-02-02 00:04:40 UTC (rev 10921)
+++ trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/PreviewDialog.java 2010-02-02 00:10:29 UTC (rev 10922)
@@ -48,8 +48,6 @@
import org.axsl.galley.GalleyVisitorException;
import org.axsl.output.OutputException;
-import org.apache.commons.logging.Log;
-
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
@@ -232,18 +230,6 @@
/** Label for the preview image. */
private JLabel previewImageLabel = new JLabel();
- /**
- * Create a new PreviewDialog that uses the given starter, renderer and
- * translator.
- * @param aRenderer The AWTRenderer to use.
- * @param aRes The Translator translator.
- * @param logger The logger to use.
- * @throws OutputException For errors loading resources.
- */
- public PreviewDialog(final AWTRenderer aRenderer, final Translator aRes, final Log logger) throws OutputException {
- this(aRenderer, aRes);
- }
-
/**
* Create a new PreviewDialog that uses the given renderer and translator.
*
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2010-02-02 19:54:27
|
Revision: 10926
http://foray.svn.sourceforge.net/foray/?rev=10926&view=rev
Author: victormote
Date: 2010-02-02 19:54:20 +0000 (Tue, 02 Feb 2010)
Log Message:
-----------
Use new aXSL interfaces to make the output configuration more independent.
Modified Paths:
--------------
trunk/foray/foray-common/src/java/org/foray/common/Configuration.java
trunk/foray/foray-output/src/java/org/foray/output/Converter.java
trunk/foray/foray-output/src/java/org/foray/output/MIFConverter.java
trunk/foray/foray-output/src/java/org/foray/output/OutputConfig.java
trunk/foray/foray-output/src/java/org/foray/output/OutputTarget.java
trunk/foray/foray-render/src/java/org/foray/render/PrintRenderer.java
trunk/foray/foray-render/src/java/org/foray/render/Renderer.java
trunk/foray/foray-render/src/java/org/foray/render/awt/AWTRenderer.java
trunk/foray/foray-render/src/java/org/foray/render/pcl/PCLRenderer.java
trunk/foray/foray-render/src/java/org/foray/render/pdf/PDFRenderer.java
trunk/foray/foray-render/src/java/org/foray/render/ps/PSRenderer.java
trunk/foray/foray-render/src/java/org/foray/render/svg/SVGRenderer.java
trunk/foray/foray-render/src/java/org/foray/render/txt/TXTRenderer.java
trunk/foray/foray-render/src/java/org/foray/render/txt/TXTStream.java
trunk/foray/foray-render/src/java/org/foray/render/xml/XMLRenderer.java
Modified: trunk/foray/foray-common/src/java/org/foray/common/Configuration.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/Configuration.java 2010-02-02 00:57:15 UTC (rev 10925)
+++ trunk/foray/foray-common/src/java/org/foray/common/Configuration.java 2010-02-02 19:54:20 UTC (rev 10926)
@@ -325,15 +325,14 @@
* @param value The space-delimited input.
* @return The parsed List.
*/
- protected List<String> parseSpaceDelimitedList(final String key,
- final String value) {
+ protected String[] parseSpaceDelimitedList(final String key, final String value) {
final List<String> list = new ArrayList<String>();
final StringTokenizer tokenizer = new StringTokenizer(value);
while (tokenizer.hasMoreTokens()) {
final String item = tokenizer.nextToken();
list.add(item);
}
- return list;
+ return list.toArray(new String[0]);
}
/**
Modified: trunk/foray/foray-output/src/java/org/foray/output/Converter.java
===================================================================
--- trunk/foray/foray-output/src/java/org/foray/output/Converter.java 2010-02-02 00:57:15 UTC (rev 10925)
+++ trunk/foray/foray-output/src/java/org/foray/output/Converter.java 2010-02-02 19:54:20 UTC (rev 10926)
@@ -39,10 +39,9 @@
/**
* Constructor.
* @param logger The logger.
- * @param outputConfig The output configuration.
*/
- public Converter(final Log logger, final OutputConfig outputConfig) {
- super(logger, outputConfig);
+ public Converter(final Log logger) {
+ super(logger);
}
}
Modified: trunk/foray/foray-output/src/java/org/foray/output/MIFConverter.java
===================================================================
--- trunk/foray/foray-output/src/java/org/foray/output/MIFConverter.java 2010-02-02 00:57:15 UTC (rev 10925)
+++ trunk/foray/foray-output/src/java/org/foray/output/MIFConverter.java 2010-02-02 19:54:20 UTC (rev 10926)
@@ -37,6 +37,7 @@
import org.axsl.fo.fo.TableRow;
import org.axsl.font.FontConsumer;
import org.axsl.mif.MifBook;
+import org.axsl.output.DocumentConfiguration;
import org.axsl.output.OutputException;
import org.apache.commons.logging.Log;
@@ -62,6 +63,8 @@
/** The MIF Document being created. */
private MifBook mifDoc;
+ /** The user configuration for this output. */
+ private DocumentConfiguration configuration;
/* is a table currently open? */
// private boolean inTable = false;
@@ -72,9 +75,10 @@
* @param logger The logger.
* @param outputConfig The output configuration.
*/
- public MIFConverter(final MifBook mifBook, final Log logger, final OutputConfig outputConfig) {
- super(logger, outputConfig);
+ public MIFConverter(final MifBook mifBook, final Log logger, final DocumentConfiguration outputConfig) {
+ super(logger);
this.mifDoc = mifBook;
+ this.configuration = outputConfig;
}
/**
@@ -267,4 +271,11 @@
return new int[] {FontConsumer.FONT_SOURCE_FREE_STANDING};
}
+ /**
+ * {@inheritDoc}
+ */
+ public DocumentConfiguration getOutputConfiguration() {
+ return this.configuration;
+ }
+
}
Modified: trunk/foray/foray-output/src/java/org/foray/output/OutputConfig.java
===================================================================
--- trunk/foray/foray-output/src/java/org/foray/output/OutputConfig.java 2010-02-02 00:57:15 UTC (rev 10925)
+++ trunk/foray/foray-output/src/java/org/foray/output/OutputConfig.java 2010-02-02 19:54:20 UTC (rev 10926)
@@ -31,9 +31,11 @@
import org.foray.common.Configuration;
import org.foray.common.ConfigurationException;
-import java.util.ArrayList;
-import java.util.List;
+import org.axsl.output.DocumentAreaConfiguration;
+import org.axsl.output.DocumentPdfConfiguration;
+import java.nio.charset.Charset;
+
/**
* Configuration implementation for those configuration items that are
* related to a specific Renderer. Note that currently all Renderers use the
@@ -43,7 +45,7 @@
* start with the renderer name (e.g. "pdf"). Renderers that are not interested
* in options specific to other renderers should simply ignore those options.
*/
-public class OutputConfig extends Configuration {
+public class OutputConfig extends Configuration implements DocumentPdfConfiguration, DocumentAreaConfiguration {
/**
* Constructor.
@@ -65,9 +67,10 @@
protected void setDefaults() {
put("at-sparse", Boolean.FALSE, PRECEDENCE_DEFAULT);
- final List<String> streamFilterList = new ArrayList<String>(2);
- streamFilterList.add("flate");
- streamFilterList.add("ascii-85");
+ final String[] streamFilterList = new String[] {
+ "flate",
+ "ascii-85"
+ };
put("pdf-filters", streamFilterList, PRECEDENCE_DEFAULT);
// Skip pdf-owner-password. It may be null.
@@ -77,7 +80,7 @@
put("pdf-user-modify", Boolean.FALSE, PRECEDENCE_DEFAULT);
put("pdf-user-annotate", Boolean.FALSE, PRECEDENCE_DEFAULT);
- put("txt-encoding", "UTF-8", PRECEDENCE_DEFAULT);
+ put("txt-encoding", Charset.forName("UTF-8"), PRECEDENCE_DEFAULT);
}
/**
@@ -97,7 +100,7 @@
}
if (key.equals("pdf-filters")) {
// Space-delimited List.
- final List<String> list = parseSpaceDelimitedList(key, value);
+ final String[] list = parseSpaceDelimitedList(key, value);
put(key, list, precedenceValue);
return true;
}
@@ -113,94 +116,90 @@
}
/**
- * Indicates whether AT (Area Tree) output should be sparse.
- * @return True iff AT output should be sparse.
+ * {@inheritDoc}
*/
- public boolean optionATSparse() {
+ public boolean isOutputSparse() {
// Never null.
return getBooleanValue("at-sparse").booleanValue();
}
/**
- * Returns the list of PDF filters that this document should use.
- * @return The list of PDF filters that this document should use.
+ * {@inheritDoc}
*/
- public List<?> optionPDFFilters() {
- return getListValue("pdf-filters");
+ public String[] getPdfFilters() {
+ return (String[]) getValue("pdf-filters");
}
/**
- * Return the pdf-owner-password value set by the user.
- * @return The pdf-owner-password value set by the user, or null if none
- * was set.
+ * {@inheritDoc}
*/
- public String optionPDFOwnerPassword() {
+ public String getOwnerPassword() {
return getStringValue("pdf-owner-password");
}
/**
- * Return the pdf-user-password valud set by the user.
- * @return The pdf-user-password value set by the user, or null if none
- * was set.
+ * {@inheritDoc}
*/
- public String optionPDFUserPassword() {
+ public String getUserPassword() {
return getStringValue("pdf-user-password");
}
/**
- * Returns the PDF print permission set by the user.
- * @return True iff the user has permission to print the PDF.
+ * {@inheritDoc}
*/
- public boolean optionPDFUserPrint() {
+ public boolean canUserPrint() {
// Never null.
return getBooleanValue("pdf-user-print").booleanValue();
}
/**
- * Returns the PDF copy permission set by the user.
- * @return True iff the user has permission to copy portions of the PDF.
+ * {@inheritDoc}
*/
- public boolean optionPDFUserCopy() {
+ public boolean canUserCopy() {
// Never null.
return getBooleanValue("pdf-user-copy").booleanValue();
}
/**
- * Returns the PDF modify permission set by the user.
- * @return True iff the user has permission to modify the PDF.
+ * {@inheritDoc}
*/
- public boolean optionPDFUserModify() {
+ public boolean canUserModify() {
// Never null.
return getBooleanValue("pdf-user-modify").booleanValue();
}
/**
- * Returns the PDF annotate permission set by the user.
- * @return True iff the user has permission to add annotations to the PDF.
+ * {@inheritDoc}
*/
- public boolean optionPDFUserAnnotate() {
+ public boolean canUserAnnotate() {
// Never null.
return getBooleanValue("pdf-user-annotate").booleanValue();
}
/**
- * Returns the encoding options set by the user for text output.
- * @return The text output encoding.
+ * {@inheritDoc}
*/
- public String optionTXTEncoding() {
+ public Charset getCharset() {
// Never null.
- return getStringValue("txt-encoding");
+ final Object value = this.getValue("txt-encoding");
+ return (Charset) value;
}
/**
- * Returns the PDF version selected by the user for document output.
- * @return The PDF version to be used for document output.
+ * {@inheritDoc}
*/
- public String optionPDFVersion() {
+ public String getPdfVersion() {
return getStringValue("pdf-version");
}
/**
+ * {@inheritDoc}
+ */
+ public String getGenericOption(final String optionName) {
+ return getStringValue(optionName);
+ }
+
+ /**
* Sets the "fineDetail" option.
* @param value The value which should be set.
* @param precedenceValue The precedence with which this option should be treated.
Modified: trunk/foray/foray-output/src/java/org/foray/output/OutputTarget.java
===================================================================
--- trunk/foray/foray-output/src/java/org/foray/output/OutputTarget.java 2010-02-02 00:57:15 UTC (rev 10925)
+++ trunk/foray/foray-output/src/java/org/foray/output/OutputTarget.java 2010-02-02 19:54:20 UTC (rev 10926)
@@ -29,6 +29,7 @@
package org.foray.output;
import org.axsl.font.FontConsumer;
+import org.axsl.output.OutputConfiguration;
import org.apache.commons.logging.Log;
@@ -67,17 +68,12 @@
/** The FontConsumer used by the document. */
private FontConsumer fontConsumer;
- /** The output configuration options. */
- private OutputConfig options;
-
/**
* Constructor.
* @param logger The logger.
- * @param outputConfig The output configuration.
*/
- public OutputTarget(final Log logger, final OutputConfig outputConfig) {
+ public OutputTarget(final Log logger) {
this.logger = logger;
- this.options = outputConfig;
}
/**
@@ -211,11 +207,9 @@
}
/**
- * Returns the configuration options.
- * @return Returns the options.
+ * Returns the output configuration for this renderer.
+ * @return The output configuration for this renderer.
*/
- public OutputConfig getOptions() {
- return this.options;
- }
+ public abstract OutputConfiguration getOutputConfiguration();
}
Modified: trunk/foray/foray-render/src/java/org/foray/render/PrintRenderer.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/PrintRenderer.java 2010-02-02 00:57:15 UTC (rev 10925)
+++ trunk/foray/foray-render/src/java/org/foray/render/PrintRenderer.java 2010-02-02 19:54:20 UTC (rev 10926)
@@ -28,8 +28,6 @@
package org.foray.render;
-import org.foray.output.OutputConfig;
-
import org.axsl.common.value.LeaderPattern;
import org.axsl.common.value.RuleStyle;
import org.axsl.font.Font;
@@ -38,6 +36,7 @@
import org.axsl.galley.GalleyVisitorException;
import org.axsl.galley.LeaderArea;
import org.axsl.galley.TextArea;
+import org.axsl.output.DocumentConfiguration;
import org.apache.commons.logging.Log;
@@ -57,10 +56,9 @@
/**
* Constructor.
* @param logger The logger.
- * @param renderConfig The configuration for this renderer.
*/
- public PrintRenderer(final Log logger, final OutputConfig renderConfig) {
- super(logger, renderConfig);
+ public PrintRenderer(final Log logger) {
+ super(logger);
}
/**
@@ -256,4 +254,9 @@
return new int[] {FontConsumer.FONT_SOURCE_FREE_STANDING};
}
+ /**
+ * {@inheritDoc}
+ */
+ public abstract DocumentConfiguration getOutputConfiguration();
+
}
Modified: trunk/foray/foray-render/src/java/org/foray/render/Renderer.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/Renderer.java 2010-02-02 00:57:15 UTC (rev 10925)
+++ trunk/foray/foray-render/src/java/org/foray/render/Renderer.java 2010-02-02 19:54:20 UTC (rev 10926)
@@ -35,7 +35,6 @@
import org.foray.common.FOrayConstants;
import org.foray.common.WKConstants;
-import org.foray.output.OutputConfig;
import org.foray.output.OutputTarget;
import org.axsl.common.value.RuleStyle;
@@ -99,10 +98,9 @@
/**
* Constructor.
* @param logger The logger.
- * @param renderConfig The configuration for this renderer.
*/
- public Renderer(final Log logger, final OutputConfig renderConfig) {
- super(logger, renderConfig);
+ public Renderer(final Log logger) {
+ super(logger);
}
/**
Modified: trunk/foray/foray-render/src/java/org/foray/render/awt/AWTRenderer.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/awt/AWTRenderer.java 2010-02-02 00:57:15 UTC (rev 10925)
+++ trunk/foray/foray-render/src/java/org/foray/render/awt/AWTRenderer.java 2010-02-02 19:54:20 UTC (rev 10926)
@@ -42,7 +42,6 @@
import org.foray.common.Mime;
import org.foray.common.WKConstants;
import org.foray.common.url.URLFactory;
-import org.foray.output.OutputConfig;
import org.foray.render.Renderer;
import org.axsl.common.value.RuleStyle;
@@ -63,6 +62,7 @@
import org.axsl.graphic.GraphicException;
import org.axsl.graphic.SvgGraphic;
import org.axsl.graphic.output.GraphicJava2d;
+import org.axsl.output.OutputConfiguration;
import org.axsl.output.OutputException;
import org.apache.commons.logging.Log;
@@ -139,13 +139,17 @@
/** The current color's blue component. */
private float currentBlue = 0;
+ /** The user configuration for this output. */
+ private OutputConfiguration configuration;
+
/**
* Constructor.
* @param logger The logger.
* @param renderConfig The configuration for this renderer.
*/
- public AWTRenderer(final Log logger, final OutputConfig renderConfig) {
- super(logger, renderConfig);
+ public AWTRenderer(final Log logger, final OutputConfiguration renderConfig) {
+ super(logger);
+ this.configuration = renderConfig;
}
/**
@@ -898,4 +902,11 @@
this.pageHeight = pageHeight;
}
+ /**
+ * {@inheritDoc}
+ */
+ public OutputConfiguration getOutputConfiguration() {
+ return this.configuration;
+ }
+
}
Modified: trunk/foray/foray-render/src/java/org/foray/render/pcl/PCLRenderer.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/pcl/PCLRenderer.java 2010-02-02 00:57:15 UTC (rev 10925)
+++ trunk/foray/foray-render/src/java/org/foray/render/pcl/PCLRenderer.java 2010-02-02 19:54:20 UTC (rev 10926)
@@ -37,7 +37,6 @@
package org.foray.render.pcl;
import org.foray.common.WKConstants;
-import org.foray.output.OutputConfig;
import org.foray.render.PrintRenderer;
import org.foray.render.Renderer;
@@ -53,6 +52,7 @@
import org.axsl.galley.TextArea;
import org.axsl.graphic.Graphic;
import org.axsl.graphic.GraphicException;
+import org.axsl.output.DocumentConfiguration;
import org.axsl.output.OutputException;
import org.apache.commons.logging.Log;
@@ -196,13 +196,17 @@
* PCLRenderer.DEFAULT_LEFT_MARGIN
* WKConstants.DECIPOINTS_PER_POINT);
+ /** The user configuration for this output. */
+ private DocumentConfiguration configuration;
+
/**
* Constructor.
* @param logger The logger.
* @param renderConfig The configuration for this renderer.
*/
- public PCLRenderer(final Log logger, final OutputConfig renderConfig) {
- super(logger, renderConfig);
+ public PCLRenderer(final Log logger, final DocumentConfiguration renderConfig) {
+ super(logger);
+ this.configuration = renderConfig;
}
/**
@@ -847,4 +851,11 @@
public void resetTextCursor() {
}
+ /**
+ * {@inheritDoc}
+ */
+ public DocumentConfiguration getOutputConfiguration() {
+ return this.configuration;
+ }
+
}
Modified: trunk/foray/foray-render/src/java/org/foray/render/pdf/PDFRenderer.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/pdf/PDFRenderer.java 2010-02-02 00:57:15 UTC (rev 10925)
+++ trunk/foray/foray-render/src/java/org/foray/render/pdf/PDFRenderer.java 2010-02-02 19:54:20 UTC (rev 10926)
@@ -35,7 +35,6 @@
import org.foray.common.Mime;
import org.foray.common.WKConstants;
-import org.foray.output.OutputConfig;
import org.foray.render.PrintRenderer;
import org.axsl.common.FormattedIntegerType;
@@ -62,6 +61,7 @@
import org.axsl.graphic.GraphicLink;
import org.axsl.graphic.MathGraphic;
import org.axsl.graphic.SvgGraphic;
+import org.axsl.output.DocumentPdfConfiguration;
import org.axsl.output.OutputException;
import org.axsl.pdf.PdfContentStream;
import org.axsl.pdf.PdfDestination;
@@ -86,7 +86,6 @@
import java.awt.geom.Rectangle2D;
import java.net.URI;
import java.util.Date;
-import java.util.List;
/**
* Renderer for PDF output.
@@ -111,16 +110,20 @@
/** The total number of pages processed so far. */
private int pageCount;
+ /** The output configuration options. */
+ private DocumentPdfConfiguration options;
+
/**
* Constructor.
* @param logger The logger.
* @param renderConfig The configuration for this renderer.
* @param document The PDF document to be created.
*/
- public PDFRenderer(final Log logger, final OutputConfig renderConfig,
+ public PDFRenderer(final Log logger, final DocumentPdfConfiguration renderConfig,
final PdfDocument document) {
- super(logger, renderConfig);
+ super(logger);
this.pdfDoc = document;
+ this.options = renderConfig;
}
/**
@@ -128,19 +131,19 @@
* it has been specified.
*/
private void addEncryption() {
- if (this.getOptions() == null) {
+ if (this.getOutputConfiguration() == null) {
return;
}
// Process encryption options, if any exist
boolean encrypt = false;
- final String oPassword = this.getOptions().optionPDFOwnerPassword();
- final String uPassword = this.getOptions().optionPDFUserPassword();
- final boolean allowPrint = this.getOptions().optionPDFUserPrint();
- final boolean allowCopyContent = this.getOptions().optionPDFUserCopy();
+ final String oPassword = this.getOutputConfiguration().getOwnerPassword();
+ final String uPassword = this.getOutputConfiguration().getUserPassword();
+ final boolean allowPrint = this.getOutputConfiguration().canUserPrint();
+ final boolean allowCopyContent = this.getOutputConfiguration().canUserCopy();
final boolean allowEditContent =
- this.getOptions().optionPDFUserModify();
+ this.getOutputConfiguration().canUserModify();
final boolean allowEditAnnotations =
- this.getOptions().optionPDFUserAnnotate();
+ this.getOutputConfiguration().canUserAnnotate();
if (oPassword != null) {
encrypt = true;
@@ -165,7 +168,7 @@
* {@inheritDoc}
*/
public void startOutput() throws OutputException {
- final String pdfVersion = this.getOptions().optionPDFVersion();
+ final String pdfVersion = this.getOutputConfiguration().getPdfVersion();
if (pdfVersion != null) {
final PdfVersion pdfVersionConstant = PdfVersion.fromString(
pdfVersion);
@@ -177,9 +180,9 @@
this.pdfDoc.setCreationDate(now);
// setup Encryption
addEncryption();
- final List<?> filters = this.getOptions().optionPDFFilters();
- for (int i = 0; i < filters.size(); i++) {
- final String filter = (String) filters.get(i);
+ final String[] filters = this.getOutputConfiguration().getPdfFilters();
+ for (int i = 0; i < filters.length; i++) {
+ final String filter = filters[i];
this.pdfDoc.addDefaultFilter(filter);
}
try {
@@ -687,4 +690,11 @@
this.pdfDoc.setKeywords(areaTree.getKeywords());
}
+ /**
+ * {@inheritDoc}
+ */
+ public DocumentPdfConfiguration getOutputConfiguration() {
+ return this.options;
+ }
+
}
Modified: trunk/foray/foray-render/src/java/org/foray/render/ps/PSRenderer.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/ps/PSRenderer.java 2010-02-02 00:57:15 UTC (rev 10925)
+++ trunk/foray/foray-render/src/java/org/foray/render/ps/PSRenderer.java 2010-02-02 19:54:20 UTC (rev 10926)
@@ -38,7 +38,6 @@
import org.foray.common.Mime;
import org.foray.common.StringUtil;
import org.foray.common.WKConstants;
-import org.foray.output.OutputConfig;
import org.foray.render.PrintRenderer;
import org.axsl.common.Gradient;
@@ -63,6 +62,7 @@
import org.axsl.graphic.SvgGraphic;
import org.axsl.graphic.output.GraphicOutputContext;
import org.axsl.graphic.output.GraphicPs;
+import org.axsl.output.DocumentConfiguration;
import org.axsl.output.OutputException;
import org.axsl.ps.BoundingBox;
import org.axsl.ps.Encoding;
@@ -178,15 +178,19 @@
/** The PostScript server. */
private PsServer psServer;
+ /** The user configuration for this output. */
+ private DocumentConfiguration configuration;
+
/**
* Constructor.
* @param logger The logger.
* @param renderConfig The configuration for this renderer.
* @param psServer The PostScript server to be used for this render process.
*/
- public PSRenderer(final Log logger, final OutputConfig renderConfig, final PsServer psServer) {
- super(logger, renderConfig);
+ public PSRenderer(final Log logger, final DocumentConfiguration renderConfig, final PsServer psServer) {
+ super(logger);
this.psServer = psServer;
+ this.configuration = renderConfig;
}
/**
@@ -1375,4 +1379,11 @@
return StringUtil.EMPTY_STRING;
}
+ /**
+ * {@inheritDoc}
+ */
+ public DocumentConfiguration getOutputConfiguration() {
+ return this.configuration;
+ }
+
}
Modified: trunk/foray/foray-render/src/java/org/foray/render/svg/SVGRenderer.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/svg/SVGRenderer.java 2010-02-02 00:57:15 UTC (rev 10925)
+++ trunk/foray/foray-render/src/java/org/foray/render/svg/SVGRenderer.java 2010-02-02 19:54:20 UTC (rev 10926)
@@ -31,7 +31,6 @@
import org.foray.common.SvgUtil;
import org.foray.common.WKConstants;
import org.foray.common.XMLUtil;
-import org.foray.output.OutputConfig;
import org.foray.render.Renderer;
import org.axsl.common.value.RuleStyle;
@@ -52,6 +51,7 @@
import org.axsl.graphic.GraphicException;
import org.axsl.graphic.GraphicServer;
import org.axsl.graphic.SvgGraphic;
+import org.axsl.output.DocumentConfiguration;
import org.axsl.output.OutputException;
import org.apache.commons.logging.Log;
@@ -104,6 +104,9 @@
* document.*/
private GraphicServer graphicServer;
+ /** The user configuration for this output. */
+ private DocumentConfiguration configuration;
+
/**
* Constructor.
* @param logger The logger.
@@ -111,9 +114,10 @@
* @param graphicServer The Graphic Server to use for creation and handling
* of the SVG document.
*/
- public SVGRenderer(final Log logger, final OutputConfig renderConfig,
+ public SVGRenderer(final Log logger, final DocumentConfiguration renderConfig,
final GraphicServer graphicServer) {
- super(logger, renderConfig);
+ super(logger);
+ this.configuration = renderConfig;
}
/**
@@ -661,4 +665,11 @@
public void resetTextCursor() {
}
+ /**
+ * {@inheritDoc}
+ */
+ public DocumentConfiguration getOutputConfiguration() {
+ return this.configuration;
+ }
+
}
Modified: trunk/foray/foray-render/src/java/org/foray/render/txt/TXTRenderer.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/txt/TXTRenderer.java 2010-02-02 00:57:15 UTC (rev 10925)
+++ trunk/foray/foray-render/src/java/org/foray/render/txt/TXTRenderer.java 2010-02-02 19:54:20 UTC (rev 10926)
@@ -29,7 +29,6 @@
package org.foray.render.txt;
import org.foray.common.WKConstants;
-import org.foray.output.OutputConfig;
import org.foray.render.PrintRenderer;
import org.foray.render.Renderer;
@@ -44,6 +43,7 @@
import org.axsl.galley.TextArea;
import org.axsl.graphic.Graphic;
import org.axsl.graphic.GraphicException;
+import org.axsl.output.DocumentConfiguration;
import org.axsl.output.OutputException;
import org.apache.commons.logging.Log;
@@ -51,7 +51,7 @@
import java.awt.Color;
import java.awt.Rectangle;
import java.io.IOException;
-import java.io.UnsupportedEncodingException;
+import java.nio.charset.Charset;
/**
* Renderer that renders areas to plain text.
@@ -62,6 +62,9 @@
*/
public class TXTRenderer extends PrintRenderer {
+ /** The default encoding to use in output. */
+ public static final Charset DEFAULT_ENCODING = Charset.forName("UTF-8");
+
/** The minimum width, in characters (??), that a graphic may be to be worth
* printing. */
private static final int MINIMUM_GRAPHIC_WIDTH = 4;
@@ -111,9 +114,6 @@
/** The standard number of lines per inch. */
private static final float STD_LINES_PER_INCH = 8;
- /** The default encoding to use in output. */
- private static final String DEFAULT_ENCODING = "UTF-8";
-
/** Tthe current stream to add Text commands to. */
private TXTStream currentStream;
@@ -170,13 +170,17 @@
/** Indicates whether we are on the first page. */
private boolean firstPage = false;
+ /** The user configuration for this output. */
+ private DocumentConfiguration configuration;
+
/**
* Constructor.
* @param logger The logger.
* @param renderConfig The configuration for this renderer.
*/
- public TXTRenderer(final Log logger, final OutputConfig renderConfig) {
- super(logger, renderConfig);
+ public TXTRenderer(final Log logger, final DocumentConfiguration renderConfig) {
+ super(logger);
+ this.configuration = renderConfig;
}
/**
@@ -546,17 +550,9 @@
public void startOutput() {
getLogger().info("rendering areas to TEXT");
this.currentStream = new TXTStream(this.getOutputStream());
- String encoding;
- if (this.getOptions() != null) {
- encoding = this.getOptions().optionTXTEncoding();
- try {
- " ".getBytes(encoding);
- } catch (final UnsupportedEncodingException uee) {
- getLogger().warn("Encoding '" + encoding
- + "' is not supported, so defaulted to "
- + TXTRenderer.DEFAULT_ENCODING);
- encoding = TXTRenderer.DEFAULT_ENCODING;
- }
+ Charset encoding;
+ if (this.getOutputConfiguration() != null) {
+ encoding = this.getOutputConfiguration().getCharset();
} else {
encoding = TXTRenderer.DEFAULT_ENCODING;
}
@@ -654,4 +650,11 @@
public void resetTextCursor() {
}
+ /**
+ * {@inheritDoc}
+ */
+ public DocumentConfiguration getOutputConfiguration() {
+ return this.configuration;
+ }
+
}
Modified: trunk/foray/foray-render/src/java/org/foray/render/txt/TXTStream.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/txt/TXTStream.java 2010-02-02 00:57:15 UTC (rev 10925)
+++ trunk/foray/foray-render/src/java/org/foray/render/txt/TXTStream.java 2010-02-02 19:54:20 UTC (rev 10926)
@@ -30,6 +30,7 @@
import java.io.IOException;
import java.io.OutputStream;
+import java.nio.charset.Charset;
/**
...
[truncated message content] |
|
From: <vic...@us...> - 2010-02-02 20:40:21
|
Revision: 10927
http://foray.svn.sourceforge.net/foray/?rev=10927&view=rev
Author: victormote
Date: 2010-02-02 20:40:14 +0000 (Tue, 02 Feb 2010)
Log Message:
-----------
Move OutputConfig class from the output project to the core project.
Modified Paths:
--------------
trunk/foray/foray-app/src/java/org/foray/app/AWTStarter.java
trunk/foray/foray-app/src/java/org/foray/app/CommandLineOptions.java
trunk/foray/foray-app/src/java/org/foray/app/CommandLineStarter.java
trunk/foray/foray-app/src/java/org/foray/app/Options.java
trunk/foray/foray-app/src/java/org/foray/app/OutputTargetFactory.java
trunk/foray/foray-app/src/java/org/foray/app/PrintStarter.java
trunk/foray/foray-app/src/java/org/foray/app/Starter.java
trunk/foray/foray-app/src/java/org/foray/app/ant/FOrayAntTaskStarter.java
trunk/foray/foray-app/src/java/org/foray/app/test/TestConverter.java
trunk/foray/foray-render/src/java/org/foray/render/awt/AWTPrintRenderer.java
Added Paths:
-----------
trunk/foray/foray-core/src/java/org/foray/core/OutputConfig.java
Removed Paths:
-------------
trunk/foray/foray-output/src/java/org/foray/output/OutputConfig.java
Modified: trunk/foray/foray-app/src/java/org/foray/app/AWTStarter.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/AWTStarter.java 2010-02-02 19:54:20 UTC (rev 10926)
+++ trunk/foray/foray-app/src/java/org/foray/app/AWTStarter.java 2010-02-02 20:40:14 UTC (rev 10927)
@@ -38,8 +38,8 @@
import org.foray.core.FOrayDocument;
import org.foray.core.FOrayException;
import org.foray.core.FOraySession;
+import org.foray.core.OutputConfig;
import org.foray.core.SessionConfig;
-import org.foray.output.OutputConfig;
import org.foray.render.awt.AWTRenderer;
import org.foray.render.awt.viewer.PreviewDialog;
import org.foray.render.awt.viewer.SecureResourceBundle;
Modified: trunk/foray/foray-app/src/java/org/foray/app/CommandLineOptions.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/CommandLineOptions.java 2010-02-02 19:54:20 UTC (rev 10926)
+++ trunk/foray/foray-app/src/java/org/foray/app/CommandLineOptions.java 2010-02-02 20:40:14 UTC (rev 10927)
@@ -31,8 +31,8 @@
import org.foray.common.ConfigurationException;
import org.foray.common.url.URLFactory;
import org.foray.core.FOrayException;
+import org.foray.core.OutputConfig;
import org.foray.core.SessionConfig;
-import org.foray.output.OutputConfig;
import org.apache.commons.cli.CommandLine;
Modified: trunk/foray/foray-app/src/java/org/foray/app/CommandLineStarter.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/CommandLineStarter.java 2010-02-02 19:54:20 UTC (rev 10926)
+++ trunk/foray/foray-app/src/java/org/foray/app/CommandLineStarter.java 2010-02-02 20:40:14 UTC (rev 10927)
@@ -32,9 +32,9 @@
import org.foray.core.FOrayException;
import org.foray.core.FOraySession;
import org.foray.core.FOrayTarget;
+import org.foray.core.OutputConfig;
import org.foray.core.SessionConfig;
import org.foray.layout.LayoutStrategy;
-import org.foray.output.OutputConfig;
import org.foray.pioneer.PioneerLS;
import org.axsl.output.OutputTarget;
Modified: trunk/foray/foray-app/src/java/org/foray/app/Options.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/Options.java 2010-02-02 19:54:20 UTC (rev 10926)
+++ trunk/foray/foray-app/src/java/org/foray/app/Options.java 2010-02-02 20:40:14 UTC (rev 10927)
@@ -30,8 +30,8 @@
import org.foray.core.ConfigurationParser;
import org.foray.core.FOrayException;
+import org.foray.core.OutputConfig;
import org.foray.core.SessionConfig;
-import org.foray.output.OutputConfig;
import org.xml.sax.InputSource;
Modified: trunk/foray/foray-app/src/java/org/foray/app/OutputTargetFactory.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/OutputTargetFactory.java 2010-02-02 19:54:20 UTC (rev 10926)
+++ trunk/foray/foray-app/src/java/org/foray/app/OutputTargetFactory.java 2010-02-02 20:40:14 UTC (rev 10927)
@@ -29,8 +29,8 @@
package org.foray.app;
import org.foray.core.FOrayException;
+import org.foray.core.OutputConfig;
import org.foray.output.MIFConverter;
-import org.foray.output.OutputConfig;
import org.foray.ps.PsServer4a;
import org.foray.render.awt.AWTRenderer;
import org.foray.render.pcl.PCLRenderer;
Modified: trunk/foray/foray-app/src/java/org/foray/app/PrintStarter.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/PrintStarter.java 2010-02-02 19:54:20 UTC (rev 10926)
+++ trunk/foray/foray-app/src/java/org/foray/app/PrintStarter.java 2010-02-02 20:40:14 UTC (rev 10927)
@@ -30,8 +30,8 @@
import org.foray.core.FOrayException;
import org.foray.core.FOraySession;
+import org.foray.core.OutputConfig;
import org.foray.core.SessionConfig;
-import org.foray.output.OutputConfig;
import java.awt.print.PrinterJob;
Modified: trunk/foray/foray-app/src/java/org/foray/app/Starter.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/Starter.java 2010-02-02 19:54:20 UTC (rev 10926)
+++ trunk/foray/foray-app/src/java/org/foray/app/Starter.java 2010-02-02 20:40:14 UTC (rev 10927)
@@ -30,8 +30,8 @@
import org.foray.common.Logging;
import org.foray.core.FOrayException;
+import org.foray.core.OutputConfig;
import org.foray.core.SessionConfig;
-import org.foray.output.OutputConfig;
import org.apache.commons.logging.Log;
Modified: trunk/foray/foray-app/src/java/org/foray/app/ant/FOrayAntTaskStarter.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/ant/FOrayAntTaskStarter.java 2010-02-02 19:54:20 UTC (rev 10926)
+++ trunk/foray/foray-app/src/java/org/foray/app/ant/FOrayAntTaskStarter.java 2010-02-02 20:40:14 UTC (rev 10927)
@@ -38,8 +38,8 @@
import org.foray.core.FOrayException;
import org.foray.core.FOraySession;
import org.foray.core.FOrayTarget;
+import org.foray.core.OutputConfig;
import org.foray.core.SessionConfig;
-import org.foray.output.OutputConfig;
import org.axsl.output.OutputTarget;
Modified: trunk/foray/foray-app/src/java/org/foray/app/test/TestConverter.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/test/TestConverter.java 2010-02-02 19:54:20 UTC (rev 10926)
+++ trunk/foray/foray-app/src/java/org/foray/app/test/TestConverter.java 2010-02-02 20:40:14 UTC (rev 10927)
@@ -38,8 +38,8 @@
import org.foray.core.FOrayException;
import org.foray.core.FOraySession;
import org.foray.core.FOrayTarget;
+import org.foray.core.OutputConfig;
import org.foray.core.SessionConfig;
-import org.foray.output.OutputConfig;
import org.axsl.output.OutputTarget;
Copied: trunk/foray/foray-core/src/java/org/foray/core/OutputConfig.java (from rev 10926, trunk/foray/foray-output/src/java/org/foray/output/OutputConfig.java)
===================================================================
--- trunk/foray/foray-core/src/java/org/foray/core/OutputConfig.java (rev 0)
+++ trunk/foray/foray-core/src/java/org/foray/core/OutputConfig.java 2010-02-02 20:40:14 UTC (rev 10927)
@@ -0,0 +1,220 @@
+/*
+ * Copyright 2004 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.foray.core;
+
+import org.foray.common.Configuration;
+import org.foray.common.ConfigurationException;
+
+import org.axsl.output.DocumentAreaConfiguration;
+import org.axsl.output.DocumentPdfConfiguration;
+
+import java.nio.charset.Charset;
+
+/**
+ * Configuration implementation for those configuration items that are
+ * related to a specific Renderer. Note that currently all Renderers use the
+ * same class. This allows command-line and configuration-file entries to be
+ * collected at startup and placed into a default instance of RenderConfig.
+ * In general, renderer-specific configuration options should have names that
+ * start with the renderer name (e.g. "pdf"). Renderers that are not interested
+ * in options specific to other renderers should simply ignore those options.
+ */
+public class OutputConfig extends Configuration implements DocumentPdfConfiguration, DocumentAreaConfiguration {
+
+ /**
+ * Constructor.
+ */
+ public OutputConfig() {
+ super();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getName() {
+ return "FOray Renderer Configuration";
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ protected void setDefaults() {
+ put("at-sparse", Boolean.FALSE, PRECEDENCE_DEFAULT);
+
+ final String[] streamFilterList = new String[] {
+ "flate",
+ "ascii-85"
+ };
+ put("pdf-filters", streamFilterList, PRECEDENCE_DEFAULT);
+
+ // Skip pdf-owner-password. It may be null.
+ // Skip pdf-user-password. It may be null.
+ put("pdf-user-print", Boolean.FALSE, PRECEDENCE_DEFAULT);
+ put("pdf-user-copy", Boolean.FALSE, PRECEDENCE_DEFAULT);
+ put("pdf-user-modify", Boolean.FALSE, PRECEDENCE_DEFAULT);
+ put("pdf-user-annotate", Boolean.FALSE, PRECEDENCE_DEFAULT);
+
+ put("txt-encoding", Charset.forName("UTF-8"), PRECEDENCE_DEFAULT);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean parseOption(final String key, final String value, final int precedenceValue)
+ throws ConfigurationException {
+ if (key.equals("at-sparse")
+ || key.equals("pdf-user-print")
+ || key.equals("pdf-user-copy")
+ || key.equals("pdf-user-modify")
+ || key.equals("pdf-user-annotate")) {
+ // Boolean value.
+ final Boolean booleanValue = this.parseBoolean(key, value);
+ put(key, booleanValue, precedenceValue);
+ return true;
+ }
+ if (key.equals("pdf-filters")) {
+ // Space-delimited List.
+ final String[] list = parseSpaceDelimitedList(key, value);
+ put(key, list, precedenceValue);
+ return true;
+ }
+ if (key.equals("pdf-owner-password")
+ || key.equals("pdf-user-password")
+ || key.equals("pdf-version")
+ || key.equals("txt-encoding")) {
+ // Unvalidated String.
+ put(key, value, precedenceValue);
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isOutputSparse() {
+ // Never null.
+ return getBooleanValue("at-sparse").booleanValue();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String[] getPdfFilters() {
+ return (String[]) getValue("pdf-filters");
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getOwnerPassword() {
+ return getStringValue("pdf-owner-password");
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getUserPassword() {
+ return getStringValue("pdf-user-password");
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean canUserPrint() {
+ // Never null.
+ return getBooleanValue("pdf-user-print").booleanValue();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean canUserCopy() {
+ // Never null.
+ return getBooleanValue("pdf-user-copy").booleanValue();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean canUserModify() {
+ // Never null.
+ return getBooleanValue("pdf-user-modify").booleanValue();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean canUserAnnotate() {
+ // Never null.
+ return getBooleanValue("pdf-user-annotate").booleanValue();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Charset getCharset() {
+ // Never null.
+ final Object value = this.getValue("txt-encoding");
+ return (Charset) value;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getPdfVersion() {
+ return getStringValue("pdf-version");
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getGenericOption(final String optionName) {
+ return getStringValue(optionName);
+ }
+
+ /**
+ * Sets the "fineDetail" option.
+ * @param value The value which should be set.
+ * @param precedenceValue The precedence with which this option should be treated.
+ */
+ public void setFineDetail(final Boolean value, final int precedenceValue) {
+ this.put("fineDetail", value, precedenceValue);
+ }
+
+ /**
+ * Sets the "consistentOutput" option.
+ * @param value The value which should be set.
+ * @param precedenceValue The precedence with which this option should be treated.
+ */
+ public void setConsistentOutput(final Boolean value, final int precedenceValue) {
+ this.put("consistentOutput", value, precedenceValue);
+ }
+
+}
Deleted: trunk/foray/foray-output/src/java/org/foray/output/OutputConfig.java
===================================================================
--- trunk/foray/foray-output/src/java/org/foray/output/OutputConfig.java 2010-02-02 19:54:20 UTC (rev 10926)
+++ trunk/foray/foray-output/src/java/org/foray/output/OutputConfig.java 2010-02-02 20:40:14 UTC (rev 10927)
@@ -1,220 +0,0 @@
-/*
- * Copyright 2004 The FOray Project.
- * http://www.foray.org
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * This work is in part derived from the following work(s), used with the
- * permission of the licensor:
- * Apache FOP, licensed by the Apache Software Foundation
- *
- */
-
-/*
- * $LastChangedRevision$
- * $LastChangedDate$
- * $LastChangedBy$
- */
-
-package org.foray.output;
-
-import org.foray.common.Configuration;
-import org.foray.common.ConfigurationException;
-
-import org.axsl.output.DocumentAreaConfiguration;
-import org.axsl.output.DocumentPdfConfiguration;
-
-import java.nio.charset.Charset;
-
-/**
- * Configuration implementation for those configuration items that are
- * related to a specific Renderer. Note that currently all Renderers use the
- * same class. This allows command-line and configuration-file entries to be
- * collected at startup and placed into a default instance of RenderConfig.
- * In general, renderer-specific configuration options should have names that
- * start with the renderer name (e.g. "pdf"). Renderers that are not interested
- * in options specific to other renderers should simply ignore those options.
- */
-public class OutputConfig extends Configuration implements DocumentPdfConfiguration, DocumentAreaConfiguration {
-
- /**
- * Constructor.
- */
- public OutputConfig() {
- super();
- }
-
- /**
- * {@inheritDoc}
- */
- public String getName() {
- return "FOray Renderer Configuration";
- }
-
- /**
- * {@inheritDoc}
- */
- protected void setDefaults() {
- put("at-sparse", Boolean.FALSE, PRECEDENCE_DEFAULT);
-
- final String[] streamFilterList = new String[] {
- "flate",
- "ascii-85"
- };
- put("pdf-filters", streamFilterList, PRECEDENCE_DEFAULT);
-
- // Skip pdf-owner-password. It may be null.
- // Skip pdf-user-password. It may be null.
- put("pdf-user-print", Boolean.FALSE, PRECEDENCE_DEFAULT);
- put("pdf-user-copy", Boolean.FALSE, PRECEDENCE_DEFAULT);
- put("pdf-user-modify", Boolean.FALSE, PRECEDENCE_DEFAULT);
- put("pdf-user-annotate", Boolean.FALSE, PRECEDENCE_DEFAULT);
-
- put("txt-encoding", Charset.forName("UTF-8"), PRECEDENCE_DEFAULT);
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean parseOption(final String key, final String value, final int precedenceValue)
- throws ConfigurationException {
- if (key.equals("at-sparse")
- || key.equals("pdf-user-print")
- || key.equals("pdf-user-copy")
- || key.equals("pdf-user-modify")
- || key.equals("pdf-user-annotate")) {
- // Boolean value.
- final Boolean booleanValue = this.parseBoolean(key, value);
- put(key, booleanValue, precedenceValue);
- return true;
- }
- if (key.equals("pdf-filters")) {
- // Space-delimited List.
- final String[] list = parseSpaceDelimitedList(key, value);
- put(key, list, precedenceValue);
- return true;
- }
- if (key.equals("pdf-owner-password")
- || key.equals("pdf-user-password")
- || key.equals("pdf-version")
- || key.equals("txt-encoding")) {
- // Unvalidated String.
- put(key, value, precedenceValue);
- return true;
- }
- return false;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean isOutputSparse() {
- // Never null.
- return getBooleanValue("at-sparse").booleanValue();
- }
-
- /**
- * {@inheritDoc}
- */
- public String[] getPdfFilters() {
- return (String[]) getValue("pdf-filters");
- }
-
- /**
- * {@inheritDoc}
- */
- public String getOwnerPassword() {
- return getStringValue("pdf-owner-password");
- }
-
- /**
- * {@inheritDoc}
- */
- public String getUserPassword() {
- return getStringValue("pdf-user-password");
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean canUserPrint() {
- // Never null.
- return getBooleanValue("pdf-user-print").booleanValue();
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean canUserCopy() {
- // Never null.
- return getBooleanValue("pdf-user-copy").booleanValue();
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean canUserModify() {
- // Never null.
- return getBooleanValue("pdf-user-modify").booleanValue();
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean canUserAnnotate() {
- // Never null.
- return getBooleanValue("pdf-user-annotate").booleanValue();
- }
-
- /**
- * {@inheritDoc}
- */
- public Charset getCharset() {
- // Never null.
- final Object value = this.getValue("txt-encoding");
- return (Charset) value;
- }
-
- /**
- * {@inheritDoc}
- */
- public String getPdfVersion() {
- return getStringValue("pdf-version");
- }
-
- /**
- * {@inheritDoc}
- */
- public String getGenericOption(final String optionName) {
- return getStringValue(optionName);
- }
-
- /**
- * Sets the "fineDetail" option.
- * @param value The value which should be set.
- * @param precedenceValue The precedence with which this option should be treated.
- */
- public void setFineDetail(final Boolean value, final int precedenceValue) {
- this.put("fineDetail", value, precedenceValue);
- }
-
- /**
- * Sets the "consistentOutput" option.
- * @param value The value which should be set.
- * @param precedenceValue The precedence with which this option should be treated.
- */
- public void setConsistentOutput(final Boolean value, final int precedenceValue) {
- this.put("consistentOutput", value, precedenceValue);
- }
-
-}
Modified: trunk/foray/foray-render/src/java/org/foray/render/awt/AWTPrintRenderer.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/awt/AWTPrintRenderer.java 2010-02-02 19:54:20 UTC (rev 10926)
+++ trunk/foray/foray-render/src/java/org/foray/render/awt/AWTPrintRenderer.java 2010-02-02 20:40:14 UTC (rev 10927)
@@ -28,10 +28,9 @@
package org.foray.render.awt;
-import org.foray.output.OutputConfig;
-
import org.axsl.galley.GalleyVisitorException;
import org.axsl.galley.Page;
+import org.axsl.output.OutputConfiguration;
import org.axsl.output.OutputException;
import org.apache.commons.logging.Log;
@@ -74,7 +73,7 @@
* @param renderConfig The configuration for this renderer.
* @param printerJob The printer job to which the output should be sent.
*/
- public AWTPrintRenderer(final Log logger, final OutputConfig renderConfig,
+ public AWTPrintRenderer(final Log logger, final OutputConfiguration renderConfig,
final PrinterJob printerJob) {
super(logger, renderConfig);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2010-02-03 03:58:02
|
Revision: 10928
http://foray.svn.sourceforge.net/foray/?rev=10928&view=rev
Author: victormote
Date: 2010-02-03 03:57:44 +0000 (Wed, 03 Feb 2010)
Log Message:
-----------
1. Improvements to javadoc build.xml.
2. Clean up some javadoc content problems.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/Area.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java
trunk/foray/scripts/build-common.xml
trunk/foray/scripts/build.xml
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/Area.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2010-02-02 20:40:14 UTC (rev 10927)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2010-02-03 03:57:44 UTC (rev 10928)
@@ -634,7 +634,7 @@
/**
* Returns the content stacking axis for this area.
- * @return Either {@Link RelativeAxis#BLOCK_PROGRESSION} or
+ * @return Either {@link RelativeAxis#BLOCK_PROGRESSION} or
* {@link RelativeAxis#INLINE_PROGRESSION}, depending on whether the
* contents of this area stack in the block-progression-direction or the
* inline-progression-direction.
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2010-02-02 20:40:14 UTC (rev 10927)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2010-02-03 03:57:44 UTC (rev 10928)
@@ -998,10 +998,7 @@
* @param fobj The FObj to which the property belongs.
* @param context An object that knows how to resolve FO Tree context
* issues.
- * @param subProperty The sub-property, one of
- * {@link AbstractKeep.Type#WITHIN_LINE},
- * {@link AbstractKeep.Type#WITHIN_COLUMN}, or
- * {@link AbstractKeep.Type#WITHIN_PAGE}.
+ * @param subProperty The keep type of the property to be returned.
* @return The keep-together property.
*/
public int getKeepTogether(final FObj fobj, final FoContext context,
@@ -1069,10 +1066,7 @@
* @param fobj The FObj to which the property belongs.
* @param context An object that knows how to resolve FO Tree context
* issues.
- * @param subProperty The sub-property, one of
- * {@link AbstractKeep.Type#WITHIN_LINE},
- * {@link AbstractKeep.Type#WITHIN_COLUMN}, or
- * {@link AbstractKeep.Type#WITHIN_PAGE}.
+ * @param subProperty The keep type of the property to be returned.
* @return The keep-with-next property.
*/
public int getKeepWithNext(final FObj fobj, final FoContext context,
@@ -1149,10 +1143,7 @@
* @param fobj The FObj to which the property belongs.
* @param context An object that knows how to resolve FO Tree context
* issues.
- * @param subProperty The sub-property, one of
- * {@link AbstractKeep.Type#WITHIN_LINE},
- * {@link AbstractKeep.Type#WITHIN_COLUMN}, or
- * {@link AbstractKeep.Type#WITHIN_PAGE}.
+ * @param subProperty The keep type of the property to be returned.
* @return The keep-with-previous property.
*/
public int getKeepWithPrevious(final FObj fobj, final FoContext context,
Modified: trunk/foray/scripts/build-common.xml
===================================================================
--- trunk/foray/scripts/build-common.xml 2010-02-02 20:40:14 UTC (rev 10927)
+++ trunk/foray/scripts/build-common.xml 2010-02-03 03:57:44 UTC (rev 10928)
@@ -52,6 +52,7 @@
classpath="${checkstyle.home}/checkstyle-all-5.0.jar">
</taskdef>
+ <property name="axsl.javadoc.root" value="http://www.axsl.org/api/java/repos"/>
</target>
</project>
Modified: trunk/foray/scripts/build.xml
===================================================================
--- trunk/foray/scripts/build.xml 2010-02-02 20:40:14 UTC (rev 10927)
+++ trunk/foray/scripts/build.xml 2010-02-03 03:57:44 UTC (rev 10928)
@@ -369,6 +369,7 @@
<target name="javadoc-api" depends="prepare"
description="Generate API javadocs (public items only)">
<echo message="Generate API javadocs (public items only)"/>
+ <delete dir="${build.javadoc.api}"/>
<mkdir dir="${build.javadoc.api}"/>
<path id="javadoc-classpath">
@@ -378,17 +379,19 @@
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
+ <fileset dir="${ant.home}/lib">
+ <include name="ant.jar"/>
+ </fileset>
</path>
<javadoc
- packagenames="org.foray.*"
destdir="${build.javadoc.api}"
classpathref="javadoc-classpath"
author="false"
version="false"
windowtitle="FOray API"
doctitle="FOray API Documentation"
- header="<a href='http://sourceforge.net' target='new' >
+ header="<a href='http://sourceforge.net' target='new' >
<img src='http://sourceforge.net/sflogo.php?group_id=109663&type=4'
border='0' alt='SourceForge.net Logo'/></a>
<br>
@@ -400,10 +403,10 @@
overview="${foray.sandbox}/foray-app/src/java/org/foray/app/overview.html"
use="true"
failonerror="true"
- source="1.4"
public="true"
package="false"
- private="false">
+ private="false"
+ maxmemory="256m">
<sourcepath>
<pathelement path="${foray.sandbox}/foray-app/src/java"/>
<pathelement path="${foray.sandbox}/foray-core/src/java"/>
@@ -423,7 +426,33 @@
<pathelement path="${foray.sandbox}/foray-mif/src/java"/>
<pathelement path="${foray.sandbox}/foray-pdf/src/java"/>
<pathelement path="${foray.sandbox}/foray-text/src/java"/>
+
+ <!-- Include the axsl source files here, so that the FOray classes can inherit doc from them.
+ See below where we exclude the related package names. -->
+ <pathelement path="${axsl.sandbox}/axsl-area/src/java"/>
+ <pathelement path="${axsl.sandbox}/axsl-common/src/java"/>
+ <pathelement path="${axsl.sandbox}/axsl-fo/src/java"/>
+ <pathelement path="${axsl.sandbox}/axsl-font/src/java"/>
+ <pathelement path="${axsl.sandbox}/axsl-galley/src/java"/>
+ <pathelement path="${axsl.sandbox}/axsl-graphic/src/java"/>
+ <pathelement path="${axsl.sandbox}/axsl-hyphen/src/java"/>
+ <pathelement path="${axsl.sandbox}/axsl-layout/src/java"/>
+ <pathelement path="${axsl.sandbox}/axsl-mif/src/java"/>
+ <pathelement path="${axsl.sandbox}/axsl-output/src/java"/>
+ <pathelement path="${axsl.sandbox}/axsl-pdf/src/java"/>
+ <pathelement path="${axsl.sandbox}/axsl-ps/src/java"/>
+ <pathelement path="${axsl.sandbox}/axsl-speech/src/java"/>
+ <pathelement path="${axsl.sandbox}/axsl-text/src/java"/>
</sourcepath>
+ <package name="org.foray.*"/>
+ <package name="org.axsl.*"/>
+
+ <!-- Exclude the AXSL package from the documentation. We included them in the sourcepath above so that the FOray
+ classes can inherit doc from them, but we don't want the doc of their classes included here. -->
+ <excludepackage name="org.axsl.*"/>
+
+ <!-- Link to the AXSL javadoc. -->
+ <link href="${axsl.javadoc.root}"/>
<group title="The FOray Application">
<package name="org.foray.app"/>
<package name="org.foray.app.*"/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2010-02-03 04:59:33
|
Revision: 10929
http://foray.svn.sourceforge.net/foray/?rev=10929&view=rev
Author: victormote
Date: 2010-02-03 04:59:26 +0000 (Wed, 03 Feb 2010)
Log Message:
-----------
Add Eclipse checks of javadoc comments.
Modified Paths:
--------------
trunk/foray/foray-app/.settings/org.eclipse.jdt.core.prefs
trunk/foray/foray-areatree/.settings/org.eclipse.jdt.core.prefs
trunk/foray/foray-common/.settings/org.eclipse.jdt.core.prefs
trunk/foray/foray-core/.settings/org.eclipse.jdt.core.prefs
trunk/foray/foray-font/.settings/org.eclipse.jdt.core.prefs
trunk/foray/foray-fotree/.settings/org.eclipse.jdt.core.prefs
trunk/foray/foray-graphic/.settings/org.eclipse.jdt.core.prefs
trunk/foray/foray-hyphen/.settings/org.eclipse.jdt.core.prefs
trunk/foray/foray-layout/.settings/org.eclipse.jdt.core.prefs
trunk/foray/foray-mif/.settings/org.eclipse.jdt.core.prefs
trunk/foray/foray-output/.settings/org.eclipse.jdt.core.prefs
trunk/foray/foray-pdf/.settings/org.eclipse.jdt.core.prefs
trunk/foray/foray-pioneer/.settings/org.eclipse.jdt.core.prefs
trunk/foray/foray-pretty/.settings/org.eclipse.jdt.core.prefs
trunk/foray/foray-ps/.settings/org.eclipse.jdt.core.prefs
trunk/foray/foray-render/.settings/org.eclipse.jdt.core.prefs
trunk/foray/foray-speech/.settings/org.eclipse.jdt.core.prefs
trunk/foray/foray-text/.settings/org.eclipse.jdt.core.prefs
Modified: trunk/foray/foray-app/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/foray/foray-app/.settings/org.eclipse.jdt.core.prefs 2010-02-03 03:57:44 UTC (rev 10928)
+++ trunk/foray/foray-app/.settings/org.eclipse.jdt.core.prefs 2010-02-03 04:59:26 UTC (rev 10929)
@@ -1,4 +1,4 @@
-#Tue Mar 10 17:44:06 MDT 2009
+#Tue Feb 02 21:53:45 MST 2010
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
@@ -7,6 +7,7 @@
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
@@ -26,9 +27,21 @@
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=private
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
Modified: trunk/foray/foray-areatree/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/foray/foray-areatree/.settings/org.eclipse.jdt.core.prefs 2010-02-03 03:57:44 UTC (rev 10928)
+++ trunk/foray/foray-areatree/.settings/org.eclipse.jdt.core.prefs 2010-02-03 04:59:26 UTC (rev 10929)
@@ -1,4 +1,4 @@
-#Tue Mar 10 17:44:13 MDT 2009
+#Tue Feb 02 21:53:45 MST 2010
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
@@ -7,6 +7,7 @@
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
@@ -26,9 +27,21 @@
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=private
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
Modified: trunk/foray/foray-common/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/foray/foray-common/.settings/org.eclipse.jdt.core.prefs 2010-02-03 03:57:44 UTC (rev 10928)
+++ trunk/foray/foray-common/.settings/org.eclipse.jdt.core.prefs 2010-02-03 04:59:26 UTC (rev 10929)
@@ -1,4 +1,4 @@
-#Tue Mar 10 17:44:20 MDT 2009
+#Tue Feb 02 21:53:45 MST 2010
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
@@ -7,6 +7,7 @@
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
@@ -26,9 +27,21 @@
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=private
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
Modified: trunk/foray/foray-core/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/foray/foray-core/.settings/org.eclipse.jdt.core.prefs 2010-02-03 03:57:44 UTC (rev 10928)
+++ trunk/foray/foray-core/.settings/org.eclipse.jdt.core.prefs 2010-02-03 04:59:26 UTC (rev 10929)
@@ -1,4 +1,4 @@
-#Tue Mar 10 17:44:26 MDT 2009
+#Tue Feb 02 21:53:45 MST 2010
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
@@ -7,6 +7,7 @@
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
@@ -26,9 +27,21 @@
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=private
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
Modified: trunk/foray/foray-font/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/foray/foray-font/.settings/org.eclipse.jdt.core.prefs 2010-02-03 03:57:44 UTC (rev 10928)
+++ trunk/foray/foray-font/.settings/org.eclipse.jdt.core.prefs 2010-02-03 04:59:26 UTC (rev 10929)
@@ -1,4 +1,4 @@
-#Tue Mar 10 17:44:32 MDT 2009
+#Tue Feb 02 21:53:45 MST 2010
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
@@ -7,6 +7,7 @@
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
@@ -26,9 +27,21 @@
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=private
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
Modified: trunk/foray/foray-fotree/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/foray/foray-fotree/.settings/org.eclipse.jdt.core.prefs 2010-02-03 03:57:44 UTC (rev 10928)
+++ trunk/foray/foray-fotree/.settings/org.eclipse.jdt.core.prefs 2010-02-03 04:59:26 UTC (rev 10929)
@@ -1,4 +1,4 @@
-#Tue Mar 10 17:44:39 MDT 2009
+#Tue Feb 02 21:53:45 MST 2010
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
@@ -7,6 +7,7 @@
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
@@ -26,9 +27,21 @@
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=private
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
Modified: trunk/foray/foray-graphic/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/foray/foray-graphic/.settings/org.eclipse.jdt.core.prefs 2010-02-03 03:57:44 UTC (rev 10928)
+++ trunk/foray/foray-graphic/.settings/org.eclipse.jdt.core.prefs 2010-02-03 04:59:26 UTC (rev 10929)
@@ -1,4 +1,4 @@
-#Tue Mar 10 17:44:45 MDT 2009
+#Tue Feb 02 21:53:45 MST 2010
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
@@ -7,6 +7,7 @@
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
@@ -26,9 +27,21 @@
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=private
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
Modified: trunk/foray/foray-hyphen/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/foray/foray-hyphen/.settings/org.eclipse.jdt.core.prefs 2010-02-03 03:57:44 UTC (rev 10928)
+++ trunk/foray/foray-hyphen/.settings/org.eclipse.jdt.core.prefs 2010-02-03 04:59:26 UTC (rev 10929)
@@ -1,4 +1,4 @@
-#Tue Mar 10 17:44:51 MDT 2009
+#Tue Feb 02 21:53:45 MST 2010
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
@@ -7,6 +7,7 @@
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
@@ -26,9 +27,21 @@
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=private
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
Modified: trunk/foray/foray-layout/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/foray/foray-layout/.settings/org.eclipse.jdt.core.prefs 2010-02-03 03:57:44 UTC (rev 10928)
+++ trunk/foray/foray-layout/.settings/org.eclipse.jdt.core.prefs 2010-02-03 04:59:26 UTC (rev 10929)
@@ -1,4 +1,4 @@
-#Tue Mar 10 17:44:57 MDT 2009
+#Tue Feb 02 21:53:45 MST 2010
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
@@ -7,6 +7,7 @@
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
@@ -26,9 +27,21 @@
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=private
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
Modified: trunk/foray/foray-mif/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/foray/foray-mif/.settings/org.eclipse.jdt.core.prefs 2010-02-03 03:57:44 UTC (rev 10928)
+++ trunk/foray/foray-mif/.settings/org.eclipse.jdt.core.prefs 2010-02-03 04:59:26 UTC (rev 10929)
@@ -1,4 +1,4 @@
-#Tue Mar 10 17:45:03 MDT 2009
+#Tue Feb 02 21:53:45 MST 2010
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
@@ -7,6 +7,7 @@
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
@@ -26,9 +27,21 @@
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=private
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
Modified: trunk/foray/foray-output/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/foray/foray-output/.settings/org.eclipse.jdt.core.prefs 2010-02-03 03:57:44 UTC (rev 10928)
+++ trunk/foray/foray-output/.settings/org.eclipse.jdt.core.prefs 2010-02-03 04:59:26 UTC (rev 10929)
@@ -1,4 +1,4 @@
-#Tue Mar 10 17:45:10 MDT 2009
+#Tue Feb 02 21:53:45 MST 2010
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
@@ -7,6 +7,7 @@
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
@@ -26,9 +27,21 @@
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=private
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
Modified: trunk/foray/foray-pdf/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/foray/foray-pdf/.settings/org.eclipse.jdt.core.prefs 2010-02-03 03:57:44 UTC (rev 10928)
+++ trunk/foray/foray-pdf/.settings/org.eclipse.jdt.core.prefs 2010-02-03 04:59:26 UTC (rev 10929)
@@ -1,4 +1,4 @@
-#Tue Mar 10 17:45:17 MDT 2009
+#Tue Feb 02 21:53:45 MST 2010
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
@@ -7,6 +7,7 @@
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt...
[truncated message content] |
|
From: <vic...@us...> - 2010-02-03 06:12:31
|
Revision: 10930
http://foray.svn.sourceforge.net/foray/?rev=10930&view=rev
Author: victormote
Date: 2010-02-03 06:12:24 +0000 (Wed, 03 Feb 2010)
Log Message:
-----------
Clean up some javadoc problems.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java
trunk/foray/foray-areatree/src/java/org/foray/area/TableFooterContainer.java
trunk/foray/foray-common/src/java/org/foray/common/ps/EncodingVector4a.java
trunk/foray/foray-font/src/java/org/foray/font/ConsumerFont4a.java
trunk/foray/foray-font/src/java/org/foray/font/format/Type1File.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/Property.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/axsl/AxslPropertyKeyword.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/FoPropertyKeyword.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/LayoutMasterSet.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/parse/PropertyTokenizer.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtBorderStyle.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/BMPGraphic.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/GraphicServer4a.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/batik/PDFGraphicsConfiguration.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/math/MathMLDocument4a.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFXReference.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/OverrideGraftingContext.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java
trunk/foray/foray-ps/src/java/org/foray/ps/encode/CharSetExtendedRoman.java
trunk/foray/foray-ps/src/java/org/foray/ps/encode/CharSetWindowsANSI.java
trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingCE.java
trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingExpert.java
trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingExpertSubset.java
trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingFOrayLatinExtra.java
trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingISOLatin1.java
trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingMacExpert.java
trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingMacRoman.java
trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingMacStandard.java
trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingPDFDoc.java
trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingStandard.java
trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingSymbol.java
trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingWinAnsi.java
trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingZapfDingbats.java
trunk/foray/foray-ps/src/java/org/foray/ps/encode/GlyphListAGL.java
trunk/foray/foray-ps/src/java/org/foray/ps/encode/GlyphListZapfDingbats.java
trunk/foray/foray-ps/src/java/org/foray/ps/filter/FlateEncodeFilter.java
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java 2010-02-03 04:59:26 UTC (rev 10929)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java 2010-02-03 06:12:24 UTC (rev 10930)
@@ -82,7 +82,7 @@
/* Checkstyle-IllegalType-Off: This class depends on certain
* capabilities of ArrayList that are not part of the List interface. */
/** The list of FOLinkage items for the nodes in the FOTree.
- * Each {@link FONode} in the {@link FOTree} has a unique index, which
+ * Each {@link Fo} in the {@link FoTree} has a unique index, which
* indexes into this linkage map. */
private ArrayList<FOLinkage> linkageMap = new ArrayList<FOLinkage>(
AreaTree.INITIAL_LINKAGE_MAP_SIZE);
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/TableFooterContainer.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/TableFooterContainer.java 2010-02-03 04:59:26 UTC (rev 10929)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/TableFooterContainer.java 2010-02-03 06:12:24 UTC (rev 10930)
@@ -50,8 +50,7 @@
/**
* Private Constructor.
- * Use {@link TableRA#makeTableFooterContainer(org.axsl.fo.fo.TableHeader,
- * GraftingPoint)} to create an instance.
+ * Use {@link TableRA#makeTableFooterContainer(org.axsl.fo.fo.TableFooter, GraftingPoint)} to create an instance.
* @param parentArea The parent area.
*/
private TableFooterContainer(final TableRA parentArea) {
Modified: trunk/foray/foray-common/src/java/org/foray/common/ps/EncodingVector4a.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/ps/EncodingVector4a.java 2010-02-03 04:59:26 UTC (rev 10929)
+++ trunk/foray/foray-common/src/java/org/foray/common/ps/EncodingVector4a.java 2010-02-03 06:12:24 UTC (rev 10930)
@@ -349,7 +349,7 @@
* @serialData
* <ol>
* <li>The name of the encoding (String).</li>
- * <li>The source {@link GlyphList4a} instances used to build this encoding
+ * <li>The source {@link GlyphList} instances used to build this encoding
* (GlyphList[]), in order.</li>
* <li>The code points (char[]).</li>
* <li>The code point indexes (char[]).</li>
Modified: trunk/foray/foray-font/src/java/org/foray/font/ConsumerFont4a.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/ConsumerFont4a.java 2010-02-03 04:59:26 UTC (rev 10929)
+++ trunk/foray/foray-font/src/java/org/foray/font/ConsumerFont4a.java 2010-02-03 06:12:24 UTC (rev 10930)
@@ -56,7 +56,7 @@
/** The parent FontConsumer instance. */
private FontConsumer4a consumer;
- /** The Subset instance. This is null if subsetting is not being used. */;
+ /** The Subset instance. This is null if subsetting is not being used. */
private Subset subset = null;
/** List of all child FontUse instances. */
Modified: trunk/foray/foray-font/src/java/org/foray/font/format/Type1File.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/format/Type1File.java 2010-02-03 04:59:26 UTC (rev 10929)
+++ trunk/foray/foray-font/src/java/org/foray/font/format/Type1File.java 2010-02-03 06:12:24 UTC (rev 10930)
@@ -342,10 +342,8 @@
/**
* Provides the encrypted portion of the font contents.
* @param outputFormat One of the following values:
- * Use {@link PsFilter#PSDATA_UNKNOWN} if the contents should be returned
- * with no filtering.
- * Use {@link PsFilter#PSDATA_ASCII_HEX} if the contents should be
- * converted to ASCII Hex format.
+ * Use null if the contents should be returned with no filtering.
+ * Use {@link PsFilterType#ASCII_HEX} if the contents should be converted to ASCII Hex format.
* @return A byte array with the font contents in the format requested.
* @throws IOException For errors reading font file.
*/
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2010-02-03 04:59:26 UTC (rev 10929)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2010-02-03 06:12:24 UTC (rev 10930)
@@ -431,8 +431,7 @@
private int column;
/** The unique sequential index for this node.
- * @see {@link org.axsl.fo.FONode#getSequentialIndex()} for a discussion
- * of this number. */
+ * See {@link org.axsl.fo.Fo#getSequentialIndex()} for a discussion of this number. */
private int sequentialIndex;
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/Property.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/Property.java 2010-02-03 04:59:26 UTC (rev 10929)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/Property.java 2010-02-03 06:12:24 UTC (rev 10930)
@@ -87,7 +87,7 @@
* @param value The property value as submitted in the input.
* @param fobj The FObj to which this property belongs.
* @return A formatted, ready-to-present message describing the error.
- * @see #unexpectedValueMessage(String, PropertyList)
+ * @see #unexpectedValue(String, FObj, String)
*/
private String unexpectedValueMessage(final String reason,
final String value, final FObj fobj) {
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/axsl/AxslPropertyKeyword.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/axsl/AxslPropertyKeyword.java 2010-02-03 04:59:26 UTC (rev 10929)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/axsl/AxslPropertyKeyword.java 2010-02-03 06:12:24 UTC (rev 10930)
@@ -46,8 +46,7 @@
private AxslValue value;
/**
- * Private constructor. Use {@link #getPropertyKeyword(short)} to obtain an
- * instance of this class.
+ * Private constructor. Use {@link #getPropertyKeyword(AxslValue)} to obtain an instance of this class.
* @param value The keyword enumeration value to encapsulate in this object.
*/
private AxslPropertyKeyword(final AxslValue value) {
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/FoPropertyKeyword.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/FoPropertyKeyword.java 2010-02-03 04:59:26 UTC (rev 10929)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/FoPropertyKeyword.java 2010-02-03 06:12:24 UTC (rev 10930)
@@ -46,8 +46,7 @@
private FoValue value;
/**
- * Private constructor. Use {@link #getPropertyKeyword(short)} to obtain an
- * instance of this class.
+ * Private constructor. Use {@link #getPropertyKeyword(FoValue)} to obtain an instance of this class.
* @param value The keyword enumeration value to encapsulate in this object.
*/
private FoPropertyKeyword(final FoValue value) {
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/LayoutMasterSet.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/LayoutMasterSet.java 2010-02-03 04:59:26 UTC (rev 10929)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/LayoutMasterSet.java 2010-02-03 06:12:24 UTC (rev 10930)
@@ -186,7 +186,7 @@
* Registeres a descendant {@link PageSequenceMaster} instance.
* @param pageSequenceMaster The descendant {@link PageSequenceMaster}
* instance to be registered.
- * @throws FoTreeException If the {@link PageSequencePageMaster} master-name
+ * @throws FoTreeException If the {@link PageSequenceMaster} master-name
* has already been registered either as another page-sequence-master or as
* a simple-page-master.
*/
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/parse/PropertyTokenizer.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/parse/PropertyTokenizer.java 2010-02-03 04:59:26 UTC (rev 10929)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/parse/PropertyTokenizer.java 2010-02-03 06:12:24 UTC (rev 10930)
@@ -281,7 +281,7 @@
/** The index into {@link #expr}. */
private int exprIndex = 0;
- /** The length, in chars, of {@link expr}. */
+ /** The length, in chars, of {@link #expr}. */
private int exprLength;
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtBorderStyle.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtBorderStyle.java 2010-02-03 04:59:26 UTC (rev 10929)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtBorderStyle.java 2010-02-03 06:12:24 UTC (rev 10930)
@@ -63,8 +63,7 @@
private BorderStyle value;
/**
- * Private constructor. Use {@link #getPropertyKeyword(short)} to obtain an
- * instance of this class.
+ * Private constructor. Use {@link #getInstance(FoValue)} to obtain an instance of this class.
* @param value The keyword enumeration value to encapsulate in this object.
*/
private DtBorderStyle(final BorderStyle value) {
Modified: trunk/foray/foray-graphic/src/java/org/foray/graphic/BMPGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/BMPGraphic.java 2010-02-03 04:59:26 UTC (rev 10929)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/BMPGraphic.java 2010-02-03 06:12:24 UTC (rev 10930)
@@ -305,8 +305,6 @@
/**
* Reads the image data into a byte array.
- * @param filepos
- * @param imagestart
* @return The temporary image array containing the raw image content.
* @throws GraphicException For error reading the image file.
*/
Modified: trunk/foray/foray-graphic/src/java/org/foray/graphic/GraphicServer4a.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/GraphicServer4a.java 2010-02-03 04:59:26 UTC (rev 10929)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/GraphicServer4a.java 2010-02-03 06:12:24 UTC (rev 10930)
@@ -120,7 +120,7 @@
= new HashMap<String, Graphic4a>();
/**
- * Map of registered {@link FontOutputFactory} instances.
+ * Map of registered {@link GraphicOutputFactory} instances.
*/
private Map<String, GraphicOutputFactory> graphicOutputFactories
= new HashMap<String, GraphicOutputFactory>();
Modified: trunk/foray/foray-graphic/src/java/org/foray/graphic/batik/PDFGraphicsConfiguration.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/batik/PDFGraphicsConfiguration.java 2010-02-03 04:59:26 UTC (rev 10929)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/batik/PDFGraphicsConfiguration.java 2010-02-03 06:12:24 UTC (rev 10930)
@@ -38,7 +38,7 @@
import java.awt.image.VolatileImage;
/**
- * PDF-specific implementation of {@link GraphicConfiguration}, which describes
+ * PDF-specific implementation of {@link GraphicsConfiguration}, which describes
* the characteristics of a graphics destination such as a printer or monitor,
* or, in this case, a PDF document.
*/
Modified: trunk/foray/foray-graphic/src/java/org/foray/graphic/math/MathMLDocument4a.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/math/MathMLDocument4a.java 2010-02-03 04:59:26 UTC (rev 10929)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/math/MathMLDocument4a.java 2010-02-03 06:12:24 UTC (rev 10930)
@@ -53,20 +53,20 @@
private static DocumentType mathmlDocumentType;
/** The "referrer" as defined in the MathML Recommendation.
- * @see {@link #getReferrer()}. */
+ * @see #getReferrer() */
private String referrer;
/** The "domain" as defined in the MathML Recommendation.
- * @see {@link #getDomain()}. */
+ * @see #getDomain() */
private String domain;
/** The "uri" as defined in the MathML Recommendation.
- * @see {@link #getReferrer()}. */
+ * @see #getReferrer() */
private String uri;
/**
* Private Constructor.
- * Use {@link #makeDocument()} to create an instance of this class.
+ * Use {@link #makeDocument(String, String, String)} to create an instance of this class.
* @param documentType The MathML document type.
* @param referrer The "referrer" as defined in the MathML Recommendation.
* See {@link #getReferrer()}.
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFXReference.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFXReference.java 2010-02-03 04:59:26 UTC (rev 10929)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFXReference.java 2010-02-03 06:12:24 UTC (rev 10930)
@@ -48,11 +48,7 @@
private Graphic graphic;
/** The file specification that points to the embedded file stream that
- * contains the actual graphic file content.
- * Note that this is a different stream than the one returned by
- * {@link PDFXForm#getPdfStream()}, which, for this class, contains only
- * a proxy for the embedded file, that is, a substitute for use when the
- * embedded file cannot be accessed. */
+ * contains the actual graphic file content. */
private PDFFileSpec fileSpec;
/**
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/OverrideGraftingContext.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/OverrideGraftingContext.java 2010-02-03 04:59:26 UTC (rev 10929)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/OverrideGraftingContext.java 2010-02-03 06:12:24 UTC (rev 10930)
@@ -43,7 +43,7 @@
private FoContext wrappedContext;
/** The grafting information which overrides any grafting information that
- * may be in the {@link wrappedContext}. */
+ * may be in the {@link #wrappedContext}. */
private GraftingPoint overrideGrafting;
/**
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2010-02-03 04:59:26 UTC (rev 10929)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2010-02-03 06:12:24 UTC (rev 10930)
@@ -131,7 +131,7 @@
/* Checkstyle-IllegalType-Off: This class depends on certain
* capabilities of ArrayList that are not part of the List interface. */
/** The list of FONodePL items for the nodes in the FOTree.
- * Each {@link FoNode} in the {@link FOTree} has a unique index, which
+ * Each {@link Fo} in the {@link org.axsl.fo.FoTree} has a unique index, which
* indexes into this proxy map. */
private ArrayList<FONodePL> proxyMap = new ArrayList<FONodePL>(
PioneerLS.INITIAL_PROXY_MAP_SIZE);
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/encode/CharSetExtendedRoman.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/encode/CharSetExtendedRoman.java 2010-02-03 04:59:26 UTC (rev 10929)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/encode/CharSetExtendedRoman.java 2010-02-03 06:12:24 UTC (rev 10930)
@@ -398,7 +398,6 @@
* Method ensuring that the singleton nature of this class is not broken by
* deserialization.
* @return The singleton instance, ignoring any object stream input.
- * @throws ObjectStreamException
*/
private Object readResolve() {
return CharSetExtendedRoman.getInstance();
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/encode/CharSetWindowsANSI.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/encode/CharSetWindowsANSI.java 2010-02-03 04:59:26 UTC (rev 10929)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/encode/CharSetWindowsANSI.java 2010-02-03 06:12:24 UTC (rev 10930)
@@ -72,7 +72,6 @@
* Method ensuring that the singleton nature of this class is not broken by
* deserialization.
* @return The singleton instance, ignoring any object stream input.
- * @throws ObjectStreamException
*/
private Object readResolve() {
return CharSetWindowsANSI.getInstance();
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingCE.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingCE.java 2010-02-03 04:59:26 UTC (rev 10929)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingCE.java 2010-02-03 06:12:24 UTC (rev 10930)
@@ -971,7 +971,6 @@
* Method ensuring that the singleton nature of this class is not broken by
* deserialization.
* @return The singleton instance, ignoring any object stream input.
- * @throws ObjectStreamException
*/
private Object readResolve() {
return EncodingCE.getInstance();
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingExpert.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingExpert.java 2010-02-03 04:59:26 UTC (rev 10929)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingExpert.java 2010-02-03 06:12:24 UTC (rev 10930)
@@ -770,7 +770,6 @@
* Method ensuring that the singleton nature of this class is not broken by
* deserialization.
* @return The singleton instance, ignoring any object stream input.
- * @throws ObjectStreamException
*/
private Object readResolve() {
return EncodingExpert.getInstance();
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingExpertSubset.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingExpertSubset.java 2010-02-03 04:59:26 UTC (rev 10929)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingExpertSubset.java 2010-02-03 06:12:24 UTC (rev 10930)
@@ -455,7 +455,6 @@
* Method ensuring that the singleton nature of this class is not broken by
* deserialization.
* @return The singleton instance, ignoring any object stream input.
- * @throws ObjectStreamException
*/
private Object readResolve() {
return EncodingExpertSubset.getInstance();
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingFOrayLatinExtra.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingFOrayLatinExtra.java 2010-02-03 04:59:26 UTC (rev 10929)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingFOrayLatinExtra.java 2010-02-03 06:12:24 UTC (rev 10930)
@@ -305,7 +305,6 @@
* Method ensuring that the singleton nature of this class is not broken by
* deserialization.
* @return The singleton instance, ignoring any object stream input.
- * @throws ObjectStreamException
*/
private Object readResolve() {
return EncodingFOrayLatinExtra.getInstance();
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingISOLatin1.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingISOLatin1.java 2010-02-03 04:59:26 UTC (rev 10929)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingISOLatin1.java 2010-02-03 06:12:24 UTC (rev 10930)
@@ -917,7 +917,6 @@
* Method ensuring that the singleton nature of this class is not broken by
* deserialization.
* @return The singleton instance, ignoring any object stream input.
- * @throws ObjectStreamException
*/
private Object readResolve() {
return EncodingISOLatin1.getInstance();
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingMacExpert.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingMacExpert.java 2010-02-03 04:59:26 UTC (rev 10929)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingMacExpert.java 2010-02-03 06:12:24 UTC (rev 10930)
@@ -777,7 +777,6 @@
* Method ensuring that the singleton nature of this class is not broken by
* deserialization.
* @return The singleton instance, ignoring any object stream input.
- * @throws ObjectStreamException
*/
private Object readResolve() {
return EncodingMacExpert.getInstance();
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingMacRoman.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingMacRoman.java 2010-02-03 04:59:26 UTC (rev 10929)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingMacRoman.java 2010-02-03 06:12:24 UTC (rev 10930)
@@ -945,7 +945,6 @@
* Method ensuring that the singleton nature of this class is not broken by
* deserialization.
* @return The singleton instance, ignoring any object stream input.
- * @throws ObjectStreamException
*/
private Object readResolve() {
return EncodingMacRoman.getInstance();
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingMacStandard.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingMacStandard.java 2010-02-03 04:59:26 UTC (rev 10929)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingMacStandard.java 2010-02-03 06:12:24 UTC (rev 10930)
@@ -32,7 +32,6 @@
import org.axsl.ps.EncodingVector;
-import java.io.ObjectStreamException;
import java.io.Serializable;
@@ -1149,7 +1148,6 @@
* Method ensuring that the singleton nature of this class is not broken by
* deserialization.
* @return The singleton instance, ignoring any object stream input.
- * @throws ObjectStreamException
*/
private Object readResolve() {
return EncodingMacStandard.getInstance();
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingPDFDoc.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingPDFDoc.java 2010-02-03 04:59:26 UTC (rev 10929)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingPDFDoc.java 2010-02-03 06:12:24 UTC (rev 10930)
@@ -1033,7 +1033,6 @@
* Method ensuring that the singleton nature of this class is not broken by
* deserialization.
* @return The singleton instance, ignoring any object stream input.
- * @throws ObjectStreamException
*/
private Object readResolve() {
return EncodingPDFDoc.getInstance();
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingStandard.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingStandard.java 2010-02-03 04:59:26 UTC (rev 10929)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingStandard.java 2010-02-03 06:12:24 UTC (rev 10930)
@@ -716,7 +716,6 @@
* Method ensuring that the singleton nature of this class is not broken by
* deserialization.
* @return The singleton instance, ignoring any object stream input.
- * @throws ObjectStreamException
*/
private Object readResolve() {
return EncodingStandard.getInstance();
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingSymbol.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingSymbol.java 2010-02-03 04:59:26 UTC (rev 10929)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingSymbol.java 2010-02-03 06:12:24 UTC (rev 10930)
@@ -874,7 +874,6 @@
* Method ensuring that the singleton nature of this class is not broken by
* deserialization.
* @return The singleton instance, ignoring any object stream input.
- * @throws ObjectStreamException
*/
private Object readResolve() {
return EncodingSymbol.getInstance();
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingWinAnsi.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingWinAnsi.java 2010-02-03 04:59:26 UTC (rev 10929)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingWinAnsi.java 2010-02-03 06:12:24 UTC (rev 10930)
@@ -993,7 +993,6 @@
* Method ensuring that the singleton nature of this class is not broken by
* deserialization.
* @return The singleton instance, ignoring any object stream input.
- * @throws ObjectStreamException
*/
private Object readResolve() {
return EncodingWinAnsi.getInstance();
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingZapfDingbats.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingZapfDingbats.java 2010-02-03 04:59:26 UTC (rev 10929)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingZapfDingbats.java 2010-02-03 06:12:24 UTC (rev 10930)
@@ -33,7 +33,6 @@
import org.axsl.ps.EncodingVector;
import org.axsl.ps.GlyphList;
-import java.io.ObjectStreamException;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
@@ -938,7 +937,6 @@
* Method ensuring that the singleton nature of this class is not broken by
* deserialization.
* @return The singleton instance, ignoring any object stream input.
- * @throws ObjectStreamException
*/
private Object readResolve() {
return EncodingZapfDingbats.getInstance();
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/encode/GlyphListAGL.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/encode/GlyphListAGL.java 2010-02-03 04:59:26 UTC (rev 10929)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/encode/GlyphListAGL.java 2010-02-03 06:12:24 UTC (rev 10930)
@@ -4391,7 +4391,6 @@
* Method ensuring that the singleton nature of this class is not broken by
* deserialization.
* @return The singleton instance, igno...
[truncated message content] |
|
From: <vic...@us...> - 2010-02-03 06:33:32
|
Revision: 10931
http://foray.svn.sourceforge.net/foray/?rev=10931&view=rev
Author: victormote
Date: 2010-02-03 06:32:59 +0000 (Wed, 03 Feb 2010)
Log Message:
-----------
Clean up some javadoc problems.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/Area.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/PdFontStretch.java
trunk/foray/foray-hyphen/src/java/org/foray/hyphen/HyphenationTree.java
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/Area.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2010-02-03 06:12:24 UTC (rev 10930)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2010-02-03 06:32:59 UTC (rev 10931)
@@ -1040,7 +1040,7 @@
public abstract int traitPaddingAfter();
/**
- * Returns the {@link Font.WritingMode} associated with this Area.
+ * Returns the writing mode associated with this Area.
* @return The writing mode (vertical or horizontal) that is associated with this Area.
*/
public Font.WritingMode getFontWritingMode() {
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/PdFontStretch.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/PdFontStretch.java 2010-02-03 06:12:24 UTC (rev 10930)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/PdFontStretch.java 2010-02-03 06:32:59 UTC (rev 10931)
@@ -160,7 +160,7 @@
/**
* Returns the initial (default) value for this property when there is no
* value to inherit.
- * @return {@link Font.Stretch#NORMAL}, the initial value.
+ * @return The initial value, {@link org.axsl.font.Font.Stretch#NORMAL NORMAL}.
*/
public static Font.Stretch getInitialValue() {
return Font.Stretch.NORMAL;
Modified: trunk/foray/foray-hyphen/src/java/org/foray/hyphen/HyphenationTree.java
===================================================================
--- trunk/foray/foray-hyphen/src/java/org/foray/hyphen/HyphenationTree.java 2010-02-03 06:12:24 UTC (rev 10930)
+++ trunk/foray/foray-hyphen/src/java/org/foray/hyphen/HyphenationTree.java 2010-02-03 06:32:59 UTC (rev 10931)
@@ -112,12 +112,12 @@
/** The minimum number of characters that should be left on a line before
* a hyphenation break.
- * @see {@link PatternConsumer#setMinBefore(byte)}. */
+ * @see PatternConsumer#setMinBefore(byte) */
private byte minBefore = 0;
/** The minimum number of characters that should be at the beginning of a
* line after a hyphenation break.
- * @see {@link PatternConsumer#setMinAfter(byte)}. */
+ * @see PatternConsumer#setMinAfter(byte) */
private byte minAfter = 0;
/** A map whose key is String patterns, and whose value is an index into
@@ -126,7 +126,7 @@
/**
* <p>The vector of interletter values for the Liang patterns.
- * The keys to this vector are in {@link patternKeys}.
+ * The keys to this vector are in {@link #patternKeys}.
* The pattern values themselves are stored as bytes, and are expected to be
* in the range of 0x01 through 0x05.</p>
*/
@@ -159,7 +159,6 @@
* interletter values.
* @return The index into {@link #patternValues} where the packed values
* are stored.
- * @see #unpackValues(int)
*/
private int packValues(final String values) {
final int start = this.patternValues.length();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2010-02-08 22:53:50
|
Revision: 10964
http://foray.svn.sourceforge.net/foray/?rev=10964&view=rev
Author: victormote
Date: 2010-02-08 22:53:42 +0000 (Mon, 08 Feb 2010)
Log Message:
-----------
Rename class PatternGenerator to PatGen to more closely show that it is tied to the patgen program from TeX.
Modified Paths:
--------------
trunk/foray/scripts/checkstyle-suppressions.xml
Added Paths:
-----------
trunk/foray/foray-hyphen/src/java/org/foray/hyphen/PatGen.java
Removed Paths:
-------------
trunk/foray/foray-hyphen/src/java/org/foray/hyphen/PatternGenerator.java
Copied: trunk/foray/foray-hyphen/src/java/org/foray/hyphen/PatGen.java (from rev 10963, trunk/foray/foray-hyphen/src/java/org/foray/hyphen/PatternGenerator.java)
===================================================================
--- trunk/foray/foray-hyphen/src/java/org/foray/hyphen/PatGen.java (rev 0)
+++ trunk/foray/foray-hyphen/src/java/org/foray/hyphen/PatGen.java 2010-02-08 22:53:42 UTC (rev 10964)
@@ -0,0 +1,3104 @@
+/*
+ * Copyright 2007 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+/*
+ * Known contributors:
+ * 1. The original version 1 of PATGEN was written by Frank M. Liang
+ * (Liang, Franklin Mark) in 1982.
+ * 2. A major revision (version 2) by Peter Breitenlohner in 1991
+ * (Breitenlohner, Peter) is mostly related to the new features of
+ * "8-bit TeX" (version 3 of TeX 82).
+ * The differences between versions 1 and 2 fall into several
+ * categories (all of Liang's algorithms have been left essentially
+ * unchanged):
+ * (1) enhancements related to 8-bit TeX, e.g., the
+ * introduction of 8-bit ASCII_code values and of \.{\\lefthyphenmin} and
+ * \.{\\righthyphenmin};
+ * (2) a modification of the input and output
+ * procedures which should make language specific modifications of this
+ * program unnecessary (information about the external representation of
+ * all `letters' used by a particular language is obtained from the
+ * translate file);
+ * (3) removal of ANSI standard \PASCAL\ and range check
+ * violations;
+ * (4) removal of uninitialized variables;
+ * (5) minor modifications in order to simplify system-dependent
+ * modifications.
+ * 3. The port to Java and subsequent enhancements were made by FOray.
+ */
+
+package org.foray.hyphen;
+
+import org.foray.common.NumberUtil;
+import org.foray.common.StringUtil;
+import org.foray.common.WKConstants;
+
+import org.axsl.hyphen.HyphenationException;
+
+import org.apache.commons.cli.CommandLine;
+import org.apache.commons.cli.CommandLineParser;
+import org.apache.commons.cli.HelpFormatter;
+import org.apache.commons.cli.Option;
+import org.apache.commons.cli.Options;
+import org.apache.commons.cli.ParseException;
+import org.apache.commons.cli.PosixParser;
+
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.PrintStream;
+import java.util.Arrays;
+
+/**
+ * <p>Hyphenation pattern generator based on Liang's patgen.web.
+ * Specifically, it is based on version 2.3 (October 24, 1996) of patgen.web, which was obtained from the CTAN archives.
+ * The original documentation has been edited where needed.
+ * TeX-specific material has been removed.
+ * Most author and versioning information has been removed or placed in the credits secion of the source code.
+ * Otherwise, the intent is to simply be a java version of the original program.</p>
+ *
+ * <p>The <a href="http://manpages.ubuntu.com/manpages/jaunty/man1/patgen.1.html">Ubuntu man page for the TeX patgen</a>
+ * is quite useful in understanding the original API.</p>
+ *
+ * <p>What follows is the header documentation from the original program.</p>
+ *
+ * <h5>Introduction</h5>
+ *
+ * <p>This program takes a list of hyphenated words and generates a set of
+ * patterns that can be used by the TeX 82 hyphenation algorithm.</p>
+ *
+ * <p>The patterns consist of strings of letters and digits, where a digit
+ * indicates a `hyphenation value' for some intercharacter position. For
+ * example, the pattern \.{3t2ion} specifies that if the string \.{tion}
+ * occurs in a word, we should assign a hyphenation value of 3 to the
+ * position immediately before the \.{t}, and a value of 2 to the position
+ * between the \.{t} and the \.{i}.</p>
+ *
+ * <p>To hyphenate a word, we find all patterns that match within the word and
+ * determine the hyphenation values for each intercharacter position. If
+ * more than one pattern applies to a given position, we take the maximum of
+ * the values specified (i.e., the higher value takes priority). If the
+ * resulting hyphenation value is odd, this position is a feasible
+ * breakpoint; if the value is even or if no value has been specified, we are
+ * not allowed to break at this position.</p>
+ *
+ * <p>In order to find quickly the patterns that match in a given word and to
+ * compute the associated hyphenation values, the patterns generated by this
+ * program are compiled by \.{INITEX} into a compact version of a finite
+ * state machine. For further details, see the \TeX 82 source.</p>
+ *
+ * @see <a href="http://www.tug.org/docs/liang/">TUG page re Liang thesis "Word Hy-phen-a-tion by Com-put-er"</a>
+ */
+public class PatGen {
+ /* TODO: Turn off checkstyle suppressions for this class. */
+ /* TODO: Copy the comments from patgen.web into this class. */
+ /* TODO: Find a suitable word list to use as a test file. It needs to also have the generated
+ * output so that we can compare our output to it. */
+ /* TODO: Write a JUnit functional test to compare this class's output with the test output. */
+ /* TODO: Remove patgen.c and patgen.web files from this directory after
+ * conversion has been completed and tested. */
+ /* TODO: This class probably has overlap with the TernaryTree class in this
+ * package. Duplicate code should be removed from this class and the
+ * TernaryTree class should be used instead. */
+
+
+ /*
+ * The following are comments from patgen.web, outlining the general procedure used:
+ *
+ * The patterns are generated in a series of sequential passes through the
+ * dictionary. In each pass, we collect count statistics for a particular
+ * type of pattern, taking into account the effect of patterns chosen in
+ * previous passes. At the end of a pass, the counts are examined and new
+ * patterns are selected.
+ *
+ * Patterns are chosen one level at a time, in order of increasing
+ * hyphenation value. In the sample run shown below, the parameters
+ * |hyph_start| and |hyph_finish| specify the first and last levels,
+ * respectively, to be generated.
+ *
+ * Patterns at each level are chosen in order of increasing pattern length
+ * (usually starting with length~2). This is controlled by the parameters
+ * |pat_start| and |pat_finish| specified at the beginning of each level.
+ *
+ * Furthermore patterns of the same length applying to different
+ * intercharacter positions are chosen in separate passes through the
+ * dictionary. Since patterns of length $n$ may apply to $n+1$ different
+ * positions, choosing a set of patterns of lengths $2$ through $n$ for a
+ * given level requires $(n+1)(n+2)/2-3$ passes through the word list.
+ *
+ * At each level, the selection of patterns is controlled by the three
+ * parameters |good_wt|, |bad_wt|, and |thresh|. A hyphenating pattern will
+ * be selected if |good*good_wt-bad*bad_wt>=thresh|, where |good| and
+ * |bad| are the number of times the pattern could and could not be
+ * hyphenated, respectively, at a particular point. For inhibiting patterns,
+ * |good| is the number of errors inhibited, and |bad| is the number of
+ * previously found hyphens inhibited.
+ *
+ * SAMPLE RUN
+ * ==========
+ * The proper choice of the parameters to achieve a desired degree of
+ * hyphenation is discussed in Chapter~4. Below we show part of a sample run
+ * of PATGEN, with the user's inputs underlined.
+ *
+ * <FOray>Note: We have not tried to duplicate the TeX-formatted code here,
+ * so the user's input is NOT underlined. However, the <cr> carriage-return
+ * indicates user input.</FOray>
+ *
+ * $ex patgen<cr>
+ * DICTIONARY : murray.hyf<cr>
+ * PATTERNS : <cr>
+ * TRANSLATE : <cr>
+ * PATOUT : murray.pat<cr>
+ *
+ * This is PATGEN, Version 2.0
+ * left_hyphen_min = 2, right_hyphen_min = 3, 26 letters
+ * 0 patterns read in
+ * pattern trie has 256 nodes, trie_max = 256, 0 outputs
+ * hyph_start, hyph_finish: 1 1<cr>
+ * pat_start, pat_finish: 2 3<cr>
+ * good weight, bad weight, threshold: 1 3 3<cr>
+ * processing dictionary with pat_len = 2, pat_dot = 1
+ *
+ * 0 good, 0 bad, 3265 missed
+ * 0.00 %, 0.00 %, 100.00 %
+ * 338 patterns, 466 nodes in count trie, triec_max = 983
+ * 46 good and 152 bad patterns added (more to come)
+ * finding 715 good and 62 bad hyphens, efficiency = 10.72
+ * pattern trie has 326 nodes, trie_max = 509, 2 outputs
+ * processing dictionary with pat_len = 2, pat_dot = 0
+ *
+ * ...
+ *
+ * 1592 nodes and 39 outputs deleted
+ * total of 220 patterns at hyph_level 1
+ * hyphenate word list? y<cr>
+ * writing pattmp.1
+ *
+ * 2529 good, 243 bad, 736 missed
+ * 77.46 %, 7.44 %, 22.54 %
+ *
+ * ************** End of Sample Run ***************
+ *
+ *
+ *
+ * Note that before beginning a pattern selection run, a file of existing
+ * patterns may be read in. In order for pattern selection to work properly,
+ * this file should only contain patterns with hyphenation values less than
+ * |hyph_start|. Each word in the dictionary is hyphenated according to the
+ * existing set of patterns (including those chosen on previous passes of the
+ * current run) before pattern statistics are collected.
+ *
+ * Also, a hyphenated word list may be written out at the end of a run. This
+ * list can be read back in as the `dictionary' to continue pattern selection
+ * from this point. In addition to ordinary hyphens (|'-'|) the new list
+ * will contain two additional kinds of ``hyphens'' between letters, namely
+ * hyphens that have been found by previously generated patterns, as well
+ * as erroneous hyphens that have been inserted by those patterns. These
+ * are represented by the symbols |'*'| and |'.'|, respectively. The three
+ * characters |'-'|, |'*'|, and |'.'| are, in fact, just the default values
+ * used to represent the three kinds of hyphens, the |translate| file may
+ * specify different characters to be used instead of them.
+ *
+ * In addition, a word list can include hyphen weights, both for entire words
+ * and for individual hyphen positions. (The syntax for this is explained in
+ * the dictionary processing routines.) Thus common words can be weighted
+ * more heavily, or, more generally, words can be weighted according to their
+ * frequency of occurrence, if such information is available. The use of
+ * hyphen weights combined with an appropriate setting of the pattern
+ * selection threshold can be used to guarantee hyphenation of certain words
+ * or certain hyphen positions within a word.
+ *
+ * Below we show the first few lines of a typical word list,
+ * before and after generating a level of patterns.
+ *
+ * abil-i-ty& abil*i*ty
+ * ab-sence& ab*sence
+ * ab-stract& ab*stract
+ * ac-a-dem-ic& ac-a-d.em-ic
+ * ac-cept& ac*cept
+ * ac-cept-able& ac*cept-able
+ * ac-cept-ed& ac*cept*ed
+ *
+ *
+ *
+ * THE CHARACTER SET
+ * =================
+ * Since different \PASCAL\ systems may use different character sets, we use
+ * the name |text_char| to stand for the data type of characters appearing in
+ * external text files. We also assume that |text_char| consists of the
+ * elements |chr(first_text_char)| through |chr(last_text_char)|, inclusive.
+ * The definitions below should be adjusted if necessary.
+ *
+ * <FOray>We don't have the same limitations noted for Pascal.
+ * We use char and int for these items. However, we have left the concept of
+ * converting from one character set to another intact.</FOray>
+ *
+ * Internally, characters will be represented using the type |ASCII_code|.
+ * Note, however, that only some of the standard ASCII characters are
+ * assigned a fixed |ASCII_code|; all other characters are assigned an
+ * |ASCII_code| dynamically when they are first read from the |translate|
+ * file specifying the external representation of the `letters' used by a
+ * particular language. For the sake of generality the standard version of
+ * this program allows for 256 different |ASCII_code| values, but 128 of
+ * them would probably suffice for all practical purposes.
+ *
+ *
+ *
+ * HYPHENABLE WORDS
+ * ================
+ * The TeX 82 hyphenation algorithm operates on `hyphenable words'
+ * converted temporarily to lower case, i.e., they may consist of up to
+ * 255 different "letters" corresponding to lowercase-codes |1..255|. These
+ * lowercase-codes could, in principle, be language dependent but this might
+ * lead to undesirable results when hyphenating multilingual paragraphs.
+ * No more than 245 different letters can occur in hyphenation patterns
+ * since the characters |'0'..'9'| and |'.'| play a special role when
+ * reading patterns. For the purpose of this program each letter is
+ * represented internally by a unique |internal_code>=2| (|internal_code=1|
+ * is the |edge_of_word| indicator); |internal_code| values |2..127| will
+ * probably suffice for all practical purposes, but we allow the range
+ * |2..last_ASCII_code| for the sake of generality. Syntactically
+ * |internal_code| and |ASCII_code| are the same, we will use one or the
+ * other name according to the semantic context.
+ *
+ * Note that an |internal_code| used by this program is in general quite
+ * different from the |ASCII_code| (or rather lowercase-code) used by TeX
+ * 82. This program allows the input of characters (from the |dictionary|
+ * and |patterns| file) corresponding to an |internal_code| in either lower
+ * or upper case form; the output (to the |patout| and |pattmp| file) will
+ * always be in lower case form.
+ *
+ * Unfortunately there does not (yet?) exist a standardized and widely
+ * accepted 8-bit character set (or a unique one-to-one translation between
+ * such sets). On the other hand macro expansion takes place in TeX 82
+ * when reading hyphenable words and when reading patterns. Thus the lower
+ * and upper case versions of all "letters" used by a particular language
+ * can (and for the sake of portability should) be represented entirely in
+ * terms of the standard ASCII character set; either directly as characters
+ * or via macros (or active characters) with or without arguments. The
+ * macro definitions for such a representation will in general be language
+ * dependent.
+ *
+ * For the purpose of this program the external representation of the lower
+ * and upper case version of a letter (i.e., |internal_code|) consists of a
+ * unique sequence of characters (or ASCII_codes), the only restriction
+ * being that no such sequence must be a subsequence of an other one.
+ * Moreover such sequences must not start with |' '|, |'.'|, |'0'..'9'| or
+ * with one of the three characters (|'-'|, |'*'|, and |'.'|) representing
+ * hyphens in the |dictionary| file; a sequence may, however, end with a
+ * mandatory |' '| as, e.g., the sequence |'\ss '|.
+ *
+ * The language dependent values of lefthyphenmin and
+ * righthyphenmin as well as the external representation of the lower
+ * and upper case letters and their collating sequence are specified in the
+ * |translate| file, thus making any language dependent modifications of
+ * this program unnecessary. If the |translate| file is empty (or does not
+ * exist) the values lefthyphenmin=2 and righthyphenmin=3 and
+ * |internal_code| values |2..27| with the one character external
+ * representations |'a'..'z'| and |'A'..'Z'| will be used as defaults.
+ *
+ * Incidentally this program can be used to convert a |dictionary| and
+ * |patterns| file from one ("upper case") to another ("lower case")
+ * external representation of letters.
+ *
+ * When reading the |dictionary| (and |patterns|) file sequences of
+ * characters must be recognized and converted to their corresponding
+ * |internal_code|. This conversion is part of PATGEN's inner loop and
+ * <inner loop>
+ * must therefore be done as efficient as possible. Thus we will
+ * mostly bypass the conversion from character to |ASCII_code| and convert
+ * directly to the corresponding |internal_code| using the |xclass|
+ * and |xint| arrays. Six types of characters are distinguished by their
+ * |xclass|:
+ *
+ * 1. |space_class| character |' '| terminates a pattern or word.
+ * 2. |digit_class| characters |'0'..'9'| are hyphen values for a
+ * pattern or hyphen weights for a word; their |xint| is the corresponding
+ * numeric value |0..9|.
+ * 3. |hyf_class| characters (|'.'|, |'-'|, and |'*'|) are `dots'
+ * and indicate hyphens in a word; their |xint| is the corresponding
+ * numeric value |err_hyf..found_hyf|.
+ * 4. |letter_class| characters represent a letter; their |xint|
+ * is the corresponding |internal_code|.
+ * 5. |escape_class| characters indicate the start of a
+ * multi-character sequence representing a letter.
+ * 6. |invalid_class| characters should not occur except as part
+ * of multi-character sequences.
+ *
+ *
+ *
+ * We assume that words use only the letters |cmin+1| through |cmax|.
+ * This allows us to save some time on trie operations that involve
+ * searching for packed transitions belonging to a particular state.
+ *
+ *
+ *
+ * DATA STRUCTURES
+ * ===============
+ * The main data structure used in this program is a dynamic packed trie.
+ * In fact we use two of them, one for the set of patterns selected so far,
+ * and one for the patterns being considered in the current pass.
+ *
+ * For a pattern p_1...p_k$, the information associated with that
+ * pattern is accessed by setting |@t$t_1$@>:=trie_root+@t$p_1$@>| and
+ * then, for |1<i<=k|, setting |@t$t_i$@>:=trie_link(@t$t_{i-1}$@>)+
+ * @t$p_i$@>|; the pattern information is then stored in a location addressed
+ * by |@t$t_k$@>|. Since all trie nodes are packed into a single array, in
+ * order to distinguish nodes belonging to different trie families, a special
+ * field is provided such that |trie_char@t$(t_i)=si(p_i)$@>| for all |i|.
+ *
+ * In addition the trie must support dynamic insertions and deletions. This
+ * is done by maintaining a doubly linked list of unoccupied cells and
+ * repacking trie families as necessary when insertions are made.
+ *
+ * Each trie node consists of three fields: the character |trie_char|, and
+ * the two link fields |trie_link| and |trie_back|. In addition there is a
+ * separate boolean array |trie_base_used|. When a node is unoccupied,
+ * |trie_char=min_packed| and the link fields point to the next and previous
+ * unoccupied nodes, respectively, in the doubly linked list. When a node is
+ * occupied, |trie_link| points to the next trie family, and |trie_back|
+ * (renamed |trie_outp|) contains the output associated with this transition.
+ * The |trie_base_used| bit indicates that some family has been packed at
+ * this base location, and is used to prevent two families from being packed
+ * at the same location.
+ *
+ * The sizes of the pattern tries may have to be adjusted depending
+ * on the particular application (i.e., the parameter settings and the
+ * size of the dictionary). The sizes below were sufficient to generate
+ * the original set of english \TeX 82 hyphenation patterns (file
+ * hyphen.tex).
+ *
+ *
+ *
+ * Trie is actually stored with its components in separate packed arrays,
+ * in order to save space and time (although this depends on the computer's
+ * word size and the size of the trie pointers).
+ *
+ *
+ *
+ * THE PATTERN TRIE
+ * ================
+ * The pattern trie holds the set of patterns chosen prior to the current
+ * pass, including bad or "hopeless" patterns at the current level that
+ * occur too few times in the dictionary to be of use. Each transition of
+ * the trie includes an output field pointing to the hyphenation information
+ * associated with this transition.
+ *
+ *
+ *
+ * Initially, the dynamic packed trie has just one state, namely the root,
+ * with all transitions present (but with null links). This is convenient
+ * because the root will never need to be repacked and also we won't have to
+ * check that the base is nonnegative when packing other states.
+ * Moreover in many cases we need not check for a vanishing link field:
+ * if |trie_link(t)=0| then a subsequent test for
+ * |trie_char(trie_link(t)+c)=si(c)| will always fail due to |trie_root=1|.
+ *
+ *
+ *
+ *
+ * THE PATTERN COUNT TRIE
+ * ======================
+ * The pattern count trie is used to store the set of patterns considered in
+ * the current pass, along with the counts of good and bad instances. The
+ * fields of this trie are the same as the pattern trie, except that there is
+ * no output field, and leaf nodes are also used to store counts
+ * (|triec_good| and |triec_bad|). Except where noted, the following
+ * routines are analogous to the pattern trie routines.
+ */
+
+ /* Start of Constants from TeX code. */
+
+ /** Default value for {@link #maxVal}. */
+ private static final byte DEFAULT_MAX_VAL = 10;
+
+ /** Ordinal number of the smallest element of text_char. */
+ private static final byte FIRST_TEXT_CHAR = 0;
+
+ /** Ordinal number of the largest element of text_char. */
+ private static final short LAST_TEXT_CHAR = 255;
+
+ /** The highest allowed ASCII_code value. */
+ private static final short LAST_ASCII_CODE = 255;
+
+ /** Number of different |ASCII_code| values. */
+ private static final short NUM_ASCII_CODES = PatGen.LAST_ASCII_CODE + 1;
+
+ /** Character class constant for the character ' '. */
+ private static final byte SPACE_CLASS = 0;
+
+ /** Character class constant for the characters '0' thru '9'. */
+ private static final byte DIGIT_CLASS = 1;
+
+ /** Character class constant for the "hyphen" characters, '.', '-', and
+ * '*'. */
+ private static final byte HYF_CLASS = 2;
+
+ /** Character class constant for the characters that are letters, that is,
+ * 'a' thru 'z' and 'A' thru 'Z'. */
+ private static final byte LETTER_CLASS = 3;
+
+ /** Character class constant for characters that start a multi-character
+ * sequence representing a letter. */
+ private static final byte ESCAPE_CLASS = 4;
+
+ /** Character class constant for characters that normally should not
+ * occur. */
+ private static final byte INVALID_CLASS = 5;
+
+ /** Constant indicating "no hyphen". */
+ private static final byte NO_HYF = 0;
+
+ /** Constant indicating "erroneous hyphen". */
+ private static final byte ERR_HYF = 1;
+
+ /** Constant indicating "hyphen". */
+ private static final byte IS_HYF = 2;
+
+ /** Constant indicating "found hyphen". */
+ private static final byte FOUND_HYF = 3;
+
+ /** Change this constant to -128 when necessary, and don't forget to change
+ * the definitions of {@link #si(char)} and {@link #so(char)} below
+ * accordingly.
+ * TODO: Remove this constant. It existed for Pascal limitations which do not apply to our java implementation. */
+ private static final byte MIN_PACKED = 0;
+
+ /** A magic number for the size of the array holding the filename. */
+ private static final int FILENAME_SIZE = 9;
+
+ /** A magic number of unknown significance. */
+ private static final int HYPH_SIZE = 4;
+
+ /** |internal_code| for start and end of a word. */
+ private static final byte EDGE_OF_WORD = 1;
+
+ /** The number of characters that are digits, that is, '0' thru '9'. */
+ private static final int DIGITS_SIZE = 10;
+
+ /** Space for pattern trie. */
+ private static final int TRIE_SIZE = 55000;
+
+ /** Default value for {@link #triecSize}. */
+ private static final int DEFAULT_TRIEC_SIZE = 26000;
+
+ /** Default value for {@link #maxOps}. */
+ private static final short DEFAULT_MAX_OPS = 4080;
+
+ /** Maximum pattern length. Also maximum length of external representation
+ * of a "letter". */
+ private static final byte MAX_DOT = 15;
+
+ /** Maximum word length. */
+ private static final byte MAX_LEN = 50;
+
+ /** Default value for {@link #maxBufLen}. */
+ private static final short DEFAULT_MAX_BUF_LEN = 3000;
+
+ /* End of Constants from TeX code. */
+
+ /* Start of constant-like variables. (These were constants in the original code, but can now be expanded if wished,
+ * as we are free of some limitations that existed when this code was first written. */
+
+ /** Number of nodes in the pattern count trie. The value must be less than {@link #TRIE_SIZE} and greater than the
+ * number of occurrences of any pattern in the dictionary.*/
+ private int triecSize = PatGen.DEFAULT_TRIEC_SIZE;
+
+ /** Size of output hash table. This value should be a multiple of 510. */
+ private short maxOps = PatGen.DEFAULT_MAX_OPS;
+
+ /** Maximum number of levels + 1. Also used to denote bad patterns. */
+ private byte maxVal = PatGen.DEFAULT_MAX_VAL;
+
+ /** The maximum length, in characters, of an input line. This value must be at least {@link #MAX_LEN}. */
+ private short maxBufLen = PatGen.DEFAULT_MAX_BUF_LEN;
+
+ /* End of constant-like variables. */
+
+ /* Start of struct definitions from TeX code. */
+
+ /** An output word. */
+ private final class Opword {
+ /** The hyphen position. */
+ private int dot;
+
+ /** The hyphenation value. */
+ private int val;
+
+ /** The next output. */
+ private int op;
+
+ /** Explicit constructor so that it can be declared private. */
+ private Opword() { }
+ }
+
+ /* End of struct definitions from TeX code. */
+
+ /* Start of Variables from TeX code. */
+
+ /** The smallest pattern length to be analyzed. */
+ private int patstart;
+
+ /** The largest pattern length to be analyzed. */
+ private int patfinish;
+
+ /** The lowest hyphenation level for which patterns are to be generated. */
+ private int hyphstart;
+
+ /** The highest hyphenation level for which patterns are to be generated. */
+ private int hyphfinish;
+
+ /** The weight for good patterns. */
+ private int goodwt;
+
+ /** The weight for bad patterns. */
+ private int badwt;
+
+ /** The weight threshold for useful patterns. */
+ private int thresh;
+
+ /**
+ * The array of possible input characters, that is, characters that might be in the input files.
+ * Original patgen doc: "Specifies conversion of input characters".
+ * Original patgen doc: "We convert between |ASCII_code| and the user's external character set by
+ * means of arrays |xord| and |xchr| that are analogous to \PASCAL's |ord|
+ * and |chr| functions.".
+ * @see #xchr
+ */
+ private char[] xord = new char[WKConstants.MAX_8_BIT_UNSIGNED_VALUES];
+
+ /**
+ * The array of possible internal characters, that is, the values used in the internal computations.
+ * Original patgen doc: "Specifies conversion of output characters".
+ * @see #xord
+ */
+ private char[] xchr = new char[WKConstants.MAX_8_BIT_UNSIGNED_VALUES];
+
+ /** Original patgen doc: "specifies the class of a character". */
+ private char[] xclass = new char[WKConstants.MAX_8_BIT_UNSIGNED_VALUES];
+
+ /** Original patgen doc: "specifies the |internal_code| for a character". */
+ private char[] xint = new char[WKConstants.MAX_8_BIT_UNSIGNED_VALUES];
+
+ /**
+ * Original patgen doc: "specifies conversion of output characters".
+ * Original patget doc: "In addition we will use the |xext|, |xdig|, and |xdot| arrays to convert from the internal
+ * representation to the corresponding characters."
+ */
+ private char[] xdig = new char[PatGen.DIGITS_SIZE];
+
+ /**
+ * Original patgen do...
[truncated message content] |
|
From: <vic...@us...> - 2010-02-09 23:11:32
|
Revision: 10973
http://foray.svn.sourceforge.net/foray/?rev=10973&view=rev
Author: victormote
Date: 2010-02-09 23:11:25 +0000 (Tue, 09 Feb 2010)
Log Message:
-----------
1. Clean up repeat...until loops.
2. For each method, add x-ref to the patgen.web line number.
3. Move more code around to conform to original structure. Add checkstyle suppression to allow this.
Modified Paths:
--------------
trunk/foray/foray-hyphen/src/java/org/foray/hyphen/PatGen.java
trunk/foray/scripts/checkstyle-suppressions.xml
Added Paths:
-----------
trunk/foray/foray-hyphen/src/java/org/foray/hyphen/PatternGenerator.java
Modified: trunk/foray/foray-hyphen/src/java/org/foray/hyphen/PatGen.java
===================================================================
--- trunk/foray/foray-hyphen/src/java/org/foray/hyphen/PatGen.java 2010-02-09 01:30:50 UTC (rev 10972)
+++ trunk/foray/foray-hyphen/src/java/org/foray/hyphen/PatGen.java 2010-02-09 23:11:25 UTC (rev 10973)
@@ -85,6 +85,11 @@
* Most author and versioning information has been removed or placed in the credits secion of the source code.
* Otherwise, the intent is to simply be a java version of the original program.</p>
*
+ * <p>Note to developers: Please DO NOT try to make this class more object-oriented or refactor it in any of the many
+ * ways that you are probably tempted to do so.
+ * This is a Java port of a PASCAL program, and the intent of this class is to leave the original logic intact.
+ * See {@link PatternGenerator} for a refactored version of this class.</p>
+ *
* <p>The <a href="http://manpages.ubuntu.com/manpages/jaunty/man1/patgen.1.html">Ubuntu man page for the TeX patgen</a>
* is quite useful in understanding the original API.</p>
*
@@ -1021,6 +1026,7 @@
/**
* Prints some arbitrary content to stdout.
* @param outputString The String to be printed.
+ * @see "patgen.web, line 82"
*/
private void print(final String outputString) {
/* Converted from a WEB macro. */
@@ -1030,6 +1036,7 @@
/**
* Prints some arbitrary content to stdout.
* @param outputChar The char to be printed.
+ * @see "patgen.web, line 82"
*/
private void print(final char outputChar) {
/* Converted from a WEB macro. */
@@ -1039,6 +1046,7 @@
/**
* Prints a line of output to stdout.
* @param outputString The String to be printed.
+ * @see "patgen.web, line 83"
*/
private void printLn(final String outputString) {
System.out.println(outputString);
@@ -1048,6 +1056,7 @@
* Reads a line of input from stdin, and parses it into either 2 or 3 integers, the first being placed in
* {@link #n1}, the second in {@link #n2}, and the third in {@link #n3}.
* @param qtyExpected The number of input fields expected to be read.
+ * @see "patgen.web, line 84"
*/
private void getInput(final int qtyExpected) {
/* This does not really resemble that WEB macro in the original code, which was difficult to map to Java.
@@ -1084,6 +1093,7 @@
* Reads a line of input from stdin and returns it as an unparsed string.
* @return The line of input from stdin.
* @throws IOException For IO errors during input.
+ * @see "patgen.web, line 85"
*/
private String getInputLn() throws IOException {
/* This does not really resemble that WEB macro in the original code, which was difficult to map to Java.
@@ -1097,17 +1107,60 @@
* Initializes the various data structures.
* The patgen doc: "this procedure gets things started properly".
* @throws HyphenationException If the configured constants exceed predefined thresholds.
+ * @see "patgen.web, line 98"
+ */
+ private void initialize() throws HyphenationException {
+ setInitialValuesPart1();
+ setInitialValuesPart2();
+ setInitialValuesPart3();
+ setInitialValuesPart4();
+ }
+
+ /**
+ * Standard overflow logic.
+ * @param message The specifics of what has overflowed.
+ * @param capacity The capacity of the item that has overflowed.
+ * @see "patgen.web, line 256"
+ * @throws HyphenationException Always, as that is the purpose of this method.
+ */
+ private void overflow(final String message, final int capacity) throws HyphenationException {
+ throw new HyphenationException("PatGen capacity exceeded: " + message
+ + " (" + capacity + ").");
+ }
+
+ /**
+ * Converts |ASCII_code| to |packed_ASCII_code|.
+ * @param inputChar The ASCII_code to be converted.
+ * @return The corresponding packed_ASCII_code.
+ * @see "patgen.web, line 307"
+ */
+ private char si(final char inputChar) {
+ return inputChar;
+ }
+
+ /**
+ * Converts |packed_ASCII_code| to |ASCII_code|.
+ * @param inputChar The packed_ASCII_code to be converted.
+ * @return The corresponding ASCII_code;
+ * @see "patgen.web, line 308"
+ */
+ private char so(final char inputChar) {
+ return inputChar;
+ }
+
+ /**
+ * We want to make sure that the constants defined in this program
+ * satisfy all the required relations. Some of them are needed to avoid
+ * time-consuming checks while processing the dictionary and/or to
+ * prevent range check and array bound violations.
+ *
+ * Here we check that the definitions of |ASCII_code| and
+ * |packed_ASCII_code| are consistent with those of |si| and |so|.
+ * @throws HyphenationException For inconsistent initialization values.
* @see "patgen.web, line 313"
*/
- private void setInitialValues() throws HyphenationException {
- /* We want to make sure that the constants defined in this program
- * satisfy all the required relations. Some of them are needed to avoid
- * time-consuming checks while processing the dictionary and/or to
- * prevent range check and array bound violations. */
+ private void setInitialValuesPart1() throws HyphenationException {
- /* Here we check that the definitions of |ASCII_code| and
- * |packed_ASCII_code| are consistent with those of |si| and |so|. */
-
int bad = 0;
/* Following line must be comment out because the java compiler treats it all as dead code. */
// if (PatGen.LAST_ASCII_CODE < WKConstants.MAX_7_BIT_UNSIGNED_VALUES - 1) {
@@ -1133,10 +1186,13 @@
if (bad > 0) {
throw new HyphenationException("Bad constants---case " + bad);
}
+ }
- /* The following code initializes the |xchr| array with some of the
- * standard ASCII characters. */
-
+ /**
+ * Initializes the |xchr| array with some of the standard ASCII characters.
+ * @see "patgen.web, line 345"
+ */
+ private void setInitialValuesPart2() {
for (int j = 0; j < this.xchr.length; j++) {
this.xchr[j] = ' ';
}
@@ -1203,80 +1259,36 @@
this.xchr['x'] = 'x';
this.xchr['y'] = 'y';
this.xchr['z'] = 'z';
+ }
- /* The following system-independent code makes the xord array contain
- * a suitable inverse to the information in xchr. */
+ /* The following system-independent code makes the xord array contain
+ * a suitable inverse to the information in xchr. */
- /* ASCII_code that should not appear. */
- final char invalidCode = 0;
+ /** ASCII_code that should not appear. */
+ private final char invalidCode = 0;
- /* Ordinal index for the tab character. Tab characters seem to be
- * unavoidable with files from UNIX systems. */
- final char tabChar = '\t';
+ /** Ordinal index for the tab character. Tab characters seem to be
+ * unavoidable with files from UNIX systems. */
+ private final char tabChar = '\t';
+ /**
+ * More initialization.
+ */
+ private void setInitialValuesPart3() {
for (int i = PatGen.FIRST_TEXT_CHAR; i < PatGen.LAST_TEXT_CHAR; i++) {
- this.xord[i] = invalidCode;
+ this.xord[i] = this.invalidCode;
}
for (char j = 0; j <= PatGen.LAST_ASCII_CODE; j++) {
this.xord[this.xchr[j]] = j;
}
this.xord[' '] = ' ';
- this.xord[tabChar] = ' ';
-
- /* So far each invalid |ASCII_code| has been assigned the character |' '|
- * and all invalid characters have been assigned |ASCII_code=invalid_code|. */
-
- /* Initialize the xclass and xint arrays with default values. Both are
- * modified by other initialization routines below. */
- for (int i = PatGen.FIRST_TEXT_CHAR; i <= PatGen.LAST_TEXT_CHAR; i++) {
- this.xclass[i] = PatGen.INVALID_CLASS;
- this.xint[i] = 0;
- }
- this.xclass[' '] = PatGen.SPACE_CLASS;
-
- /* Initialize the xext array. */
- for (int j = 0; j <= PatGen.LAST_ASCII_CODE; j++) {
- this.xext[j] = ' ';
- }
- this.xext[PatGen.EDGE_OF_WORD] = '.';
-
- /* Initialize the xdig array. */
- for (char j = 0; j < this.xdig.length; j++) {
- this.xdig[j] = this.xchr[j + '0'];
- this.xclass[this.xdig[j]] = PatGen.DIGIT_CLASS;
- this.xint[this.xdig[j]] = j;
- }
-
- /* Initialize the xhyf array. */
- this.xhyf[PatGen.ERR_HYF] = '.';
- this.xhyf[PatGen.IS_HYF] = '-';
- this.xhyf[PatGen.FOUND_HYF] = '*';
+ this.xord[this.tabChar] = ' ';
}
- /**
- * Converts |ASCII_code| to |packed_ASCII_code|.
- * @param inputChar The ASCII_code to be converted.
- * @return The corresponding packed_ASCII_code.
- * @see "patgen.web, line 307"
- */
- private char si(final char inputChar) {
- /* TODO: This method can probably be removed since we don't have the
- * same resource constraint issues as Pascal does. */
- return inputChar;
- }
- /**
- * Converts |packed_ASCII_code| to |ASCII_code|.
- * @param inputChar The packed_ASCII_code to be converted.
- * @return The corresponding ASCII_code;
- * @see "patgen.web, line 308"
- */
- private char so(final char inputChar) {
- /* TODO: This method can probably be removed since we don't have the
- * same resource constraint issues as Pascal does. */
- return inputChar;
- }
+ /* So far each invalid |ASCII_code| has been assigned the character |' '|
+ * and all invalid characters have been assigned |ASCII_code=invalid_code|. */
/**
* Returns the |ASCII_code| corresponding to a character, assigning a new |ASCII_code| first if necessary.
@@ -1309,19 +1321,39 @@
}
/**
- * Standard overflow logic.
- * @param message The specifics of what has overflowed.
- * @param capacity The capacity of the item that has overflowed.
- * @see "patgen.web, line 256"
- * @throws HyphenationException Always, as that is the purpose of this method.
+ * Initialize the xclass and xint arrays with default values. Both are
+ * modified by other initialization routines below.
+ * @see "patgen.web, line 531"
*/
- private void overflow(final String message, final int capacity) throws HyphenationException {
- throw new HyphenationException("PatGen capacity exceeded: " + message
- + " (" + capacity + ").");
+ private void setInitialValuesPart4() {
+ for (int i = PatGen.FIRST_TEXT_CHAR; i <= PatGen.LAST_TEXT_CHAR; i++) {
+ this.xclass[i] = PatGen.INVALID_CLASS;
+ this.xint[i] = 0;
+ }
+ this.xclass[' '] = PatGen.SPACE_CLASS;
+
+ /* Initialize the xext array. */
+ for (int j = 0; j <= PatGen.LAST_ASCII_CODE; j++) {
+ this.xext[j] = ' ';
+ }
+ this.xext[PatGen.EDGE_OF_WORD] = '.';
+
+ /* Initialize the xdig array. */
+ for (char j = 0; j < this.xdig.length; j++) {
+ this.xdig[j] = this.xchr[j + '0'];
+ this.xclass[this.xdig[j]] = PatGen.DIGIT_CLASS;
+ this.xint[this.xdig[j]] = j;
+ }
+
+ /* Initialize the xhyf array. */
+ this.xhyf[PatGen.ERR_HYF] = '.';
+ this.xhyf[PatGen.IS_HYF] = '-';
+ this.xhyf[PatGen.FOUND_HYF] = '*';
}
/**
* Initializes the pattern tree.
+ * @see "patgen.web, line 689"
*/
private void initpatterntrie() {
for (char c = 0; c <= PatGen.LAST_ASCII_CODE; c++) {
@@ -1356,6 +1388,7 @@
* right of the occupied region (starting at |triemax+1|).
* @return The pointer to the location of the trie node.
* @throws HyphenationException If the capacity of the pattern trie nodes has been exceeded.
+ * @see "patgen.web, line 711"
*/
private int firstfit() throws HyphenationException {
final int s = computeTrieBaseLocation();
@@ -1440,6 +1473,7 @@
* Freed cells are put at the beginning of the free list.
* @param s The base of states to be unpacked.
* @see #unpackc(int)
+ * @see "patgen.web, line 769"
*/
private void unpack(final int s) {
this.qmax = 1;
@@ -1475,7 +1509,7 @@
* @param n The next output.
* @return The opcode for the output.
* @throws HyphenationException For an overflow condition in {@link #maxOps}.
- * @see "patgen.web, line 802"
+ * @see "patgen.web, line 795"
* @see "The Art of Computer Programming, Second Edition, vol. 3, pp. 517-518."
*/
private int newtrieop(final int v, final int d, final int n) throws HyphenationException {
@@ -1515,7 +1549,7 @@
* @param dot The hyphen position.
* @throws HyphenationException For an overflow condition in {@link #maxOps} or if the capacity of the pattern trie
* nodes is exceeded.
- * @see "patgen.web, line 828"
+ * @see "patgen.web, line 823"
*/
private void insertpattern(final int val, final int dot) throws HyphenationException {
int i = 1;
@@ -1554,6 +1588,7 @@
* @param t The index into the pattern trie??
* @return The new value for <code>t</code>
* @throws HyphenationException If the capacity of the pattern trie nodes has been exceeded.
+ * @see "patgen.web, line 849"
*/
private int insertCriticalTransition(final int i, final int s, final int t) throws HyphenationException {
int returnT = t;
@@ -1584,6 +1619,7 @@
/**
* Initializes the pattern count tree.
* @see #initpatterntrie()
+ * @see "patgen.web, line 894"
*/
private void initcounttrie() {
for (char c = 0; c <= PatGen.LAST_ASCII_CODE; c++) {
@@ -1607,6 +1643,7 @@
* @return The pointer to the location of the trie node.
* @throws HyphenationException For overflow of the pattern count trie.
* @see #firstfit()
+ * @see "patgen.web, line 909"
*/
private int firstcfit() throws HyphenationException {
int a;
@@ -1631,6 +1668,7 @@
* is lower than for the pattern trie because speed is more important here.
* @return The value to be used for "b", or -1 if no base location is found.
* @throws HyphenationException For overflows in data structures.
+ * @see "patgen.web, line 929"
*/
private int computeTriecBaseLocation() throws HyphenationException {
int a;
@@ -1696,6 +1734,7 @@
* Freed cells are put at the beginning of the free list.
* @param b The base of states to be unpacked.
* @see #unpack(int)
+ * @see "patgen.web, line 959"
*/
private void unpackc(final int b) {
this.qmax = 1;
@@ -1727,6 +1766,7 @@
* @param fpos The finishing position.
* @return The index to the new count trie node??
* @throws HyphenationException For overflow of data structures.
+ * @see "patgen.web, line 980"
*/
private int insertcpat(final int fpos) throws HyphenationException {
int spos;
@@ -1769,6 +1809,7 @@
* @param b The sub-trie to be packed??
* @return The new value for <code>a</code>
* @throws HyphenationException For an overflow of the triec array.
+ * @see "patgen.web, line 1006"
*/
private int insertCriticalCountTransition(final int spos, final int a, final int b)
throws HyphenationException {
@@ -1802,6 +1843,7 @@
* @param reader The input stream to be read.
* @throws IOException For errors reading the input stream.
* @throws HyphenationException For an input line that is too long.
+ * @see "patgen.web, line 1042"
*/
private void readBuf(final BufferedReader reader) throws IOException, HyphenationException {
/* Converted from a WEB macro. Conforms more to the spirit of the macro than to its original substance. */
@@ -1816,6 +1858,7 @@
/**
* Prints contents of {@link #buf} array.
+ * @see "patgen.web, line 1075"
*/
private void printBuf() {
this.bufptr = 0;
@@ -1832,6 +1875,7 @@
* Prints a "bad input" error message.
* @param error The error message to be printed.
* @throws HyphenationException Always, as that is the purpose of this method.
+ * @see "patgen.web, line 1081"
*/
private void badInput(final String error) throws HyphenationException {
printBuf();
@@ -1840,7 +1884,7 @@
/**
* Reads the translate file.
- * The |translate| file may specify the values of lefthyphenmin and
+ * The {@link #translate} file may specify the values of lefthyphenmin and
* righthyphenmin as well as the external representation and
* collating sequence of the "letters" used by the language. In addition
* replacements may be specified for the characters |'-'|, |'*'|, and |'.'|
@@ -1848,6 +1892,7 @@
* (or does not exist) default values will be used.
* @throws IOException For errors reading the input file.
* @throws HyphenationException For overflow conditions or other errors in the input data.
+ * @see "patgen.web, line 1083"
*/
private void readtranslate() throws IOException, HyphenationException {
this.imax = 1;
@@ -1871,6 +1916,7 @@
/**
* Sets default values for the case where there is no translation table.
+ * @see "patgen.web, line 1117"
*/
private void setUpDefaultTranslation() {
this.lefthyphenmin = PatGen.DEFAULT_LEFT_HYPHEN_MIN;
@@ -1897,6 +1943,7 @@
* are invalid (e.g., blank) new values are read from the terminal.
* @throws HyphenationException For a line that is too long, or for invalid hyphenation data.
* @throws IOException For errors reading the translate file.
+ * @see "patgen.web, line 1127"
*/
private void setupHyphenationDataForTranslate() throws HyphenationException, IOException {
int n = 0;
@@ -1949,6 +1996,7 @@
} else {
bad = true;
}
+
if (bad) {
bad = false;
do {
@@ -1964,7 +2012,7 @@
this.n1 = 0;
printLn("Specify 1 <= left_hyphen_min, right_hyphen_min <=" + (PatGen.MAX_DOT - 1) + "!");
}
- } while (! (this.n1 > 0));
+ } while (this.n1 <= 0);
}
for (char j = PatGen.ERR_HYF; j <= PatGen.FOUND_HYF; j++) {
if (this.buf[j + bufferIndex] != ' ') {
@@ -1996,14 +2044,15 @@
* version.
* @throws HyphenationException For overflow of data structures.
* @throws IOException For errors reading the {@link #translate} file.
+ * @see "patgen.web, line 1171"
*/
private void setupRepresentationForALetter() throws HyphenationException, IOException {
- boolean bad = false;
- boolean lower;
readBuf(this.translate);
this.bufptr = 1;
- lower = true;
- lab30: while (! bad) {
+ boolean lower = true;
+ boolean bad = false;
+ done: while (! bad) {
+ /* Lower and then upper case version. */
this.patlen = 0;
do {
if (this.bufptr < this.maxBufLen) {
@@ -2013,7 +2062,7 @@
}
if (this.buf[this.bufptr] == this.buf[1]) {
if (this.patlen == 0) {
- break lab30;
+ break done;
} else {
if (lower) {
if (this.imax == PatGen.LAST_ASCII_CODE) {
@@ -2023,7 +2072,7 @@
this.imax ++;
this.xext[this.imax] = this.xchr[this.pat[this.patlen]];
}
- final char c = this.xchr [this.pat[1]];
+ final char c = this.xchr[this.pat[1]];
if (this.patlen == 1) {
if (this.xclass[c] != PatGen.INVALID_CLASS) {
bad = true;
@@ -2067,6 +2116,7 @@
* @param c The character to be inserted into the tree.
* @return The new value for <code>bad</code>.
* @throws HyphenationException For overflow of the data structures.
+ * @see "patgen.web, line 1210"
*/
private boolean insertLetterIntoPatternTrie(final boolean inputBad, final boolean lower,
final char c) throws HyphenationException {
@@ -2129,6 +2179,7 @@
* @param inputC The current character in the input buffer.
* @return The internal code for <code>input</code>
* @throws HyphenationException For a bad representation.
+ * @see "patgen.web, line 1242"
*/
private char getLetter(final char inputC) throws HyphenationException {
/* Converted from a WEB macro. */
@@ -2160,6 +2211,7 @@
* @param b The family to be traversed, a trie pointer.
* @param i The current depth in trie.
* @throws HyphenationException If count of trie nodes exceeds capacity.
+ * @see "patgen.web, line 1261"
*/
private void findLetters(final int b, final int i) throws HyphenationException {
if (i == 1) {
@@ -2188,6 +2240,7 @@
* @param i The current depth in trie.
* @param a The index of the starting node.
* @throws HyphenationException If count of trie nodes exceeds capacity.
+ * @see "patgen.web, line 1284"
*/
private void insertExternalLetterIntoCountTrie(final int i, final int a)
throws HyphenationException {
@@ -2210,6 +2263,7 @@
* @param inputL The index to the first letter to be written.
* @param f The file to which the letter should be written.
* @throws IOException For errors writing the output.
+ * @see "patgen.web, line 1305"
*/
private void writeLetterEnd(final int inputL, final OutputStream f) throws IOException {
int l = inputL;
@@ -2225,6 +2279,7 @@
* @param i The letter to be written.
* @param f The file to which the letter should be written.
* @throws IOException For errors writing the output.
+ * @see "patgen.web, line 1308"
*/
private void writeLetter(final char i, final OutputStream f) throws IOException {
final int l = this.triecl[this.triecroot + i];
@@ -2233,16 +2288,17 @@
/*
* Routines for traversing pattern tries.
- * At the end of a pass, we traverse the count trie using the following
- * recursive procedure, selecting good and bad patterns and inserting them
- * into the pattern trie.
*/
/**
* Traverse subtries of family <code>b</code>.
+ * At the end of a pass, we traverse the count trie using this
+ * recursive procedure, selecting good and bad patterns and inserting them
+ * into the pattern trie.
* @param b The family whose subtries are to be traversed.
* @param i Current depth in trie.
* @throws HyphenationException For overflowing data structures.
+ * @see "patgen.web, line 1310"
*/
private void traversecounttrie(final int b, final int i) throws HyphenationException {
/* Find transitions belonging to this family. */
@@ -2269,6 +2325,7 @@
* good patterns extending the current type of patterns.
* @param a Index to the pattern being considered??
* @throws HyphenationException For overflows of data structures.
+ * @see "patgen.web, line 1330"
*/
private void decideWhatToDoWithPattern(final int a) throws HyphenationException {
if (this.goodwt * this.triecl[a] < this.thresh) {
@@ -2292,6 +2349,7 @@
* method, which also prints some statistics about the patterns chosen.
* The "efficiency" is an estimate of pattern effectiveness.
* @throws HyphenationException For overflows of data structures.
+ * @see "patgen.web, line 1360"
*/
private void collectcounttrie() throws HyphenationException {
this.goodpatcount = 0;
@@ -2329,6 +2387,7 @@
* Deletes bad patterns in subtrie <code>s</code>.
* @param s The subtrie in which bad patterns should be deleted.
* @return Zero if entire subtrie freed, otherwise <code>s</code>.
+ * @see "patgen.web, line 1384"
*/
private int deletepatterns(final int s) {
boolean allfreed = true;
@@ -2360,6 +2419,7 @@
/**
* Cells freed by |delete_patterns| are put at the end of the free list.
* @param t The node to be linked around??
+ * @see "patgen.web, line 1414"
*/
private void linkAroundBadOutputs(final int t) {
int h = 0;
@@ -2379,6 +2439,7 @@
/**
* Deallocates a node.
* @param t The node to be deallocated??
+ * @see "patgen.web, line 1428"
*/
private void deallocateThisNode(final int t) {
this.triel[this.trier[this.triemax + 1]] = t;
@@ -2395,6 +2456,7 @@
* and zeros bad outputs in the hash table. Note that the hash table may
* become somewhat disorganized when more levels are added, but this defect
* isn't serious.
+ * @see "patgen.web, line 1437"
*/
private void deletebadpatterns() {
final int oldopcount = this.opcount;
@@ -2419,6 +2481,7 @@
* @param s The subtrie whose patterns should be output.
* @param patlen The current depth in trie.
* @throws IOException For errors writing the output.
+ * @see "patgen.web, line 1460"
*/
private void outputpatterns(final int s, final int patlen) throws IOException {
for (char c = this.cmin; c <= this.cmax; c++) {
@@ -2441,6 +2504,7 @@
* @param patlen The current depth in trie.
* @param inputH The index to the current pattern??
* @throws IOException For erros writing the output.
+ * @see "patgen.web, line 1480"
*/
private void outputThisPattern(final int patlen, final int inputH) throws IOException {
int h = inputH;
@@ -2469,6 +2533,7 @@
/**
* Step 1 in preparation for reading the dictionary.
+ * @see "patgen.web, line 1519"
*/
private void prepareToReadDictionaryPart1() {
/* In case the default has been changed. */
@@ -2490,18 +2555,19 @@
* |dotw[dpos]|.
* @throws IOException For errors reading input.
* @throws HyphenationException For overflows of data structures.
+ * @see "patgen.web, line 1531"
*/
private void readword() throws IOException, HyphenationException {
readBuf(this.dictionary);
this.word[1] = PatGen.EDGE_OF_WORD;
this.wlen = 1;
this.bufptr = 0;
- lab40: do {
+ found: do {
this.bufptr = this.bufptr + 1;
final char c = this.buf[this.bufptr];
switch (this.xclass[c]) {
case PatGen.SPACE_CLASS: {
- break lab40;
+ break found;
}
case PatGen.DIGIT_CLASS: {
if (this.wlen == 1) {
@@ -2549,7 +2615,7 @@
badInput("Bad character");
}
}
- } while (! (this.bufptr == this.maxBufLen));
+ } while (this.bufptr != this.maxBufLen);
this.wlen = this.wlen + 1;
this.word[this.wlen] = 1;
}
@@ -2566,6 +2632,7 @@
* count statistics for the pattern because it can't possibly be chosen in
* this pass. Thus we don't even need to insert such patterns into the count
* trie, which saves a good deal of space.
+ * @see "patgen.web, line 1574"
*/
private void hyphenate() {
for (int spos = this.wlen - this.hyfmax; spos >= 0; spos --) {
@@ -2573,7 +2640,7 @@
this.hval[spos] = 0;
int fpos = spos + 1;
int t = this.trieroot + this.word[fpos];
- done: while (so(this.triec[t]) == this.word[fpos]) {
+ done: do {
int h = this.trier[t];
while (h > 0) {
h = storeOutputH(spos, fpos, h);
@@ -2584,12 +2651,13 @@
}
fpos = fpos + 1;
t = t + this.word[fpos];
- }
+ } while (so(this.triec[t]) == this.word[fpos]);
}
}
/**
* Step 2 in preparation for reading the dictionary.
+ * @see "patgen.web, line 1614"
*/
private void prepareToReadDictionaryPart2() {
this.hyfmin = this.lefthyphenmin + 1;
@@ -2603,6 +2671,7 @@
* @param fpos Finishing position of pattern.
* @param h The output to be stored.
* @return The new value for <code>h</code>.
+ * @see "patgen.web, line 1618"
*/
private int storeOutputH(final int spos, final int fpos, final int h) {
final int dpos = spos + this.ops[h].dot;
@@ -2630,6 +2699,7 @@
* current patterns, thus changing {@link #NO_HYF} into {@link #ERR_HYF} and {@link #IS_HYF}
* into {@link #FOUND_HYF}. The routine also collects statistics about the number
* of good, bad, and missed hyphens.
+ * @see "patgen.web, line 1628"
*/
private void changedots() {
int dpos;
@@ -2656,6 +2726,7 @@
* Outputs the word as hyphenated by the current
* patterns, including any word weights. Hyphens inhibited by the values of
* {@link #lefthyphenmin} and {@link #righthyphenmin} are output as well.
+ * @see "patgen.web, line 1649"
*/
...
[truncated message content] |
|
From: <vic...@us...> - 2010-03-13 21:19:30
|
Revision: 10982
http://foray.svn.sourceforge.net/foray/?rev=10982&view=rev
Author: victormote
Date: 2010-03-13 21:19:24 +0000 (Sat, 13 Mar 2010)
Log Message:
-----------
Rename project foray-pretty to foray-xml.
Added Paths:
-----------
trunk/foray/foray-xml/
Removed Paths:
-------------
trunk/foray/foray-pretty/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2010-03-13 21:25:58
|
Revision: 10984
http://foray.svn.sourceforge.net/foray/?rev=10984&view=rev
Author: victormote
Date: 2010-03-13 21:25:45 +0000 (Sat, 13 Mar 2010)
Log Message:
-----------
Rename project foray-pretty to foray-xml.
Modified Paths:
--------------
trunk/foray/foray-font/src/java/org/foray/font/ConfigGenerator.java
trunk/foray/foray-xml/src/java/org/foray/xml/dtd/DTD.java
trunk/foray/foray-xml/src/java/org/foray/xml/dtd/DTDElement.java
trunk/foray/foray-xml/src/java/org/foray/xml/dtd/DTDTokenizer.java
trunk/foray/foray-xml/src/java/org/foray/xml/dtd/ElementStack.java
trunk/foray/foray-xml/src/java/org/foray/xml/dtd/package-info.java
Added Paths:
-----------
trunk/foray/foray-xml/src/java/org/foray/xml/
trunk/foray/foray-xml/src/java/org/foray/xml/FOrayPretty.java
trunk/foray/foray-xml/src/java/org/foray/xml/FOrayXDiff.java
trunk/foray/foray-xml/src/java/org/foray/xml/dtd/
trunk/foray/foray-xml/src/java/org/foray/xml/package-info.java
Removed Paths:
-------------
trunk/foray/foray-xml/src/java/org/foray/pretty/FOrayPretty.java
trunk/foray/foray-xml/src/java/org/foray/pretty/FOrayXDiff.java
trunk/foray/foray-xml/src/java/org/foray/pretty/dtd/
trunk/foray/foray-xml/src/java/org/foray/pretty/package-info.java
Modified: trunk/foray/foray-font/src/java/org/foray/font/ConfigGenerator.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/ConfigGenerator.java 2010-03-13 21:22:13 UTC (rev 10983)
+++ trunk/foray/foray-font/src/java/org/foray/font/ConfigGenerator.java 2010-03-13 21:25:45 UTC (rev 10984)
@@ -33,7 +33,7 @@
import org.foray.font.format.TTFFile;
import org.foray.font.format.TTFFont;
import org.foray.font.format.Type1File;
-import org.foray.pretty.FOrayPretty;
+import org.foray.xml.FOrayPretty;
import org.axsl.font.Font;
import org.axsl.font.FontException;
Deleted: trunk/foray/foray-xml/src/java/org/foray/pretty/FOrayPretty.java
===================================================================
--- trunk/foray/foray-xml/src/java/org/foray/pretty/FOrayPretty.java 2010-03-13 21:22:13 UTC (rev 10983)
+++ trunk/foray/foray-xml/src/java/org/foray/pretty/FOrayPretty.java 2010-03-13 21:25:45 UTC (rev 10984)
@@ -1,1318 +0,0 @@
-/*
- * Copyright 2005 The FOray Project.
- * http://www.foray.org
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * This work is in part derived from the following work(s), used with the
- * permission of the licensor:
- * Apache FOP, licensed by the Apache Software Foundation
- *
- */
-
-/*
- * $LastChangedRevision$
- * $LastChangedDate$
- * $LastChangedBy$
- */
-
-package org.foray.pretty;
-
-import org.foray.common.FOrayLogger;
-import org.foray.common.XMLUtil;
-import org.foray.pretty.dtd.DTD;
-import org.foray.pretty.dtd.DTDElement;
-import org.foray.pretty.dtd.ElementStack;
-
-import org.apache.commons.cli.CommandLine;
-import org.apache.commons.cli.CommandLineParser;
-import org.apache.commons.cli.HelpFormatter;
-import org.apache.commons.cli.Option;
-import org.apache.commons.cli.Options;
-import org.apache.commons.cli.ParseException;
-import org.apache.commons.cli.PosixParser;
-import org.apache.commons.logging.Log;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.InputSource;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXNotRecognizedException;
-import org.xml.sax.SAXNotSupportedException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.ext.DefaultHandler2;
-import org.xml.sax.helpers.AttributesImpl;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParserFactory;
-
-/**
- * Command-line application that reads an XML file and writes a pretty-printed
- * version of it.
- */
-public class FOrayPretty extends DefaultHandler2 {
-
- /** Command-line status constant indicating that the command line itself was not properly formed. */
- public static final byte STATUS_COMMAND_LINE_ERROR = 1;
-
- /** Command-line return status constant indicating that a file was not found. */
- public static final byte STATUS_FILE_NOT_FOUND = 2;
-
- /** Command-line return status constant indicating that there was an error parsing the input file. */
- public static final byte STATUS_PARSING_ERROR = 3;
-
- /** The default line length that should be used in the pretty-printed
- * output. */
- private static final byte DEFAULT_LINE_LENGTH = 80;
-
- /** The input source to be pretty-printed. */
- private InputSource input;
-
- /** The output stream to which the pretty-printed output should be sent. */
- private OutputStream output;
-
- /** The locator instance for identifying the document, line, and column
- * number of specific elements. */
- private Locator locator;
-
- /** The entity resolver to be used for resolving DTD catalogs and other
- * entities. */
- private EntityResolver entityResolver;
-
- /** A reusable buffer. */
- private StringBuilder charBuffer = new StringBuilder();
-
- /** The name of the root element of this document. */
- private String rootElement;
-
- /** The DTD for this document. */
- private DTD dtd = new DTD();
-
- /** The element stack. */
- private ElementStack elementStack = new ElementStack();
-
- /** A queue of unprocessed elements. */
- private Queue queue = new Queue();
-
- /** The logger (lazily created). Use {#getLogger()} to get the instance. */
- private Log logger;
-
- /* Begin state variables. */
-
- /** State variable tracking whether we are currently inside the DTD or
- * not. */
- private boolean inDTD = false;
-
- /** State variable tracking whether we are currently inside an entity
- * expansion or not. */
- private boolean inEntity = false;
-
- /** Indicates whether the item on the top of the element stack has been
- * written. */
- private boolean topElementWritten = true;
-
- /** The name of the last started-element. */
- private String lastStartedElement;
-
- /** The attributes belonging to the last-started element. */
- private Attributes lastStartedAttributes;
-
- /** The last column number that was written. This value is one-based, i.e.
- * After the first character is written on a new line, this value should be
- * 1. */
- private int lastColumnWritten = 0;
-
- /* End state variables. */
-
- /* Begin configuration variables. */
-
- /** The encoding to use for the pretty-printed output. */
- private String outputEncoding = "UTF-8";
-
- /** The XML declaration string. */
- private String xmlDeclaration = "<?xml version=\"1.0\" "
- + "encoding=\"" + this.outputEncoding + "\"?>";
-
- /** The line terminator that should be used in the output. */
- private String lineTerminator = "\n";
-
- /** The text that should be output before the root element. */
- private String preRootText = null;
-
- /** The text that should be output after the root element. */
- private String postRootText = "\n";
-
- /** Set this to true if PCDATA content can have space characters replaced
- * by line terminators and vice versa. */
- private boolean breakPCDATA = true;
-
- /** The number of spaces that should be indented for each level. */
- private int indent = 2;
-
- /** The maximum number of characters desired on each line. */
- private int desiredLineLength = FOrayPretty.DEFAULT_LINE_LENGTH;
-
- /**
- * Block elements are started on a new line. However, if they are inside
- * elements containing mixed content, the default behavior is to start the
- * element at column 0. If it should be indented, set this variable to
- * true.
- */
- private boolean indentBlocksInsideMixedContent = false;
-
- /* End configuration variables. */
-
- /**
- * Constructor.
- * @param input The input source encapsulating the document to be pretty-printed.
- * @param output The output stream to which the pretty-printed document should be sent.
- * @param catalog The location of a catalog file that should be used to find the DTD for this document.
- * This may be null.
- */
- public FOrayPretty(final InputSource input, final OutputStream output, final String catalog) {
- this.input = input;
- this.output = output;
- if (catalog != null) {
- final String [] catalogs = {catalog};
- this.entityResolver = XMLUtil.getEntityResolver(catalogs);
- }
-
- /* Set the line terminator to the default for this operating system. */
- this.lineTerminator = System.getProperty("line.separator");
- /* Default the pre- and post- root text to one line separator. */
- this.preRootText = null;
- this.postRootText = this.lineTerminator;
- }
-
- /**
- * Intantiates parser and starts parsing of input.
- * @throws IOException For I/O Errors.
- * @throws SAXException For parsing errors.
- * @throws ParserConfigurationException For errors configuring parser.
- */
- public void start() throws IOException, SAXException, ParserConfigurationException {
- final XMLReader parser = createParser();
-
- /* Bind the LexicalHandler to the XMLReader if possible. */
- try {
- parser.setProperty("http://xml.org/sax/properties/lexical-handler", this);
- } catch (final SAXNotSupportedException e1) {
- logError("Parser does not support LexicalHandler.");
- }
-
- /* Bind the DeclHandler to the XMLReader if possible. */
- try {
- parser.setProperty("http://xml.org/sax/properties/declaration-handler", this);
- } catch (final SAXNotSupportedException e) {
- logError("Parser does not support Declaration Handler.");
- }
-
- /* Turn on namespace-prefixes so that we get the namespace declarations
- * returned with other attributes and can therefore write them out
- * along with them. */
- try {
- parser.setFeature("http://xml.org/sax/features/namespace-prefixes", true);
- } catch (final SAXNotRecognizedException e1) {
- logError("Parser does not recognize the \"namespace-prefixes\" feature.");
- } catch (final SAXNotSupportedException e1) {
- logError("Parser unable to supply namespace-prefixes.");
- }
-
- /* Turn on validation if it is available. */
- try {
- parser.setFeature("http://xml.org/sax/features/validation", true);
- } catch (final SAXNotRecognizedException e1) {
- logError("Parser does not recognize the \"validation\" feature.");
- } catch (final SAXNotSupportedException e1) {
- logError("Parser unable to validate.");
- }
-
- /* Turn on "notify-char-refs" feature.
- * Sadly, this only works with Xerces.
- * This feature, or something like it is very important.
- * Without it, character entities get transformed into characters
- * without notification.
- * When notified, we can (and do) ignore the transformed characters
- * and use the character entities instead.
- * We do NOT want to change the user's content. */
- try {
- parser.setFeature("http://apache.org/xml/features/scanner/notify-char-refs", true);
- } catch (final SAXNotRecognizedException e) {
- /* Make this a fatal error. */
- logError("Parser cannot report character entities. Aborting.");
- cleanup();
- return;
- } catch (final SAXNotSupportedException e) {
- /* Make this a fatal error. */
- logError("Parser cannot report character entities. Aborting.");
- cleanup();
- return;
- }
- parser.setContentHandler(this);
- parser.parse(this.input);
- cleanup();
- }
-
- /**
- * Creates a SAX parser.
- * @return The created SAX parser.
- * @throws SAXException For error creating parser.
- * @throws ParserConfigurationException For error configuring parser.
- */
- public XMLReader createParser() throws SAXException, ParserConfigurationException {
- final SAXParserFactory spf = javax.xml.parsers.SAXParserFactory.newInstance();
- spf.setNamespaceAware(true);
- final XMLReader xmlReader = spf.newSAXParser().getXMLReader();
- if (this.entityResolver != null) {
- xmlReader.setEntityResolver(this.entityResolver);
- }
- return xmlReader;
- }
-
- /**
- * {@inheritDoc}
- */
- public void setDocumentLocator(final Locator locator) {
- this.locator = locator;
- }
-
- /**
- * Finalize the processing.
- */
- private void cleanup() {
- try {
- this.output.close();
- } catch (final IOException e1) {
- /* Ignore. */
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public void startDocument() {
- write(this.xmlDeclaration);
- write(newLine());
- }
-
- /**
- * {@inheritDoc}
- */
- public void endDocument() {
- write(newLine());
- }
-
- /**
- * {@inheritDoc}
- */
- public void startElement(final String uri, final String local,
- final String qName, final Attributes attributes) {
- flushCharacters();
- ensureTopElementWritten(false);
- /* Cache the parameters in instance variable for later processing.
- * We don't want to write the element yet, because the next event
- * received might be the close of the same element, and empty elements
- * can be written two different ways.*/
- this.lastStartedElement = qName;
- /* Must copy the attributes as they are reset on each callback. */
- this.lastStartedAttributes = new AttributesImpl(attributes);
- final DTDElement element = this.dtd.getElement(qName);
- this.elementStack.push(element);
- this.topElementWritten = false;
- }
-
- /**
- * Writes the element at the top of the stack if it has not already been
- * written.
- * @param isEmpty Indicates whether the element has any content or not.
- */
- private void ensureTopElementWritten(final boolean isEmpty) {
- if (this.topElementWritten) {
- return;
- }
- writeElement(this.lastStartedElement, this.lastStartedAttributes,
- isEmpty);
- this.topElementWritten = true;
- }
-
- /**
- * Writes an element.
- * @param qName The namespace-qualified name of the element to be written.
- * @param attributes The attributes for the element to be written.
- * @param isEmpty Indicates whether the element has any content or not.
- */
- private void writeElement(final String qName, final Attributes attributes,
- final boolean isEmpty) {
- if (qName == null) {
- return;
- }
- if (qName.equals(this.rootElement)) {
- /* Whitespace before and after the end of the root element is
- * discarded by SAX, so we need to control it manually. */
- write(this.preRootText);
- }
-
- /* Accumulate the tag opener. */
- final StringBuilder tagOpenBuffer = new StringBuilder();
- tagOpenBuffer.append("<");
- tagOpenBuffer.append(qName);
-
- /* Accumulate the attributes. */
- final StringBuilder attributesBuffer = new StringBuilder();
- for (int i = 0; i < attributes.getLength(); i++) {
- attributesBuffer.append(" ");
- attributesBuffer.append(attributes.getQName(i));
- attributesBuffer.append("=\"");
- attributesBuffer.append(attributes.getValue(i));
- attributesBuffer.append("\"");
- }
-
- /* Accumulate the tag closer. */
- final StringBuilder tagCloseBuffer = new StringBuilder();
- if (isEmpty) {
- tagCloseBuffer.append("/>");
- } else {
- tagCloseBuffer.append(">");
- }
-
- /* If starting on new line, write the tag open buffer. */
- if (this.startTagOnNewLine()) {
- this.queue.flush();
- write(newLine());
- if (this.shouldIndent()) {
- write(indent());
- }
- write(tagOpenBuffer.toString());
- } else {
- /* Otherwise queue it up. */
- this.queue.add(tagOpenBuffer.toString());
- }
-
- /* Queue up the attributes and tag close. */
- this.queue.add(attributesBuffer.toString()
- + tagCloseBuffer.toString());
- }
-
- /**
- * Indicates whether the top element in the stack should be indented.
- * @return True iff the top element in the stack should be indented.
- */
- private boolean shouldIndent() {
- if (! this.elementStack.topIsBlockElement()) {
- return false;
- }
- if (this.elementStack.topIsInsideMixedContent()) {
- return this.indentBlocksInsideMixedContent;
- }
- /* It is a block element, not inside mixed content. Indent it. */
- return true;
- }
-
- /**
- * Returns what should be written at the end of a line.
- * @return The String content that should be written at the end of a line.
- */
- private String newLine() {
- return this.lineTerminator;
- }
-
- /**
- * Returns what should be written to indent a line.
- * @return The String content that should be written to indent a line.
- */
- private String indent() {
- int numIndents = currentIndentation() * this.indent;
- final StringBuilder buffer = new StringBuilder();
- while (numIndents > 0) {
- buffer.append(" ");
- numIndents --;
- }
- return buffer.toString();
- }
-
- /**
- * {@inheritDoc}
- */
- public void endElement(final String uri, final String local,
- final String qName) {
- flushCharacters();
-
- if (this.topElementWritten) {
- if (endTagOnNewLine()) {
- this.queue.flush();
- write(newLine());
- write(indent());
- }
- addToQueue("</" + qName + ">");
- if (endTagOnNewLine()) {
- this.queue.flush();
- }
- } else {
- /* Element was empty. */
- ensureTopElementWritten(true);
- }
- if (qName.equals(this.rootElement)) {
- /* Whitespace before and after the end of the root element is
- * discarded by SAX, so we need to control it manually. */
- write(this.postRootText);
- }
- this.elementStack.pop();
- }
-
- /**
- * Determines whether the start tag for the current element should
- * be written on a new line or whether it should be written inside the
- * parent tag.
- * @return True if the start tag for the current element should be written
- * on a new line.
- */
- private boolean startTagOnNewLine() {
- return this.elementStack.topIsBlockElement();
- }
-
- /**
- * Determines whether the end tag for the current element should
- * be written on a new line or whether it should be written immediately
- * after the contents.
- * @return True if the end tag for the current element should be written on
- * a new line.
- */
- private boolean endTagOnNewLine() {
- if (! this.elementStack.topIsBlockElement()) {
- return false;
- }
- /* If the current element contains PCDATA, the end tag should be
- * written in-line instead of on a new line. */
- if (this.elementStack.topHasPCDATA()) {
- return false;
- }
- return true;
- }
-
- /**
- * {@inheritDoc}
- */
- public void characters(final char[] buffer, final int offset,
- final int length) {
- if (this.inEntity) {
- /* Skip these characters. We are writing the unexpanded entity
- * elsewhere. We do not want to also write the expanded version. */
- return;
- }
- this.charBuffer.append(buffer, offset, length);
- }
-
- /**
- * Pushes any character in the buffer into the queue to be written.
- */
- private void flushCharacters() {
- if (this.charBuffer.length() < 1) {
- return;
- }
- ensureTopElementWritten(false);
- if (this.breakPCDATA) {
- /* Note: SAX input has linefeeds normalized to \n. */
- XMLUtil.normalizeWhitespace(this.charBuffer);
- this.queue.add(this.charBuffer.toString());
- } else {
- writeRawPCDATA(this.charBuffer.toString());
- }
- this.charBuffer.setLength(0);
- }
-
- /**
- * Adds some content to the queue.
- * @param string The content to be added.
- */
- private void addToQueue(final String string) {
- if (string == null) {
- return;
- }
- this.queue.add(string);
- }
-
- /**
- * {@inheritDoc}
- */
- public void processingInstruction(final String target, final String data) {
- write(target);
- write(data);
- }
-
- /**
- * {@inheritDoc}
- */
- public void ignorableWhitespace(final char[] buffer, final int offset,
- final int length) {
- /* Ignorable white space is just ignored. */
- }
-
- /**
- * {@inheritDoc}
- */
- public void comment(final char[] buffer, final int offset,
- final int length) {
- if (this.inDTD) {
- return;
- }
- write("<!--");
- final String comment = new String(buffer, offset, length);
- writeRawPCDATA(comment);
- write("-->");
- }
-
- /**
- * {@inheritDoc}
- */
- public void startDTD(final String name, final String publicId,
- final String systemId) {
- write(newLine());
- write("<!DOCTYPE ");
- write(name);
- write(newLine());
- if (publicId != null
- && ! "".equals(publicId)) {
- // Indentation.
- write(" ");
- write("PUBLIC ");
- write("\"" + publicId + "\"");
- write(newLine());
- }
- // Indentation.
- write(" ");
- if (publicId == null) {
- write("SYSTEM ");
- }
- write("\"" + systemId + "\"");
- write(">");
- write(newLine());
- this.inDTD = true;
- this.rootElement = name;
- }
-
- /**
- * {@inheritDoc}
- */
- public void endDTD() {
- this.inDTD = false;
- }
-
- /**
- * {@inheritDoc}
- */
- public void startEntity(final String name) {
- if (this.inDTD) {
- return;
- }
- /* Assumes for now that all are general entities. */
- this.charBuffer.append("&");
- this.charBuffer.append(name);
- this.charBuffer.append(";");
- this.inEntity = true;
- }
-
- /**
- * {@inheritDoc}
- */
- public void endEntity(final String name) {
- this.inEntity = false;
- }
-
- /**
- * {@inheritDoc}
- */
- public void elementDecl(final String name, final String model) {
- final DTDElement dtdElement = new DTDElement(name, model);
- this.dtd.addElement(dtdElement);
- }
-
- /**
- * Use this method if the content may contain \n characters that need to be
- * converted to the output line-ending.
- * SAX converts all line-endings, regardless of platform, to \n.
- * Do not use this method for output that has specified line-endings in it,
- * as that may result in the conversion of \r\n to \r\r\n, for example.
- * @param outputString The String that should be written.
- */
- private void writeRawPCDATA(final String outputString) {
- if (this.lineTerminator.equals("\n")) {
- /* The specified line terminator is the same as that used in the
- * input. Just write it. */
- write(outputString);
- return;
- }
- final int lastLineBreakIndex = outputString.lastIndexOf("\n");
- if (lastLineBreakIndex < 0) {
- /* No line breaks in what is being written. Just write it. */
- write(outputString);
- return;
- }
- final StringBuilder buffer = new StringBuilder(outputString);
- int bufferIndex = 0;
- while (bufferIndex < buffer.length()) {
- if (buffer.charAt(bufferIndex) == '\n') {
- buffer.replace(bufferIndex, bufferIndex + 1,
- this.lineTerminator);
- bufferIndex += this.lineTerminator.length();
- } else {
- bufferIndex ++;
- }
- }
- write(buffer.toString());
- }
-
- /**
- * Writes an output String.
- * @param outputString The output to be written.
- */
- private void write(final String outputString) {
- if (outputString == null) {
- return;
- }
- if (outputString.length() < 1) {
- return;
- }
- try {
- this.output.write(outputString.getBytes(this.outputEncoding));
- /* Following line for debugging only */
- this.output.flush();
- } catch (final IOException e) {
- logError("Error converting text.");
- }
- final int lastLineBreakIndex = outputString.lastIndexOf(
- this.lineTerminator);
- if (lastLineBreakIndex < 0) {
- /* No line breaks in what is being written. Increment the current
- * column by the length of outputString. Note that we want the
- * count of characters, not bytes, here. */
- this.lastColumnWritten += outputString.length();
- } else {
- this.lastColumnWritten = outputString.length() - lastLineBreakIndex
- - this.lineTerminator.length();
- }
- }
-
- /**
- * Returns the logger.
- * @return The logger.
- */
- public Log getLogger() {
- if (this.logger == null) {
- this.logger = new FOrayLogger("FOray Pretty Print");
- }
- return this.logger;
- }
-
- /**
- * Convenience method to log an error.
- * @param message The message to be logged.
- */
- private void logError(final String message) {
- if (this.locator != null) {
- this.getLogger().error(this.locator.getSystemId() + ":"
- + this.locator.getLineNumber() + ":"
- + this.locator.getColumnNumber());
- }
- this.getLogger().error(message);
- }
-
- /**
- * Compute the current indentation level.
- * @return The number of indents for the current state. This is the number
- * of levels that should be indented, not necessarily the number of spaces.
- */
- private int currentIndentation() {
- return this.elementStack.size() - 1;
- }
-
- /**
- * Private inner class for the queue of unprocessed document pieces.
- */
- private class Queue {
-
- /** Collection of Strings that need to be written as soon as we know
- * enough of what comes after them to choose line breaks. This is needed
- * for PCDATA and inline tags that must stay on the current line.
- * It is tempting to turn this all into one long StringBuffer, but we
- * need to handle attributes differently from PCDATA. */
- private List<String> toWriteQueue = new ArrayList<String>();
-
- /** After running listBreakOpportunities, this array, along with
- * {@link #breakOpportunityIndexes}, holds a list of
- * break opportunities. This array contains a list of items in
- * toWriteQueue. */
- private int[] breakOpportunityItems;
-
- /** After running listBreakOpportunities, this array, along with
- * {@link #breakOpportunityItems}, holds a list of
- * break opportunities. This array points to a specific character
- * in the "items" array. */
- private int[] breakOpportunityIndexes;
-
- /** List of Integer indexes into the breakOpportunity arrays that
- * indicate which opportunities have actually been chosen. */
- private List<Integer> breaksChosen = new ArrayList<Integer>();
-
- /**
- * Constructor.
- */
- Queue() {
- }
-
- /**
- * Flushes all items out of the queue by writing them.
- */
- private void flush() {
- if (attemptWriteAll()) {
- return;
- }
- this.listBreakOpportunities();
- this.chooseBreaks();
- this.writeChosenChunks();
- this.reset();
- }
-
- /**
- * Computes the places in the queue where line breaks should occur.
- */
- private void chooseBreaks() {
- this.breaksChosen.clear();
-
- if (this.breakOpportunityIndexes.length < 1) {
- return;
- }
-
- /* Loop one extra time to catch the last chunk....
[truncated message content] |
|
From: <vic...@us...> - 2010-03-19 18:10:27
|
Revision: 10987
http://foray.svn.sourceforge.net/foray/?rev=10987&view=rev
Author: victormote
Date: 2010-03-19 18:10:21 +0000 (Fri, 19 Mar 2010)
Log Message:
-----------
Additional changes related to rename of project foray-pretty to foray-xml.
Modified Paths:
--------------
trunk/foray/doc/web/00-rsrc/include/leftmenu-module.html
trunk/foray/doc/web/app/using/build.html
trunk/foray/doc/web/module/index.html
trunk/foray/foray-font/scripts/build.xml
trunk/foray/foray-xml/scripts/build.xml
trunk/foray/scripts/build.xml
Added Paths:
-----------
trunk/foray/doc/web/module/xml/
Removed Paths:
-------------
trunk/foray/doc/web/module/pretty/
Modified: trunk/foray/doc/web/00-rsrc/include/leftmenu-module.html
===================================================================
--- trunk/foray/doc/web/00-rsrc/include/leftmenu-module.html 2010-03-19 17:29:57 UTC (rev 10986)
+++ trunk/foray/doc/web/00-rsrc/include/leftmenu-module.html 2010-03-19 18:10:21 UTC (rev 10987)
@@ -59,7 +59,7 @@
<tr>
<td class="Bullet1"> </td>
<td class="Menu1">
- <a class="Menu" href="/module/pretty/">FOray Pretty</a>
+ <a class="Menu" href="/module/pretty/">FOray XML Utility</a>
</td>
</tr>
<tr>
Modified: trunk/foray/doc/web/app/using/build.html
===================================================================
--- trunk/foray/doc/web/app/using/build.html 2010-03-19 17:29:57 UTC (rev 10986)
+++ trunk/foray/doc/web/app/using/build.html 2010-03-19 18:10:21 UTC (rev 10987)
@@ -103,7 +103,7 @@
"package" target.
So for the example above, run "ant clean font fotree package".</p>
-<p>The module targets available are: common, pretty, ps, graphic, mif, font,
+<p>The module targets available are: common, xml, ps, graphic, mif, font,
hyphen, text, pdf, fotree, areatree, output, layout, pioneer, render, core,
app.
For more information on the meaning of these targets, see
Modified: trunk/foray/doc/web/module/index.html
===================================================================
--- trunk/foray/doc/web/module/index.html 2010-03-19 17:29:57 UTC (rev 10986)
+++ trunk/foray/doc/web/module/index.html 2010-03-19 18:10:21 UTC (rev 10987)
@@ -85,16 +85,16 @@
<td>Universals.</td>
</tr>
<tr>
- <td><a class="Menu" href="./pretty/">FOrayPretty</a></td>
- <td>foray-pretty</td>
- <td>Classes for pretty-printing XML output.</td>
+ <td><a class="Menu" href="./xml/">FOrayXML</a></td>
+ <td>foray-xml</td>
+ <td>XML utility classes for things like pretty-printing XML output.</td>
<td>Universals.</td>
</tr>
<tr>
<td><a class="Menu" href="./font/">FOrayFont</a></td>
<td>foray-font</td>
<td>An axslFont-compliant module for handling fonts.</td>
- <td>Universals, FOrayPretty.</td>
+ <td>Universals, FOrayXML.</td>
</tr>
<tr>
<td><a class="Menu" href="./hyphen/">FOrayHyphen</a></td>
@@ -204,7 +204,7 @@
and it specifically exists to allow all of the FOray modules to use the same
basic tools.
It is not really intended for use as an independent package.</li>
- <li>FOrayPretty is also a utility-type package, and also is not intended for
+ <li>FOrayXML is also a utility-type package, and also is not intended for
use as an independent package.</li>
<li>The relationship between FOrayOutput and FOrayRender is that of a
superentity to a subentity.
Modified: trunk/foray/foray-font/scripts/build.xml
===================================================================
--- trunk/foray/foray-font/scripts/build.xml 2010-03-19 17:29:57 UTC (rev 10986)
+++ trunk/foray/foray-font/scripts/build.xml 2010-03-19 18:10:21 UTC (rev 10987)
@@ -41,7 +41,7 @@
<include name="commons-discovery-*.jar"/>
<include name="xml-apis*.jar"/>
</fileset>
- <fileset dir="${foray.sandbox}/foray-pretty/build/ant">
+ <fileset dir="${foray.sandbox}/foray-xml/build/ant">
<include name="*.jar"/>
</fileset>
<fileset dir="${foray.sandbox}/foray-common/build/ant">
Modified: trunk/foray/foray-xml/scripts/build.xml
===================================================================
--- trunk/foray/foray-xml/scripts/build.xml 2010-03-19 17:29:57 UTC (rev 10986)
+++ trunk/foray/foray-xml/scripts/build.xml 2010-03-19 18:10:21 UTC (rev 10987)
@@ -9,7 +9,7 @@
<!-- Initialization target -->
<!-- =================================================================== -->
<target name="init" depends="env, common-init">
- <property name="module" value="pretty"/>
+ <property name="module" value="xml"/>
<property name="module.dir" value="${foray.sandbox}/foray-${module}"/>
<property name="src.dir" value="${module.dir}/src/java"/>
<property name="build.dir" value="${module.dir}/build/ant"/>
@@ -91,16 +91,16 @@
<echo message="Producing the javadoc files "/>
<mkdir dir="${build.dir}/javadoc-api"/>
<javadoc
- packagenames="org.foray.pretty"
+ packagenames="org.foray.xml"
sourcepath="${src.dir}/java"
destdir="${build.dir}/javadoc-api"
classpathref="libs-build-classpath"
author="true"
version="true"
- windowtitle="FOray Pretty API"
- doctitle="FOray Pretty API"
+ windowtitle="FOray XML Utilities API"
+ doctitle="FOray XML Utilities API"
bottom="Copyright © 2006 The FOray Project. All Rights Reserved."
- overview="${src.dir}/java/org/foray/pretty/overview.html"
+ overview="${src.dir}/java/org/foray/xml/overview.html"
use="true"
access="public"
failonerror="true">
Modified: trunk/foray/scripts/build.xml
===================================================================
--- trunk/foray/scripts/build.xml 2010-03-19 17:29:57 UTC (rev 10986)
+++ trunk/foray/scripts/build.xml 2010-03-19 18:10:21 UTC (rev 10987)
@@ -29,11 +29,11 @@
<fileset dir="${foray.sandbox}/foray-output/build/ant" includes="foray*.jar"/>
<fileset dir="${foray.sandbox}/foray-pdf/build/ant" includes="foray*.jar"/>
<fileset dir="${foray.sandbox}/foray-pioneer/build/ant" includes="foray*.jar"/>
- <fileset dir="${foray.sandbox}/foray-pretty/build/ant" includes="foray*.jar"/>
<fileset dir="${foray.sandbox}/foray-ps/build/ant" includes="foray*.jar"/>
<fileset dir="${foray.sandbox}/foray-render/build/ant" includes="foray*.jar"/>
<fileset dir="${foray.sandbox}/foray-speech/build/ant" includes="foray*.jar"/>
<fileset dir="${foray.sandbox}/foray-text/build/ant" includes="foray*.jar"/>
+ <fileset dir="${foray.sandbox}/foray-xml/build/ant" includes="foray*.jar"/>
</path>
<path id="test.jars">
@@ -50,11 +50,11 @@
<fileset dir="${foray.sandbox}/foray-output/build/ant" includes="test*.jar"/>
<fileset dir="${foray.sandbox}/foray-pdf/build/ant" includes="test*.jar"/>
<fileset dir="${foray.sandbox}/foray-pioneer/build/ant" includes="test*.jar"/>
- <fileset dir="${foray.sandbox}/foray-pretty/build/ant" includes="test*.jar"/>
<fileset dir="${foray.sandbox}/foray-ps/build/ant" includes="test*.jar"/>
<fileset dir="${foray.sandbox}/foray-render/build/ant" includes="test*.jar"/>
<fileset dir="${foray.sandbox}/foray-speech/build/ant" includes="test*.jar"/>
<fileset dir="${foray.sandbox}/foray-text/build/ant" includes="test*.jar"/>
+ <fileset dir="${foray.sandbox}/foray-xml/build/ant" includes="test*.jar"/>
</path>
</target>
@@ -67,7 +67,7 @@
<echo message="Preparing the build directories"/>
<mkdir dir="${build.dir}"/>
<mkdir dir="${foray.sandbox}/foray-common/build/ant/classes"/>
- <mkdir dir="${foray.sandbox}/foray-pretty/build/ant/classes"/>
+ <mkdir dir="${foray.sandbox}/foray-xml/build/ant/classes"/>
<mkdir dir="${foray.sandbox}/foray-graphic/build/ant/classes"/>
<mkdir dir="${foray.sandbox}/foray-mif/build/ant/classes"/>
<mkdir dir="${foray.sandbox}/foray-ps/build/ant/classes"/>
@@ -118,8 +118,8 @@
dir="${foray.sandbox}/foray-common/build/ant/classes">
<include name="**"/>
</fileset>
- <fileset id="foray-pretty-classes"
- dir="${foray.sandbox}/foray-pretty/build/ant/classes">
+ <fileset id="foray-xml-classes"
+ dir="${foray.sandbox}/foray-xml/build/ant/classes">
<include name="**"/>
</fileset>
<fileset id="foray-graphic-classes"
@@ -190,7 +190,7 @@
<echo message="Creating the jar file ${app.jar.name}"/>
<jar jarfile="${app.jar.path}">
<fileset refid="foray-common-classes"/>
- <fileset refid="foray-pretty-classes"/>
+ <fileset refid="foray-xml-classes"/>
<fileset refid="foray-graphic-classes"/>
<fileset refid="foray-mif-classes"/>
<fileset refid="foray-ps-classes"/>
@@ -410,7 +410,7 @@
<sourcepath>
<pathelement path="${foray.sandbox}/foray-app/src/java"/>
<pathelement path="${foray.sandbox}/foray-core/src/java"/>
- <pathelement path="${foray.sandbox}/foray-pretty/src/java"/>
+ <pathelement path="${foray.sandbox}/foray-xml/src/java"/>
<pathelement path="${foray.sandbox}/foray-common/src/java"/>
<pathelement path="${foray.sandbox}/foray-ps/src/java"/>
<pathelement path="${foray.sandbox}/foray-graphic/src/java"/>
@@ -521,9 +521,9 @@
<package name="org.foray.render"/>
<package name="org.foray.render.*"/>
</group>
- <group title="The FOray Pretty Module">
- <package name="org.foray.pretty"/>
- <package name="org.foray.pretty.*"/>
+ <group title="The FOray XML Module">
+ <package name="org.foray.xml"/>
+ <package name="org.foray.xml.*"/>
</group>
</javadoc>
</target>
@@ -557,7 +557,7 @@
inheritall="false"
target="clean"/>
- <ant antfile="${foray.sandbox}/foray-pretty/scripts/build.xml"
+ <ant antfile="${foray.sandbox}/foray-xml/scripts/build.xml"
inheritall="false"
target="clean"/>
@@ -633,7 +633,7 @@
<ant antfile="${foray.sandbox}/foray-common/scripts/build.xml"
inheritall="false"
target="style"/>
- <ant antfile="${foray.sandbox}/foray-pretty/scripts/build.xml"
+ <ant antfile="${foray.sandbox}/foray-xml/scripts/build.xml"
inheritall="false"
target="style"/>
<ant antfile="${foray.sandbox}/foray-ps/scripts/build.xml"
@@ -699,12 +699,12 @@
</target>
<!-- =================================================================== -->
- <!-- Build the Pretty module -->
+ <!-- Build the XML module -->
<!-- =================================================================== -->
- <target name="pretty" depends="common"
- description="Compile the pretty module">
- <property name="module.pretty" value=", pretty"/>
- <ant antfile="${foray.sandbox}/foray-pretty/scripts/build.xml"
+ <target name="xml" depends="common"
+ description="Compile the xml module">
+ <property name="module.xml" value=", xml"/>
+ <ant antfile="${foray.sandbox}/foray-xml/scripts/build.xml"
inheritall="false"
target="style">
<property name="foray.config" value="${foray.config}"/>
@@ -753,7 +753,7 @@
<!-- =================================================================== -->
<!-- Build the Font module -->
<!-- =================================================================== -->
- <target name="font" depends="ps, pretty"
+ <target name="font" depends="ps, xml"
description="Compile the font module">
<property name="module.font" value=", font"/>
<ant antfile="${foray.sandbox}/foray-font/scripts/build.xml"
@@ -907,7 +907,7 @@
<!-- ===================================================================
Build the App module (unadvertised)
=================================================================== -->
- <target name="app" depends="prepare, pretty, ps, graphic, mif, font, hyphen,
+ <target name="app" depends="prepare, xml, ps, graphic, mif, font, hyphen,
speech, text, pdf, fotree, areatree, pioneer, render, core">
<property name="module.app" value=", app"/>
<property name="file.subset" value="-all"/>
@@ -927,7 +927,7 @@
that some value is set for each of them. If they have already been set,
this will have no effect. -->
<property name="module.common" value=""/>
- <property name="module.pretty" value=""/>
+ <property name="module.xml" value=""/>
<property name="module.ps" value=""/>
<property name="module.graphic" value=""/>
<property name="module.mif" value=""/>
@@ -947,7 +947,7 @@
<!-- Subgroupings (for readability here only) -->
<property name="module.list1"
- value="${module.common}${module.pretty}${module.ps}${module.graphic}"/>
+ value="${module.common}${module.xml}${module.ps}${module.graphic}"/>
<property name="module.list2"
value="${module.mif}${module.font}${module.hyphen}${module.text}"/>
<property name="module.list3"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2010-03-19 18:22:18
|
Revision: 10988
http://foray.svn.sourceforge.net/foray/?rev=10988&view=rev
Author: victormote
Date: 2010-03-19 18:22:11 +0000 (Fri, 19 Mar 2010)
Log Message:
-----------
Additional changes related to rename of project foray-pretty to foray-xml.
Modified Paths:
--------------
trunk/foray/doc/web/00-rsrc/include/leftmenu-module.html
trunk/foray/doc/web/module/xml/index.html
trunk/foray/foray-xml/src/java/org/foray/xml/package-info.java
trunk/foray/scripts/foray-pretty.bat
Modified: trunk/foray/doc/web/00-rsrc/include/leftmenu-module.html
===================================================================
--- trunk/foray/doc/web/00-rsrc/include/leftmenu-module.html 2010-03-19 18:10:21 UTC (rev 10987)
+++ trunk/foray/doc/web/00-rsrc/include/leftmenu-module.html 2010-03-19 18:22:11 UTC (rev 10988)
@@ -59,7 +59,7 @@
<tr>
<td class="Bullet1"> </td>
<td class="Menu1">
- <a class="Menu" href="/module/pretty/">FOray XML Utility</a>
+ <a class="Menu" href="/module/xml/">FOray XML Utility</a>
</td>
</tr>
<tr>
Modified: trunk/foray/doc/web/module/xml/index.html
===================================================================
--- trunk/foray/doc/web/module/xml/index.html 2010-03-19 18:10:21 UTC (rev 10987)
+++ trunk/foray/doc/web/module/xml/index.html 2010-03-19 18:22:11 UTC (rev 10988)
@@ -6,7 +6,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
- <title>FOray Modules: Pretty</title>
+ <title>FOray Modules: XML Utilities</title>
<meta name="content-revised"
content="$Date$"/>
<!--#include virtual="/00-rsrc/include/standard-head.html" -->
@@ -15,7 +15,7 @@
<body>
<!--#include virtual="/00-rsrc/include/leftmenu-module.html" -->
-<h1>FOray Modules: Pretty</h1>
+<h1>FOray Modules: XML Utilities</h1>
<h2>Contents</h2>
<ul>
@@ -23,7 +23,7 @@
</ul>
<h2><a name="intro" id="intro"/>Introduction</h2>
-<p>The FOray Pretty module provides some classes for pretty-printing XML
+<p>The FOray XML module provides some classes for pretty-printing XML
documents so that they are more readable by humans.
It is used by some other FOray modules that provide XML output, but can also
be used as standalone module for other applications.
Modified: trunk/foray/foray-xml/src/java/org/foray/xml/package-info.java
===================================================================
--- trunk/foray/foray-xml/src/java/org/foray/xml/package-info.java 2010-03-19 18:10:21 UTC (rev 10987)
+++ trunk/foray/foray-xml/src/java/org/foray/xml/package-info.java 2010-03-19 18:22:11 UTC (rev 10988)
@@ -27,7 +27,7 @@
*/
/**
- * <p>Classes for pretty-printing XML documents.</p>
+ * <p>XML utility classes for things like pretty-printing XML documents.</p>
*/
package org.foray.xml;
Modified: trunk/foray/scripts/foray-pretty.bat
===================================================================
--- trunk/foray/scripts/foray-pretty.bat 2010-03-19 18:10:21 UTC (rev 10987)
+++ trunk/foray/scripts/foray-pretty.bat 2010-03-19 18:22:11 UTC (rev 10988)
@@ -17,7 +17,7 @@
rem Call an external script in a loop to add the lib jar files to the classpath.
for %%f in (%FORAY_HOME%\lib\*.jar) do call foray-cp-append.bat %%f
-set CLASS=org.foray.pretty.FOrayPretty
+set CLASS=org.foray.xml.FOrayPretty
set TEMP_NAME=pretty.xml
@@ -33,7 +33,7 @@
:verify
rem Make sure the pretty-printed version has the same content as original.
echo Comparing content for unintended changes during pretty-print.
-set CLASS=org.foray.pretty.FOrayXDiff
+set CLASS=org.foray.xml.FOrayXDiff
set COMMAND=java -cp %FORAY_CP% %CLASS% --files %INPUT_NAME% %TEMP_NAME% --catalog %CATALOG%
%COMMAND%
echo End comparison.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2010-03-19 18:46:56
|
Revision: 10989
http://foray.svn.sourceforge.net/foray/?rev=10989&view=rev
Author: victormote
Date: 2010-03-19 18:46:49 +0000 (Fri, 19 Mar 2010)
Log Message:
-----------
Clean up some Java 6 compiler warnings.
Modified Paths:
--------------
trunk/foray/foray-app/src/java/org/foray/app/ant/FOrayAntTaskStarter.java
trunk/foray/foray-app/src/java/org/foray/app/test/TestConverter.java
trunk/foray/foray-app/src/java/org/foray/demo/embed/DemoAWTViewer.java
trunk/foray/foray-app/src/java/org/foray/demo/embed/DemoFO2PDF.java
trunk/foray/foray-app/src/javatest/org/foray/app/fo/FoDocumentReader.java
trunk/foray/foray-common/src/javatest/org/foray/common/TestXMLUtil.java
trunk/foray/foray-font/src/java/org/foray/font/ConfigGenerator.java
trunk/foray/foray-font/src/java/org/foray/font/ConfigParser.java
Modified: trunk/foray/foray-app/src/java/org/foray/app/ant/FOrayAntTaskStarter.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/ant/FOrayAntTaskStarter.java 2010-03-19 18:22:11 UTC (rev 10988)
+++ trunk/foray/foray-app/src/java/org/foray/app/ant/FOrayAntTaskStarter.java 2010-03-19 18:46:49 UTC (rev 10989)
@@ -215,12 +215,11 @@
try {
if (this.task.getBasedir() != null) {
this.sessionConfig.parseOption("base-directory",
- this.task.getBasedir().toURL().toExternalForm(),
+ this.task.getBasedir().toURI().toURL().toExternalForm(),
SessionConfig.PRECEDENCE_DEFAULT);
} else {
this.sessionConfig.parseOption("base-directory",
- fs.getDir(this.task.getProject()).toURL().
- toExternalForm(),
+ fs.getDir(this.task.getProject()).toURI().toURL().toExternalForm(),
SessionConfig.PRECEDENCE_DEFAULT);
}
this.task.log("Using base directory: " +
@@ -267,7 +266,7 @@
}
URL url = null;
try {
- url = newBaseDirectory.toURL();
+ url = newBaseDirectory.toURI().toURL();
} catch (final MalformedURLException e) {
this.task.log("FOrayAntTask base directory is invalid:\n"
+ e, Project.MSG_ERR);
@@ -289,7 +288,7 @@
throws FOrayException {
InputSource inputSource;
try {
- inputSource = new InputSource(foFile.toURL().openStream());
+ inputSource = new InputSource(foFile.toURI().toURL().openStream());
} catch (final MalformedURLException e) {
throw new FOrayException(e);
} catch (final IOException e) {
Modified: trunk/foray/foray-app/src/java/org/foray/app/test/TestConverter.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/test/TestConverter.java 2010-03-19 18:22:11 UTC (rev 10988)
+++ trunk/foray/foray-app/src/java/org/foray/app/test/TestConverter.java 2010-03-19 18:46:49 UTC (rev 10989)
@@ -318,7 +318,7 @@
try {
configuration.parseOption("base-directory",
- xmlFile.getParentFile().toURL().toExternalForm(),
+ xmlFile.getParentFile().toURI().toURL().toExternalForm(),
SessionConfig.PRECEDENCE_DEFAULT);
} catch (final IOException e) {
this.log.error("Error setting base directory");
@@ -332,10 +332,10 @@
FOrayDocument document = null;
if (xsl == null) {
InputSource inputSource = null;
- inputSource = new InputSource(xmlFile.toURL().openStream());
+ inputSource = new InputSource(xmlFile.toURI().toURL().openStream());
document = new FOrayDocument(session, inputSource, null);
} else {
- document = new FOrayDocument(session, xmlFile.toURL(),
+ document = new FOrayDocument(session, xmlFile.toURI().toURL(),
URLFactory.createURL(this.baseDir + "/" + xsl));
}
Modified: trunk/foray/foray-app/src/java/org/foray/demo/embed/DemoAWTViewer.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/demo/embed/DemoAWTViewer.java 2010-03-19 18:22:11 UTC (rev 10988)
+++ trunk/foray/foray-app/src/java/org/foray/demo/embed/DemoAWTViewer.java 2010-03-19 18:46:49 UTC (rev 10989)
@@ -196,7 +196,7 @@
app.getLogger().info("Starting AWT Viewer...");
try {
- app.viewFO(fofile.toURL());
+ app.viewFO(fofile.toURI().toURL());
app.getLogger().info("Success!");
} catch (final FOrayException e) {
app.getLogger().error("Demo AWT Viewer Error", e);
Modified: trunk/foray/foray-app/src/java/org/foray/demo/embed/DemoFO2PDF.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/demo/embed/DemoFO2PDF.java 2010-03-19 18:22:11 UTC (rev 10988)
+++ trunk/foray/foray-app/src/java/org/foray/demo/embed/DemoFO2PDF.java 2010-03-19 18:46:49 UTC (rev 10989)
@@ -109,7 +109,7 @@
app.getLogger().info("Transforming...");
try {
- app.convertFO2PDF(fofile.toURL(), pdffile);
+ app.convertFO2PDF(fofile.toURI().toURL(), pdffile);
} catch (final FOrayException e) {
app.getLogger().error("Demo FO to PDF Error", e);
System.exit(-1);
Modified: trunk/foray/foray-app/src/javatest/org/foray/app/fo/FoDocumentReader.java
===================================================================
--- trunk/foray/foray-app/src/javatest/org/foray/app/fo/FoDocumentReader.java 2010-03-19 18:22:11 UTC (rev 10988)
+++ trunk/foray/foray-app/src/javatest/org/foray/app/fo/FoDocumentReader.java 2010-03-19 18:46:49 UTC (rev 10989)
@@ -95,7 +95,7 @@
final TextServer textServer = FOraySpecific.makeTextServer(logger,
hyphenServer);
final URL[] graphicSearchPath = new URL[1];
- final URL testDirUrl = this.testDirectory.toURL();
+ final URL testDirUrl = this.testDirectory.toURI().toURL();
graphicSearchPath[0] = URLFactory.createURL(testDirUrl, "fo/");
final boolean cachingGraphics = false;
Modified: trunk/foray/foray-common/src/javatest/org/foray/common/TestXMLUtil.java
===================================================================
--- trunk/foray/foray-common/src/javatest/org/foray/common/TestXMLUtil.java 2010-03-19 18:22:11 UTC (rev 10988)
+++ trunk/foray/foray-common/src/javatest/org/foray/common/TestXMLUtil.java 2010-03-19 18:46:49 UTC (rev 10989)
@@ -53,7 +53,7 @@
final File sandbox = TestFOrayCommon.getSandbox();
final File graphicsDir = new File(sandbox, "resource/fo-examples/graphics");
final File testFile = new File(graphicsDir, "mathml-example-1.xml");
- final URL url = testFile.toURL();
+ final URL url = testFile.toURI().toURL();
final LSResourceResolver resourceResolver = MathMLUtil.getMathMLDtdResourceResolver();
final Document document = XMLUtil.urlToDom(url, resourceResolver);
assertNotNull(document);
Modified: trunk/foray/foray-font/src/java/org/foray/font/ConfigGenerator.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/ConfigGenerator.java 2010-03-19 18:22:11 UTC (rev 10988)
+++ trunk/foray/foray-font/src/java/org/foray/font/ConfigGenerator.java 2010-03-19 18:46:49 UTC (rev 10989)
@@ -299,7 +299,7 @@
}
URL url = null;
try {
- url = file.toURL();
+ url = file.toURI().toURL();
} catch (final MalformedURLException e) {
getLogger().error("Unable to create URL:\n " + file.getAbsolutePath());
this.failureCount ++;
Modified: trunk/foray/foray-font/src/java/org/foray/font/ConfigParser.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/ConfigParser.java 2010-03-19 18:22:11 UTC (rev 10988)
+++ trunk/foray/foray-font/src/java/org/foray/font/ConfigParser.java 2010-03-19 18:46:49 UTC (rev 10989)
@@ -702,7 +702,7 @@
final File dir = new File(directory);
try {
if (dir.isDirectory()) {
- this.currentXMLBase = dir.toURL();
+ this.currentXMLBase = dir.toURI().toURL();
} else {
this.currentXMLBase = URLFactory.createURL(directory);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2010-05-04 21:06:03
|
Revision: 10992
http://foray.svn.sourceforge.net/foray/?rev=10992&view=rev
Author: victormote
Date: 2010-05-04 21:05:56 +0000 (Tue, 04 May 2010)
Log Message:
-----------
Change name of axsl projects to conform to the maven names now used.
Modified Paths:
--------------
trunk/foray/foray-app/.classpath
trunk/foray/foray-areatree/.classpath
trunk/foray/foray-common/.classpath
trunk/foray/foray-core/.classpath
trunk/foray/foray-font/.classpath
trunk/foray/foray-fotree/.classpath
trunk/foray/foray-graphic/.classpath
trunk/foray/foray-hyphen/.classpath
trunk/foray/foray-layout/.classpath
trunk/foray/foray-mif/.classpath
trunk/foray/foray-output/.classpath
trunk/foray/foray-pdf/.classpath
trunk/foray/foray-pioneer/.classpath
trunk/foray/foray-ps/.classpath
trunk/foray/foray-render/.classpath
trunk/foray/foray-speech/.classpath
trunk/foray/foray-text/.classpath
Modified: trunk/foray/foray-app/.classpath
===================================================================
--- trunk/foray/foray-app/.classpath 2010-03-23 00:32:52 UTC (rev 10991)
+++ trunk/foray/foray-app/.classpath 2010-05-04 21:05:56 UTC (rev 10992)
@@ -8,23 +8,12 @@
<classpathentry kind="src" path="/FOrayRender"/>
<classpathentry kind="src" path="/FOrayAreaTree"/>
<classpathentry kind="src" path="/FOrayPioneer"/>
- <classpathentry kind="src" path="/axslFont"/>
- <classpathentry kind="src" path="/axslGraphic"/>
- <classpathentry kind="src" path="/axslGalley"/>
<classpathentry kind="src" path="/FOrayOutput"/>
- <classpathentry kind="src" path="/axslFoTree"/>
- <classpathentry kind="src" path="/axslCommon"/>
- <classpathentry kind="src" path="/axslText"/>
<classpathentry kind="src" path="/FOrayText"/>
<classpathentry kind="src" path="/FOrayFOTree"/>
- <classpathentry kind="src" path="/axslPdf"/>
<classpathentry combineaccessrules="false" kind="src" path="/FOrayPDF"/>
- <classpathentry combineaccessrules="false" kind="src" path="/axslAreaTree"/>
<classpathentry combineaccessrules="false" kind="src" path="/FOrayLayout"/>
- <classpathentry combineaccessrules="false" kind="src" path="/axslLayout"/>
<classpathentry combineaccessrules="false" kind="src" path="/FOrayCore"/>
- <classpathentry combineaccessrules="false" kind="src" path="/axslOutput"/>
- <classpathentry combineaccessrules="false" kind="src" path="/axslHyphen"/>
<classpathentry combineaccessrules="false" kind="src" path="/FOrayHyphen"/>
<classpathentry combineaccessrules="false" kind="src" path="/FOrayPS"/>
<classpathentry kind="lib" path="/FOray Lib/resolver.jar"/>
@@ -32,15 +21,26 @@
<classpathentry kind="lib" path="/FOray Lib/xalan-2.4.1.jar"/>
<classpathentry kind="lib" path="/FOray Lib/xercesImpl-2.7.1.jar" sourcepath="/FOray Lib-Build/xerces/Xerces-J-src.2.7.1.zip"/>
<classpathentry kind="lib" path="/FOray Lib/commons-logging-1.1.jar" sourcepath="/FOray Lib-Build/commons-logging/commons-logging-1.1-src.zip"/>
- <classpathentry combineaccessrules="false" kind="src" path="/axslSpeech"/>
<classpathentry combineaccessrules="false" kind="src" path="/FOraySpeech"/>
<classpathentry kind="lib" path="/FOray Lib-Build/ant/ant.jar" sourcepath="/FOray Lib-Build/ant/ant-src.zip"/>
<classpathentry kind="lib" path="/FOray Lib-Build/junit/junit-4.4.jar" sourcepath="/FOray Lib-Build/junit/junit-4.4-src.jar"/>
<classpathentry kind="lib" path="/FOray Lib/commons-io-1.4.jar" sourcepath="/FOray Lib-Build/commons-io/commons-io-1.4-sources.jar"/>
- <classpathentry combineaccessrules="false" kind="src" path="/axslMif"/>
<classpathentry combineaccessrules="false" kind="src" path="/FOrayMIF"/>
- <classpathentry combineaccessrules="false" kind="src" path="/axslPs"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="lib" path="/FOray Lib/commons-cli-1.2.jar" sourcepath="/FOray Lib-Build/commons-cli/commons-cli-1.2-sources.jar"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-area"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-common"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-fo"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-font"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-galley"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-graphic"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-hyphen"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-layout"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-mif"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-output"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-pdf"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-ps"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-speech"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-text"/>
<classpathentry kind="output" path="build/eclipse"/>
</classpath>
Modified: trunk/foray/foray-areatree/.classpath
===================================================================
--- trunk/foray/foray-areatree/.classpath 2010-03-23 00:32:52 UTC (rev 10991)
+++ trunk/foray/foray-areatree/.classpath 2010-05-04 21:05:56 UTC (rev 10992)
@@ -3,16 +3,16 @@
<classpathentry excluding=".#*" kind="src" path="src/java"/>
<classpathentry kind="src" path="src/javatest"/>
<classpathentry kind="src" path="/FOrayCommon"/>
- <classpathentry kind="src" path="/axslFont"/>
- <classpathentry kind="src" path="/axslGraphic"/>
- <classpathentry kind="src" path="/axslGalley"/>
- <classpathentry kind="src" path="/axslFoTree"/>
- <classpathentry kind="src" path="/axslCommon"/>
- <classpathentry kind="src" path="/axslText"/>
- <classpathentry combineaccessrules="false" kind="src" path="/axslAreaTree"/>
<classpathentry kind="lib" path="/FOray Lib/commons-logging-1.1.jar" sourcepath="/FOray Lib-Build/commons-logging/commons-logging-1.1-src.zip"/>
<classpathentry kind="lib" path="/FOray Lib/svg-1.1.jar" sourcepath="/FOray Lib-Build/svg/svg-1.1-src.zip"/>
<classpathentry kind="lib" path="/FOray Lib-Build/junit/junit-4.4.jar" sourcepath="/FOray Lib-Build/junit/junit-4.4-src.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-area"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-common"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-fo"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-font"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-galley"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-graphic"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-text"/>
<classpathentry kind="output" path="build/eclipse"/>
</classpath>
Modified: trunk/foray/foray-common/.classpath
===================================================================
--- trunk/foray/foray-common/.classpath 2010-03-23 00:32:52 UTC (rev 10991)
+++ trunk/foray/foray-common/.classpath 2010-05-04 21:05:56 UTC (rev 10992)
@@ -2,7 +2,6 @@
<classpath>
<classpathentry excluding=".#*" kind="src" path="src/java"/>
<classpathentry kind="src" path="src/javatest"/>
- <classpathentry kind="src" path="/axslCommon"/>
<classpathentry kind="lib" path="/FOray Lib/commons-logging-1.1.jar" sourcepath="/FOray Lib-Build/commons-logging/commons-logging-1.1-src.zip"/>
<classpathentry kind="lib" path="/FOray Lib-Build/junit/junit-4.4.jar" sourcepath="/FOray Lib-Build/junit/junit-4.4-src.jar"/>
<classpathentry kind="lib" path="/FOray Lib/commons-io-1.4.jar" sourcepath="/FOray Lib-Build/commons-io/commons-io-1.4-sources.jar"/>
@@ -10,5 +9,6 @@
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="lib" path="/FOray Lib/xercesImpl-2.7.1.jar" sourcepath="/FOray Lib-Build/xerces/Xerces-J-src.2.7.1.zip"/>
<classpathentry kind="lib" path="/FOray Lib/stax-api-1.0.1.jar" sourcepath="/FOray Lib-Build/stax/stax-src-1.2.0.zip"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-common"/>
<classpathentry kind="output" path="build/eclipse"/>
</classpath>
Modified: trunk/foray/foray-core/.classpath
===================================================================
--- trunk/foray/foray-core/.classpath 2010-03-23 00:32:52 UTC (rev 10991)
+++ trunk/foray/foray-core/.classpath 2010-05-04 21:05:56 UTC (rev 10992)
@@ -2,20 +2,20 @@
<classpath>
<classpathentry kind="src" path="src/java"/>
<classpathentry combineaccessrules="false" kind="src" path="/FOrayCommon"/>
- <classpathentry combineaccessrules="false" kind="src" path="/axslAreaTree"/>
- <classpathentry combineaccessrules="false" kind="src" path="/axslFont"/>
- <classpathentry combineaccessrules="false" kind="src" path="/axslFoTree"/>
- <classpathentry combineaccessrules="false" kind="src" path="/axslGraphic"/>
- <classpathentry combineaccessrules="false" kind="src" path="/axslLayout"/>
- <classpathentry combineaccessrules="false" kind="src" path="/axslText"/>
- <classpathentry combineaccessrules="false" kind="src" path="/axslGalley"/>
- <classpathentry combineaccessrules="false" kind="src" path="/axslOutput"/>
- <classpathentry combineaccessrules="false" kind="src" path="/axslCommon"/>
- <classpathentry combineaccessrules="false" kind="src" path="/axslHyphen"/>
<classpathentry kind="lib" path="/FOray Lib/xercesImpl-2.7.1.jar" sourcepath="/FOray Lib-Build/xerces/Xerces-J-src.2.7.1.zip"/>
<classpathentry kind="lib" path="/FOray Lib/commons-logging-1.1.jar" sourcepath="/FOray Lib-Build/commons-logging/commons-logging-1.1-src.zip"/>
- <classpathentry combineaccessrules="false" kind="src" path="/axslSpeech"/>
<classpathentry kind="lib" path="/FOray Lib/foray-common-0.4-dev-rsrc.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-area"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-common"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-fo"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-font"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-galley"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-graphic"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-hyphen"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-layout"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-output"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-speech"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-text"/>
<classpathentry kind="output" path="build/eclipse"/>
</classpath>
Modified: trunk/foray/foray-font/.classpath
===================================================================
--- trunk/foray/foray-font/.classpath 2010-03-23 00:32:52 UTC (rev 10991)
+++ trunk/foray/foray-font/.classpath 2010-05-04 21:05:56 UTC (rev 10992)
@@ -2,10 +2,7 @@
<classpath>
<classpathentry excluding=".#*" kind="src" path="src/java"/>
<classpathentry kind="src" path="src/javatest"/>
- <classpathentry kind="src" path="/axslFont"/>
<classpathentry kind="src" path="/FOrayCommon"/>
- <classpathentry kind="src" path="/axslPs"/>
- <classpathentry kind="src" path="/axslCommon"/>
<classpathentry combineaccessrules="false" kind="src" path="/FOrayXml"/>
<classpathentry kind="lib" path="/FOray Lib/xercesImpl-2.7.1.jar" sourcepath="/FOray Lib-Build/xerces/Xerces-J-src.2.7.1.zip"/>
<classpathentry kind="lib" path="/FOray Lib/commons-logging-1.1.jar" sourcepath="/FOray Lib-Build/commons-logging/commons-logging-1.1-src.zip"/>
@@ -15,5 +12,8 @@
<classpathentry kind="lib" path="/FOray Lib/commons-discovery-0.4.jar" sourcepath="/FOray Lib-Build/commons-discovery"/>
<classpathentry kind="lib" path="/FOray Lib/foray-font-0.4-rsrc.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-common"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-font"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-ps"/>
<classpathentry kind="output" path="build/eclipse"/>
</classpath>
Modified: trunk/foray/foray-fotree/.classpath
===================================================================
--- trunk/foray/foray-fotree/.classpath 2010-03-23 00:32:52 UTC (rev 10991)
+++ trunk/foray/foray-fotree/.classpath 2010-05-04 21:05:56 UTC (rev 10992)
@@ -3,16 +3,16 @@
<classpathentry kind="src" path="/FOrayCommon"/>
<classpathentry excluding=".#*" kind="src" path="src/java"/>
<classpathentry kind="src" path="src/javatest"/>
- <classpathentry kind="src" path="/axslFont"/>
- <classpathentry kind="src" path="/axslGraphic"/>
- <classpathentry kind="src" path="/axslFoTree"/>
- <classpathentry kind="src" path="/axslCommon"/>
- <classpathentry kind="src" path="/axslText"/>
<classpathentry kind="lib" path="/FOray Lib/commons-logging-1.1.jar" sourcepath="/FOray Lib-Build/commons-logging/commons-logging-1.1-src.zip"/>
<classpathentry kind="lib" path="/FOray Lib/svg-1.1.jar" sourcepath="/FOray Lib-Build/svg/svg-1.1-src.zip"/>
- <classpathentry combineaccessrules="false" kind="src" path="/axslSpeech"/>
<classpathentry kind="lib" path="/FOray Lib/mathml-2.0.jar" sourcepath="/FOray Lib-Build/mathml/mathml-2.0-src.zip"/>
<classpathentry kind="lib" path="/FOray Lib-Build/junit/junit-4.4.jar" sourcepath="/FOray Lib-Build/junit/junit-4.4-src.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-common"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-fo"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-font"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-graphic"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-speech"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-text"/>
<classpathentry kind="output" path="build/eclipse"/>
</classpath>
Modified: trunk/foray/foray-graphic/.classpath
===================================================================
--- trunk/foray/foray-graphic/.classpath 2010-03-23 00:32:52 UTC (rev 10991)
+++ trunk/foray/foray-graphic/.classpath 2010-05-04 21:05:56 UTC (rev 10992)
@@ -3,8 +3,6 @@
<classpathentry kind="src" path="src/java"/>
<classpathentry kind="src" path="src/javatest"/>
<classpathentry kind="src" path="/FOrayCommon"/>
- <classpathentry kind="src" path="/axslGraphic"/>
- <classpathentry kind="src" path="/axslCommon"/>
<classpathentry kind="lib" path="/FOray Lib/commons-logging-1.1.jar" sourcepath="/FOray Lib-Build/commons-logging/commons-logging-1.1-src.zip"/>
<classpathentry kind="lib" path="/FOray Lib/svg-1.1.jar" sourcepath="/FOray Lib-Build/svg/svg-1.1-src.zip"/>
<classpathentry exported="true" kind="lib" path="/FOray Lib/mathml-2.0.jar" sourcepath="/FOray Lib-Build/mathml/mathml-2.0-src.zip"/>
@@ -17,18 +15,20 @@
<classpathentry kind="lib" path="/FOray Lib/batik-1.6-svg-dom.jar" sourcepath="/FOray Lib-Build/batik/batik-1.6-sources.zip"/>
<classpathentry kind="lib" path="/FOray Lib/batik-1.6-dom.jar" sourcepath="/FOray Lib-Build/batik/batik-1.6-sources.zip"/>
<classpathentry kind="lib" path="/FOray Lib/batik-1.6-xml.jar" sourcepath="/FOray Lib-Build/batik/batik-1.6-sources.zip"/>
- <classpathentry combineaccessrules="false" kind="src" path="/axslFont"/>
<classpathentry kind="lib" path="/FOray Lib/batik-1.6-css.jar" sourcepath="/FOray Lib-Build/batik/batik-1.6-sources.zip"/>
<classpathentry kind="lib" path="/FOray Lib/batik-1.6-awt-util.jar" sourcepath="/FOray Lib-Build/batik/batik-1.6-sources.zip"/>
<classpathentry kind="lib" path="/FOray Lib/batik-1.6-ext.jar" sourcepath="/FOray Lib-Build/batik/batik-1.6-sources.zip"/>
- <classpathentry combineaccessrules="false" kind="src" path="/axslPs"/>
<classpathentry kind="lib" path="/FOray Lib/batik-1.6-svggen.jar" sourcepath="/FOray Lib-Build/batik/batik-1.6-sources.zip"/>
<classpathentry kind="lib" path="/FOray Lib/jeuclid-core-3.0.1.jar" sourcepath="/FOray Lib-Build/jeuclid/jeuclid-3.0.1-source.zip"/>
<classpathentry kind="lib" path="/FOray Lib/xmlgraphics-commons-1.2.jar" sourcepath="/FOray Lib-Build/xmlgraphics-commons/xmlgraphics-commons-1.2-src.zip"/>
<classpathentry kind="lib" path="/FOray Lib/xercesImpl-2.7.1.jar" sourcepath="/FOray Lib-Build/xerces/Xerces-J-src.2.7.1.zip"/>
<classpathentry kind="lib" path="/FOray Lib-Build/junit/junit-4.4.jar" sourcepath="/FOray Lib-Build/junit/junit-4.4-src.jar"/>
<classpathentry kind="lib" path="/FOray Lib/commons-io-1.4.jar" sourcepath="/FOray Lib-Build/commons-io/commons-io-1.4-sources.jar"/>
- <classpathentry combineaccessrules="false" kind="src" path="/axslPdf"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-common"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-font"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-graphic"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-pdf"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-ps"/>
<classpathentry kind="output" path="build/eclipse"/>
</classpath>
Modified: trunk/foray/foray-hyphen/.classpath
===================================================================
--- trunk/foray/foray-hyphen/.classpath 2010-03-23 00:32:52 UTC (rev 10991)
+++ trunk/foray/foray-hyphen/.classpath 2010-05-04 21:05:56 UTC (rev 10992)
@@ -3,9 +3,7 @@
<classpathentry excluding=".#*" kind="src" path="src/java"/>
<classpathentry kind="src" path="src/javatest"/>
<classpathentry combineaccessrules="false" kind="src" path="/FOrayCommon"/>
- <classpathentry combineaccessrules="false" kind="src" path="/axslHyphen"/>
<classpathentry kind="lib" path="/FOray Lib/xercesImpl-2.7.1.jar" sourcepath="/FOray Lib-Build/xerces/Xerces-J-src.2.7.1.zip"/>
- <classpathentry combineaccessrules="false" kind="src" path="/axslCommon"/>
<classpathentry kind="lib" path="/FOray Lib/commons-logging-1.1.jar" sourcepath="/FOray Lib-Build/commons-logging/commons-logging-1.1-src.zip"/>
<classpathentry kind="lib" path="/FOray Lib/icu4j_3_4_3.jar"/>
<classpathentry kind="lib" path="/FOray Lib-Build/ant/ant.jar"/>
@@ -13,5 +11,7 @@
<classpathentry kind="lib" path="/FOray Lib/foray-hyphen-0.4-rsrc.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="lib" path="/FOray Lib/commons-cli-1.2.jar" sourcepath="/FOray Lib-Build/commons-cli/commons-cli-1.2-sources.jar"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-common"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-hyphen"/>
<classpathentry kind="output" path="build/eclipse"/>
</classpath>
Modified: trunk/foray/foray-layout/.classpath
===================================================================
--- trunk/foray/foray-layout/.classpath 2010-03-23 00:32:52 UTC (rev 10991)
+++ trunk/foray/foray-layout/.classpath 2010-05-04 21:05:56 UTC (rev 10992)
@@ -2,14 +2,14 @@
<classpath>
<classpathentry kind="src" path="src/java"/>
<classpathentry combineaccessrules="false" kind="src" path="/FOrayCommon"/>
- <classpathentry combineaccessrules="false" kind="src" path="/axslFoTree"/>
- <classpathentry combineaccessrules="false" kind="src" path="/axslText"/>
- <classpathentry combineaccessrules="false" kind="src" path="/axslAreaTree"/>
- <classpathentry combineaccessrules="false" kind="src" path="/axslFont"/>
- <classpathentry combineaccessrules="false" kind="src" path="/axslGraphic"/>
- <classpathentry combineaccessrules="false" kind="src" path="/axslCommon"/>
- <classpathentry combineaccessrules="false" kind="src" path="/axslLayout"/>
<classpathentry kind="lib" path="/FOray Lib/commons-logging-1.1.jar" sourcepath="/FOray Lib-Build/commons-logging/commons-logging-1.1-src.zip"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-area"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-common"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-fo"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-font"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-graphic"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-layout"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-text"/>
<classpathentry kind="output" path="build/eclipse"/>
</classpath>
Modified: trunk/foray/foray-mif/.classpath
===================================================================
--- trunk/foray/foray-mif/.classpath 2010-03-23 00:32:52 UTC (rev 10991)
+++ trunk/foray/foray-mif/.classpath 2010-05-04 21:05:56 UTC (rev 10992)
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry excluding=".#*" kind="src" path="src/java"/>
- <classpathentry kind="src" path="/axslCommon"/>
<classpathentry combineaccessrules="false" kind="src" path="/FOrayCommon"/>
<classpathentry kind="lib" path="/FOray Lib/commons-logging-1.1.jar" sourcepath="/FOray Lib-Build/commons-logging/commons-logging-1.1-src.zip"/>
- <classpathentry combineaccessrules="false" kind="src" path="/axslOutput"/>
- <classpathentry combineaccessrules="false" kind="src" path="/axslMif"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-common"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-mif"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-output"/>
<classpathentry kind="output" path="build/eclipse"/>
</classpath>
Modified: trunk/foray/foray-output/.classpath
===================================================================
--- trunk/foray/foray-output/.classpath 2010-03-23 00:32:52 UTC (rev 10991)
+++ trunk/foray/foray-output/.classpath 2010-05-04 21:05:56 UTC (rev 10992)
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/java"/>
- <classpathentry kind="src" path="/axslGraphic"/>
<classpathentry kind="src" path="/FOrayCommon"/>
- <classpathentry kind="src" path="/axslFont"/>
- <classpathentry kind="src" path="/axslFoTree"/>
- <classpathentry kind="src" path="/axslCommon"/>
- <classpathentry combineaccessrules="false" kind="src" path="/axslOutput"/>
<classpathentry kind="lib" path="/FOray Lib/commons-logging-1.1.jar" sourcepath="/FOray Lib-Build/commons-logging/commons-logging-1.1-src.zip"/>
- <classpathentry combineaccessrules="false" kind="src" path="/axslMif"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-common"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-fo"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-font"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-graphic"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-mif"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-output"/>
<classpathentry kind="output" path="build/eclipse"/>
</classpath>
Modified: trunk/foray/foray-pdf/.classpath
===================================================================
--- trunk/foray/foray-pdf/.classpath 2010-03-23 00:32:52 UTC (rev 10991)
+++ trunk/foray/foray-pdf/.classpath 2010-05-04 21:05:56 UTC (rev 10992)
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry excluding=".#*" kind="src" path="src/java"/>
- <classpathentry kind="src" path="/axslFont"/>
- <classpathentry kind="src" path="/axslGraphic"/>
<classpathentry kind="src" path="/FOrayCommon"/>
- <classpathentry kind="src" path="/axslPs"/>
- <classpathentry kind="src" path="/axslCommon"/>
- <classpathentry kind="src" path="/axslPdf"/>
<classpathentry kind="lib" path="/FOray Lib/commons-logging-1.1.jar" sourcepath="/FOray Lib-Build/commons-logging/commons-logging-1.1-src.zip"/>
<classpathentry kind="lib" path="/FOray Lib/svg-1.1.jar" sourcepath="/FOray Lib-Build/svg/svg-1.1-src.zip"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-common"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-font"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-graphic"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-pdf"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-ps"/>
<classpathentry kind="output" path="build/eclipse"/>
</classpath>
Modified: trunk/foray/foray-pioneer/.classpath
===================================================================
--- trunk/foray/foray-pioneer/.classpath 2010-03-23 00:32:52 UTC (rev 10991)
+++ trunk/foray/foray-pioneer/.classpath 2010-05-04 21:05:56 UTC (rev 10992)
@@ -1,16 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry excluding=".#*" kind="src" path="src/java"/>
- <classpathentry kind="src" path="/axslFont"/>
- <classpathentry kind="src" path="/axslGraphic"/>
- <classpathentry kind="src" path="/axslAreaTree"/>
- <classpathentry kind="src" path="/axslFoTree"/>
- <classpathentry kind="src" path="/axslCommon"/>
<classpathentry kind="src" path="/FOrayCommon"/>
- <classpathentry kind="src" path="/axslText"/>
<classpathentry combineaccessrules="false" kind="src" path="/FOrayLayout"/>
- <classpathentry combineaccessrules="false" kind="src" path="/axslLayout"/>
<classpathentry kind="lib" path="/FOray Lib/commons-logging-1.1.jar" sourcepath="/FOray Lib-Build/commons-logging/commons-logging-1.1-src.zip"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-area"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-common"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-fo"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-font"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-graphic"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-layout"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-text"/>
<classpathentry kind="output" path="build/eclipse"/>
</classpath>
Modified: trunk/foray/foray-ps/.classpath
===================================================================
--- trunk/foray/foray-ps/.classpath 2010-03-23 00:32:52 UTC (rev 10991)
+++ trunk/foray/foray-ps/.classpath 2010-05-04 21:05:56 UTC (rev 10992)
@@ -3,10 +3,10 @@
<classpathentry excluding=".#*" kind="src" path="src/java"/>
<classpathentry kind="src" path="src/javatest"/>
<classpathentry kind="src" path="/FOrayCommon"/>
- <classpathentry kind="src" path="/axslPs"/>
- <classpathentry kind="src" path="/axslCommon"/>
<classpathentry kind="lib" path="/FOray Lib/commons-logging-1.1.jar" sourcepath="/FOray Lib-Build/commons-logging/commons-logging-1.1-src.zip"/>
<classpathentry kind="lib" path="/FOray Lib-Build/junit/junit-4.4.jar" sourcepath="/FOray Lib-Build/junit/junit-4.4-src.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-common"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/axsl-ps"/>
<classpathentry kind="output" path="build/eclipse"/>
</classpath>
Modified: trunk/foray/foray-render/.classpath
===================================================================
--- trunk/foray/foray-render/.classpath 2010-03-23 00:32:52 UTC (rev 10991)
+++ trunk/foray/foray-render/.classpath 2010-05-04 21:05:56 UTC (rev 10992)
@@ -3,18 +3,18 @@
<classpathentry excluding=".#*" kind="src" path="src/java"/>
<classpathentry kind="src" path="src/javatest"/>
<classpathentry kind="src" path="/FOrayCommon"/>
- <classpathentry kind="src" path="/axslFont"/>
- <classpathentry kind="src" path="/axslGraphic"/>
- <classpathentry kind="src" path="/axslGalley"/>
<classpathentry kind="src" path="/FOrayOutput"/>
- <classpathentry kind="src" path="/axslPs"/>
- <classpathentry kind="src" path="/axslCommon"/>
- <classpathentry kind="src" path="/axslText"/>
- <classpathentry kind="src" path="/axslPdf"/>
- <classpathentry combineaccessrules="false" kind="src" path="/axslOutput"/>
<classpathentry kind="lib" path="/FOray Lib/commons-logging-1.1.jar" sourcepath="/FOray Lib-Build/commons-logging/commons-logging-1.1-src.zip"/>
<classpathentry kind="lib" path="/FOray Lib/svg-1.1.jar" sourcepath="/FOray Lib-Build/svg/svg-1.1-src.zip"/>
<classpathentry kind="lib" path="/FOray Lib-Build/junit/junit-4.4.jar" sourcepath="/FOray Lib-Build/junit/junit-4.4-src.ja...
[truncated message content] |
|
From: <vic...@us...> - 2010-05-04 21:28:03
|
Revision: 10993
http://foray.svn.sourceforge.net/foray/?rev=10993&view=rev
Author: victormote
Date: 2010-05-04 21:27:57 +0000 (Tue, 04 May 2010)
Log Message:
-----------
Rough-in maven pom files.
Added Paths:
-----------
trunk/foray/foray-all/
trunk/foray/foray-all/pom.xml
trunk/foray/foray-app/pom.xml
trunk/foray/foray-areatree/pom.xml
trunk/foray/foray-common/pom.xml
trunk/foray/foray-core/pom.xml
trunk/foray/foray-font/pom.xml
trunk/foray/foray-fotree/pom.xml
trunk/foray/foray-graphic/pom.xml
trunk/foray/foray-hyphen/pom.xml
trunk/foray/foray-layout/pom.xml
trunk/foray/foray-mif/pom.xml
trunk/foray/foray-output/pom.xml
trunk/foray/foray-pdf/pom.xml
trunk/foray/foray-pioneer/pom.xml
trunk/foray/foray-ps/pom.xml
trunk/foray/foray-render/pom.xml
trunk/foray/foray-speech/pom.xml
trunk/foray/foray-text/pom.xml
trunk/foray/foray-xml/pom.xml
Added: trunk/foray/foray-all/pom.xml
===================================================================
--- trunk/foray/foray-all/pom.xml (rev 0)
+++ trunk/foray/foray-all/pom.xml 2010-05-04 21:27:57 UTC (rev 10993)
@@ -0,0 +1,82 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <properties>
+ <axsl.version>0.4-SNAPSHOT</axsl.version>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+
+ <groupId>org.foray</groupId>
+ <artifactId>foray-all</artifactId>
+ <version>0.4-SNAPSHOT</version>
+
+ <packaging>pom</packaging>
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ <inherited>true</inherited>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-eclipse-plugin</artifactId>
+ <version>2.8</version>
+ <configuration>
+ <additionalConfig>
+ <file>
+ <name>.settings/org.eclipse.jdt.core.prefs</name>
+ <location>../axsl-all/scripts/maven/eclipse/org.eclipse.jdt.core.prefs</location>
+ </file>
+ <file>
+ <name>.settings/org.eclipse.jdt.ui.prefs</name>
+ <location>../axsl-all/scripts/maven/eclipse/org.eclipse.jdt.ui.prefs</location>
+ </file>
+ <file>
+ <name>.settings/org.maven.ide.eclipse.prefs</name>
+ <location>../axsl-all/scripts/maven/eclipse/org.maven.ide.eclipse.prefs</location>
+ </file>
+ <file>
+ <name>.checkstyle</name>
+ <location>../axsl-all/scripts/maven/eclipse/.checkstyle</location>
+ </file>
+ </additionalConfig>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
+ <modules>
+ <module>../foray-app</module>
+ <module>../foray-areatree</module>
+ <module>../foray-common</module>
+ <module>../foray-core</module>
+ <module>../foray-font</module>
+ <module>../foray-fotree</module>
+ <module>../foray-graphic</module>
+ <module>../foray-hyphen</module>
+ <module>../foray-layout</module>
+ <module>../foray-mif</module>
+ <module>../foray-output</module>
+ <module>../foray-pdf</module>
+ <module>../foray-pioneer</module>
+ <module>../foray-ps</module>
+ <module>../foray-render</module>
+ <module>../foray-speech</module>
+ <module>../foray-text</module>
+ <module>../foray-xml</module>
+ </modules>
+
+</project>
+
+<!-- Last line of POM -->
Added: trunk/foray/foray-app/pom.xml
===================================================================
--- trunk/foray/foray-app/pom.xml (rev 0)
+++ trunk/foray/foray-app/pom.xml 2010-05-04 21:27:57 UTC (rev 10993)
@@ -0,0 +1,20 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.foray</groupId>
+ <artifactId>foray-app</artifactId>
+
+ <packaging>jar</packaging>
+
+ <parent>
+ <groupId>org.foray</groupId>
+ <artifactId>foray-all</artifactId>
+ <version>0.4-SNAPSHOT</version>
+ <relativePath>../foray-all/pom.xml</relativePath>
+ </parent>
+
+</project>
Added: trunk/foray/foray-areatree/pom.xml
===================================================================
--- trunk/foray/foray-areatree/pom.xml (rev 0)
+++ trunk/foray/foray-areatree/pom.xml 2010-05-04 21:27:57 UTC (rev 10993)
@@ -0,0 +1,20 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.foray</groupId>
+ <artifactId>foray-areatree</artifactId>
+
+ <packaging>jar</packaging>
+
+ <parent>
+ <groupId>org.foray</groupId>
+ <artifactId>foray-all</artifactId>
+ <version>0.4-SNAPSHOT</version>
+ <relativePath>../foray-all/pom.xml</relativePath>
+ </parent>
+
+</project>
Added: trunk/foray/foray-common/pom.xml
===================================================================
--- trunk/foray/foray-common/pom.xml (rev 0)
+++ trunk/foray/foray-common/pom.xml 2010-05-04 21:27:57 UTC (rev 10993)
@@ -0,0 +1,20 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.foray</groupId>
+ <artifactId>foray-common</artifactId>
+
+ <packaging>jar</packaging>
+
+ <parent>
+ <groupId>org.foray</groupId>
+ <artifactId>foray-all</artifactId>
+ <version>0.4-SNAPSHOT</version>
+ <relativePath>../foray-all/pom.xml</relativePath>
+ </parent>
+
+</project>
Added: trunk/foray/foray-core/pom.xml
===================================================================
--- trunk/foray/foray-core/pom.xml (rev 0)
+++ trunk/foray/foray-core/pom.xml 2010-05-04 21:27:57 UTC (rev 10993)
@@ -0,0 +1,20 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.foray</groupId>
+ <artifactId>foray-core</artifactId>
+
+ <packaging>jar</packaging>
+
+ <parent>
+ <groupId>org.foray</groupId>
+ <artifactId>foray-all</artifactId>
+ <version>0.4-SNAPSHOT</version>
+ <relativePath>../foray-all/pom.xml</relativePath>
+ </parent>
+
+</project>
Added: trunk/foray/foray-font/pom.xml
===================================================================
--- trunk/foray/foray-font/pom.xml (rev 0)
+++ trunk/foray/foray-font/pom.xml 2010-05-04 21:27:57 UTC (rev 10993)
@@ -0,0 +1,20 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.foray</groupId>
+ <artifactId>foray-font</artifactId>
+
+ <packaging>jar</packaging>
+
+ <parent>
+ <groupId>org.foray</groupId>
+ <artifactId>foray-all</artifactId>
+ <version>0.4-SNAPSHOT</version>
+ <relativePath>../foray-all/pom.xml</relativePath>
+ </parent>
+
+</project>
Added: trunk/foray/foray-fotree/pom.xml
===================================================================
--- trunk/foray/foray-fotree/pom.xml (rev 0)
+++ trunk/foray/foray-fotree/pom.xml 2010-05-04 21:27:57 UTC (rev 10993)
@@ -0,0 +1,20 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.foray</groupId>
+ <artifactId>foray-fotree</artifactId>
+
+ <packaging>jar</packaging>
+
+ <parent>
+ <groupId>org.foray</groupId>
+ <artifactId>foray-all</artifactId>
+ <version>0.4-SNAPSHOT</version>
+ <relativePath>../foray-all/pom.xml</relativePath>
+ </parent>
+
+</project>
Added: trunk/foray/foray-graphic/pom.xml
===================================================================
--- trunk/foray/foray-graphic/pom.xml (rev 0)
+++ trunk/foray/foray-graphic/pom.xml 2010-05-04 21:27:57 UTC (rev 10993)
@@ -0,0 +1,20 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.foray</groupId>
+ <artifactId>foray-graphic</artifactId>
+
+ <packaging>jar</packaging>
+
+ <parent>
+ <groupId>org.foray</groupId>
+ <artifactId>foray-all</artifactId>
+ <version>0.4-SNAPSHOT</version>
+ <relativePath>../foray-all/pom.xml</relativePath>
+ </parent>
+
+</project>
Added: trunk/foray/foray-hyphen/pom.xml
===================================================================
--- trunk/foray/foray-hyphen/pom.xml (rev 0)
+++ trunk/foray/foray-hyphen/pom.xml 2010-05-04 21:27:57 UTC (rev 10993)
@@ -0,0 +1,20 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.foray</groupId>
+ <artifactId>foray-hyphen</artifactId>
+
+ <packaging>jar</packaging>
+
+ <parent>
+ <groupId>org.foray</groupId>
+ <artifactId>foray-all</artifactId>
+ <version>0.4-SNAPSHOT</version>
+ <relativePath>../foray-all/pom.xml</relativePath>
+ </parent>
+
+</project>
Added: trunk/foray/foray-layout/pom.xml
===================================================================
--- trunk/foray/foray-layout/pom.xml (rev 0)
+++ trunk/foray/foray-layout/pom.xml 2010-05-04 21:27:57 UTC (rev 10993)
@@ -0,0 +1,20 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.foray</groupId>
+ <artifactId>foray-layout</artifactId>
+
+ <packaging>jar</packaging>
+
+ <parent>
+ <groupId>org.foray</groupId>
+ <artifactId>foray-all</artifactId>
+ <version>0.4-SNAPSHOT</version>
+ <relativePath>../foray-all/pom.xml</relativePath>
+ </parent>
+
+</project>
Added: trunk/foray/foray-mif/pom.xml
===================================================================
--- trunk/foray/foray-mif/pom.xml (rev 0)
+++ trunk/foray/foray-mif/pom.xml 2010-05-04 21:27:57 UTC (rev 10993)
@@ -0,0 +1,20 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.foray</groupId>
+ <artifactId>foray-mif</artifactId>
+
+ <packaging>jar</packaging>
+
+ <parent>
+ <groupId>org.foray</groupId>
+ <artifactId>foray-all</artifactId>
+ <version>0.4-SNAPSHOT</version>
+ <relativePath>../foray-all/pom.xml</relativePath>
+ </parent>
+
+</project>
Added: trunk/foray/foray-output/pom.xml
===================================================================
--- trunk/foray/foray-output/pom.xml (rev 0)
+++ trunk/foray/foray-output/pom.xml 2010-05-04 21:27:57 UTC (rev 10993)
@@ -0,0 +1,20 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.foray</groupId>
+ <artifactId>foray-output</artifactId>
+
+ <packaging>jar</packaging>
+
+ <parent>
+ <groupId>org.foray</groupId>
+ <artifactId>foray-all</artifactId>
+ <version>0.4-SNAPSHOT</version>
+ <relativePath>../foray-all/pom.xml</relativePath>
+ </parent>
+
+</project>
Added: trunk/foray/foray-pdf/pom.xml
===================================================================
--- trunk/foray/foray-pdf/pom.xml (rev 0)
+++ trunk/foray/foray-pdf/pom.xml 2010-05-04 21:27:57 UTC (rev 10993)
@@ -0,0 +1,20 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.foray</groupId>
+ <artifactId>foray-pdf</artifactId>
+
+ <packaging>jar</packaging>
+
+ <parent>
+ <groupId>org.foray</groupId>
+ <artifactId>foray-all</artifactId>
+ <version>0.4-SNAPSHOT</version>
+ <relativePath>../foray-all/pom.xml</relativePath>
+ </parent>
+
+</project>
Added: trunk/foray/foray-pioneer/pom.xml
===================================================================
--- trunk/foray/foray-pioneer/pom.xml (rev 0)
+++ trunk/foray/foray-pioneer/pom.xml 2010-05-04 21:27:57 UTC (rev 10993)
@@ -0,0 +1,20 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.foray</groupId>
+ <artifactId>foray-pioneer</artifactId>
+
+ <packaging>jar</packaging>
+
+ <parent>
+ <groupId>org.foray</groupId>
+ <artifactId>foray-all</artifactId>
+ <version>0.4-SNAPSHOT</version>
+ <relativePath>../foray-all/pom.xml</relativePath>
+ </parent>
+
+</project>
Added: trunk/foray/foray-ps/pom.xml
===================================================================
--- trunk/foray/foray-ps/pom.xml (rev 0)
+++ trunk/foray/foray-ps/pom.xml 2010-05-04 21:27:57 UTC (rev 10993)
@@ -0,0 +1,20 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.foray</groupId>
+ <artifactId>foray-ps</artifactId>
+
+ <packaging>jar</packaging>
+
+ <parent>
+ <groupId>org.foray</groupId>
+ <artifactId>foray-all</artifactId>
+ <version>0.4-SNAPSHOT</version>
+ <relativePath>../foray-all/pom.xml</relativePath>
+ </parent>
+
+</project>
Added: trunk/foray/foray-render/pom.xml
===================================================================
--- trunk/foray/foray-render/pom.xml (rev 0)
+++ trunk/foray/foray-render/pom.xml 2010-05-04 21:27:57 UTC (rev 10993)
@@ -0,0 +1,20 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.foray</groupId>
+ <artifactId>foray-render</artifactId>
+
+ <packaging>jar</packaging>
+
+ <parent>
+ <groupId>org.foray</groupId>
+ <artifactId>foray-all</artifactId>
+ <version>0.4-SNAPSHOT</version>
+ <relativePath>../foray-all/pom.xml</relativePath>
+ </parent>
+
+</project>
Added: trunk/foray/foray-speech/pom.xml
===================================================================
--- trunk/foray/foray-speech/pom.xml (rev 0)
+++ trunk/foray/foray-speech/pom.xml 2010-05-04 21:27:57 UTC (rev 10993)
@@ -0,0 +1,20 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.foray</groupId>
+ <artifactId>foray-speech</artifactId>
+
+ <packaging>jar</packaging>
+
+ <parent>
+ <groupId>org.foray</groupId>
+ <artifactId>foray-all</artifactId>
+ <version>0.4-SNAPSHOT</version>
+ <relativePath>../foray-all/pom.xml</relativePath>
+ </parent>
+
+</project>
Added: trunk/foray/foray-text/pom.xml
===================================================================
--- trunk/foray/foray-text/pom.xml (rev 0)
+++ trunk/foray/foray-text/pom.xml 2010-05-04 21:27:57 UTC (rev 10993)
@@ -0,0 +1,20 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.foray</groupId>
+ <artifactId>foray-text</artifactId>
+
+ <packaging>jar</packaging>
+
+ <parent>
+ <groupId>org.foray</groupId>
+ <artifactId>foray-all</artifactId>
+ <version>0.4-SNAPSHOT</version>
+ <relativePath>../foray-all/pom.xml</relativePath>
+ </parent>
+
+</project>
Added: trunk/foray/foray-xml/pom.xml
===================================================================
--- trunk/foray/foray-xml/pom.xml (rev 0)
+++ trunk/foray/foray-xml/pom.xml 2010-05-04 21:27:57 UTC (rev 10993)
@@ -0,0 +1,20 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.foray</groupId>
+ <artifactId>foray-xml</artifactId>
+
+ <packaging>jar</packaging>
+
+ <parent>
+ <groupId>org.foray</groupId>
+ <artifactId>foray-all</artifactId>
+ <version>0.4-SNAPSHOT</version>
+ <relativePath>../foray-all/pom.xml</relativePath>
+ </parent>
+
+</project>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2010-05-04 21:43:02
|
Revision: 10995
http://foray.svn.sourceforge.net/foray/?rev=10995&view=rev
Author: victormote
Date: 2010-05-04 21:42:56 +0000 (Tue, 04 May 2010)
Log Message:
-----------
Move the common directories to foray-all.
Added Paths:
-----------
trunk/foray/foray-all/config/
trunk/foray/foray-all/doc/
trunk/foray/foray-all/resource/
trunk/foray/foray-all/scripts/
Removed Paths:
-------------
trunk/foray/config/
trunk/foray/doc/
trunk/foray/resource/
trunk/foray/scripts/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2010-05-04 21:57:13
|
Revision: 10996
http://foray.svn.sourceforge.net/foray/?rev=10996&view=rev
Author: victormote
Date: 2010-05-04 21:57:07 +0000 (Tue, 04 May 2010)
Log Message:
-----------
Add directories for new source structure.
Added Paths:
-----------
trunk/foray/foray-app/src/main/
trunk/foray/foray-app/src/test/
trunk/foray/foray-areatree/src/main/
trunk/foray/foray-areatree/src/test/
trunk/foray/foray-common/src/main/
trunk/foray/foray-common/src/test/
trunk/foray/foray-core/src/test/
trunk/foray/foray-font/src/main/
trunk/foray/foray-font/src/test/
trunk/foray/foray-fotree/src/main/
trunk/foray/foray-fotree/src/test/
trunk/foray/foray-graphic/src/main/
trunk/foray/foray-graphic/src/test/
trunk/foray/foray-hyphen/src/main/
trunk/foray/foray-hyphen/src/test/
trunk/foray/foray-layout/src/main/
trunk/foray/foray-layout/src/test/
trunk/foray/foray-mif/src/main/
trunk/foray/foray-output/src/test/
trunk/foray/foray-pdf/src/main/
trunk/foray/foray-pioneer/src/main/
trunk/foray/foray-ps/src/main/
trunk/foray/foray-ps/src/test/
trunk/foray/foray-render/src/main/
trunk/foray/foray-render/src/test/
trunk/foray/foray-speech/src/main/
trunk/foray/foray-text/src/main/
trunk/foray/foray-xml/src/main/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|