foray-commit Mailing List for FOray (Page 51)
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
(139) |
Apr
(98) |
May
(250) |
Jun
(394) |
Jul
(84) |
Aug
(13) |
Sep
(420) |
Oct
(186) |
Nov
(1) |
Dec
(3) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(108) |
Feb
(202) |
Mar
(291) |
Apr
(247) |
May
(374) |
Jun
(227) |
Jul
(231) |
Aug
(60) |
Sep
(31) |
Oct
(45) |
Nov
(18) |
Dec
|
| 2008 |
Jan
(38) |
Feb
(71) |
Mar
(142) |
Apr
|
May
(59) |
Jun
(6) |
Jul
(10) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2009 |
Jan
(12) |
Feb
(4) |
Mar
(88) |
Apr
(121) |
May
(17) |
Jun
(30) |
Jul
|
Aug
(5) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2010 |
Jan
(11) |
Feb
(76) |
Mar
(11) |
Apr
|
May
(11) |
Jun
|
Jul
|
Aug
(44) |
Sep
(14) |
Oct
(7) |
Nov
|
Dec
|
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(9) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(10) |
Nov
|
Dec
|
| 2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
(4) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(168) |
| 2017 |
Jan
(77) |
Feb
(11) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
(6) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
|
Feb
(88) |
Mar
(118) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(6) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(141) |
| 2021 |
Jan
(170) |
Feb
(20) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
(62) |
Nov
(189) |
Dec
(162) |
| 2022 |
Jan
(201) |
Feb
(118) |
Mar
(8) |
Apr
|
May
(2) |
Jun
(47) |
Jul
(19) |
Aug
(14) |
Sep
(3) |
Oct
|
Nov
(28) |
Dec
(235) |
| 2023 |
Jan
(112) |
Feb
(23) |
Mar
(2) |
Apr
(2) |
May
|
Jun
(1) |
Jul
|
Aug
(70) |
Sep
(92) |
Oct
(20) |
Nov
(1) |
Dec
(1) |
| 2024 |
Jan
|
Feb
|
Mar
(1) |
Apr
(1) |
May
(14) |
Jun
(11) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2025 |
Jan
(10) |
Feb
(29) |
Mar
|
Apr
(162) |
May
(245) |
Jun
(83) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
(2) |
Dec
|
|
From: <vic...@us...> - 2022-02-27 14:52:40
|
Revision: 12625
http://sourceforge.net/p/foray/code/12625
Author: victormote
Date: 2022-02-27 14:52:38 +0000 (Sun, 27 Feb 2022)
Log Message:
-----------
Remove some SLF4J code from the foray-font ABI.
Modified Paths:
--------------
trunk/foray/foray-font/build.gradle
trunk/foray/foray-font/src/main/java/org/foray/font/format/FontParser.java
trunk/foray/foray-font/src/main/java/org/foray/font/format/FontParserClient.java
trunk/foray/foray-font/src/main/java/org/foray/font/format/ttf/TrueTypeCollectionLister.java
trunk/foray/foray-font/src/main/java/org/foray/font/format/type1/Type1FontParser.java
Modified: trunk/foray/foray-font/build.gradle
===================================================================
--- trunk/foray/foray-font/build.gradle 2022-02-27 14:01:05 UTC (rev 12624)
+++ trunk/foray/foray-font/build.gradle 2022-02-27 14:52:38 UTC (rev 12625)
@@ -8,8 +8,7 @@
dependencies {
- /* TODO: Convert SLF4J "api" dependency to "implementation". */
- api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
+ implementation (group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j)
api group: 'commons-io', name: 'commons-io', version: versions.commonsIo
implementation group: 'commons-discovery', name: 'commons-discovery', version: versions.commonsDiscovery
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/format/FontParser.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/format/FontParser.java 2022-02-27 14:01:05 UTC (rev 12624)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/format/FontParser.java 2022-02-27 14:52:38 UTC (rev 12625)
@@ -42,6 +42,7 @@
import org.axsl.ps.PsServer;
import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.io.InputStream;
@@ -115,6 +116,9 @@
/** The content to be parsed. */
private ByteSequenceParser randomInput;
+ /** The logger for this parser. */
+ private Logger logger = LoggerFactory.getLogger(getClass());
+
/**
* Constructor.
* @param parserClient The font parser client.
@@ -227,7 +231,7 @@
* @return The logger.
*/
public Logger getLogger() {
- return this.parserClient.getLogger();
+ return this.logger;
}
/**
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/format/FontParserClient.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/format/FontParserClient.java 2022-02-27 14:01:05 UTC (rev 12624)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/format/FontParserClient.java 2022-02-27 14:52:38 UTC (rev 12625)
@@ -29,8 +29,6 @@
package org.foray.font.format;
import org.axsl.ps.PsServer;
-import org.slf4j.Logger;
-
/**
* Interface for clients wishing to parse font content.
*/
@@ -37,12 +35,6 @@
public interface FontParserClient {
/**
- * Returns the logger to be used by the parser.
- * @return The logger.
- */
- Logger getLogger();
-
- /**
* Returns the PostScript server, which is used to make instances of certain classes needed for parsing.
* @return The PostScript server.
*/
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/format/ttf/TrueTypeCollectionLister.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/format/ttf/TrueTypeCollectionLister.java 2022-02-27 14:01:05 UTC (rev 12624)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/format/ttf/TrueTypeCollectionLister.java 2022-02-27 14:52:38 UTC (rev 12625)
@@ -75,9 +75,9 @@
* @param fontName (Optional) The name of the font for which detailed information should be displayed.
* @throws FontException For errors reading the content.
*/
- public void listTTCContents(final String urlPath, final String fontName)
- throws FontException {
- final Logger logger = getLogger();
+ public void listTTCContents(final String urlPath, final String fontName) throws FontException {
+ /* TODO: This output should go to a specified PrintStream, not to a Logger. */
+ final Logger logger = LoggerFactory.getLogger(this.getClass());
logger.info("TTF Reader, listing contents of ttc file.");
logger.info("Reading " + urlPath + "...");
FontParser reader = null;
@@ -149,14 +149,6 @@
}
/**
- * Convenenience method that returns the logger.
- * @return The logger.
- */
- private Logger getLogger() {
- return this.parserClient.getLogger();
- }
-
- /**
* Returns the command-line options for the {@link #main(String[])} method.
* @return Command-line options.
*/
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/format/type1/Type1FontParser.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/format/type1/Type1FontParser.java 2022-02-27 14:01:05 UTC (rev 12624)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/format/type1/Type1FontParser.java 2022-02-27 14:52:38 UTC (rev 12625)
@@ -201,12 +201,12 @@
final PsSystemDict systemDict = psServer.getReadOnlySystemDict();
interpreter = psServer.makeInterpreter(psInput, systemDict);
} catch (final PsException e) {
- getParserClient().getLogger().error(e.getMessage());
+ this.parser.getLogger().error(e.getMessage());
}
try {
interpreter.process();
} catch (final PsInterpreterException e1) {
- getParserClient().getLogger().error(e1.getMessage()
+ this.parser.getLogger().error(e1.getMessage()
+ "\n " /*+ getRandomInput().getDescription().toString()*/);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-02-27 14:01:07
|
Revision: 12624
http://sourceforge.net/p/foray/code/12624
Author: victormote
Date: 2022-02-27 14:01:05 +0000 (Sun, 27 Feb 2022)
Log Message:
-----------
1. Remove SLF4J from foray-mif API. 2. Remove SLF4J from Renderer creation.
Modified Paths:
--------------
trunk/foray/foray-app/src/main/java/org/foray/app/CommandLineStarter.java
trunk/foray/foray-app/src/main/java/org/foray/app/OutputTargetFactory.java
trunk/foray/foray-app/src/main/java/org/foray/app/ant/ForayAntTaskStarter.java
trunk/foray/foray-app/src/main/java/org/foray/app/test/TestConverter.java
trunk/foray/foray-app/src/main/java/org/foray/demo/embed/DemoFo2Pdf.java
trunk/foray/foray-app/src/main/java/org/foray/demo/embed/DemoObj2Pdf.java
trunk/foray/foray-app/src/main/java/org/foray/demo/embed/DemoXml2Pdf.java
trunk/foray/foray-app/src/main/java/org/foray/demo/servlet/AbstractDemoServlet.java
trunk/foray/foray-app/src/main/java/org/foray/demo/servlet/DemoServlet.java
trunk/foray/foray-mif/build.gradle
trunk/foray/foray-mif/src/main/java/org/foray/mif/MifBook.java
Modified: trunk/foray/foray-app/src/main/java/org/foray/app/CommandLineStarter.java
===================================================================
--- trunk/foray/foray-app/src/main/java/org/foray/app/CommandLineStarter.java 2022-02-27 13:34:01 UTC (rev 12623)
+++ trunk/foray/foray-app/src/main/java/org/foray/app/CommandLineStarter.java 2022-02-27 14:01:05 UTC (rev 12624)
@@ -80,8 +80,7 @@
/* Instantiate the ForaySession. */
final SessionConfig sessionConfig = getOptions().getSessionConfig();
- final ForaySession session = ForaySpecific.makeFOraySession(
- sessionConfig);
+ final ForaySession session = ForaySpecific.makeFOraySession(sessionConfig);
/*
* Instantiate and configure the ForayDocument(s). The constructor
@@ -111,9 +110,8 @@
this.commandLineOptions.getOutputMode();
final OutputConfig outputOptions = this.getOutputConfig();
final FileOutputStream outputStream = getFileOutputStream();
- final OutputTarget outputTarget = OutputTargetFactory.makeOutputTarget(
- outputType, outputOptions, outputStream,
- session.getLogger(), session.getGraphicServer());
+ final OutputTarget outputTarget = OutputTargetFactory.makeOutputTarget(outputType, outputOptions, outputStream,
+ session.getGraphicServer());
/*
* Instantiate and configure the ForayTarget(s). Multiple targets can
Modified: trunk/foray/foray-app/src/main/java/org/foray/app/OutputTargetFactory.java
===================================================================
--- trunk/foray/foray-app/src/main/java/org/foray/app/OutputTargetFactory.java 2022-02-27 13:34:01 UTC (rev 12623)
+++ trunk/foray/foray-app/src/main/java/org/foray/app/OutputTargetFactory.java 2022-02-27 14:01:05 UTC (rev 12624)
@@ -46,8 +46,6 @@
import org.axsl.output.OutputTarget;
import org.axsl.ps.PsServer;
-import org.slf4j.Logger;
-
import java.io.OutputStream;
/**
@@ -62,27 +60,12 @@
}
/**
- * Factory method that makes a new Renderer instance for the standard
- * renderers.
- * @param rendererType The integral id for the Renderer that should be
- * used. Must be one of:
- * <ul>
- * <li>RENDER_PDF
- * <li>RENDER_AWT
- * <li>RENDER_MIF
- * <li>RENDER_XML
- * <li>RENDER_PCL
- * <li>RENDER_PS
- * <li>RENDER_TXT
- * <li>RENDER_SVG
- * </ul>
- * @param outputOptions Map containing the options to be used with the
- * Renderer.
- * @param outputStream The output stream to which the target will be
- * written.
- * @param logger The logger.
- * @param graphicServer The GraphicServer to be used for output targets that
- * create a graphic (like the SVG Renderer).
+ * Factory method that makes a new Renderer instance for the standard renderers.
+ * @param rendererType The type of the output target to be created.
+ * @param outputOptions Map containing the options to be used with the Renderer.
+ * @param outputStream The output stream to which the target will be written.
+ * @param graphicServer The GraphicServer to be used for output targets that create a graphic (like the SVG
+ * Renderer).
* @return The newly-created OutputTarget instance.
* @throws ForayException For errors creating the target.
*/
@@ -89,7 +72,7 @@
public static OutputTarget makeOutputTarget(
final OutputTargetType rendererType,
final OutputConfig outputOptions, final OutputStream outputStream,
- final Logger logger, final GraphicServer graphicServer)
+ final GraphicServer graphicServer)
throws ForayException {
OutputTarget renderer = null;
switch (rendererType) {
@@ -115,7 +98,7 @@
break;
}
case MIF: {
- final MifBook mifBook = new org.foray.mif.MifBook(logger);
+ final MifBook mifBook = new org.foray.mif.MifBook();
renderer = new MifConverter(mifBook, outputOptions);
break;
}
Modified: trunk/foray/foray-app/src/main/java/org/foray/app/ant/ForayAntTaskStarter.java
===================================================================
--- trunk/foray/foray-app/src/main/java/org/foray/app/ant/ForayAntTaskStarter.java 2022-02-27 13:34:01 UTC (rev 12623)
+++ trunk/foray/foray-app/src/main/java/org/foray/app/ant/ForayAntTaskStarter.java 2022-02-27 14:01:05 UTC (rev 12624)
@@ -315,9 +315,8 @@
this.outputConfig.setFineDetail(Boolean.TRUE, SessionConfig.PRECEDENCE_DEFAULT);
}
final OutputTarget outputTarget =
- OutputTargetFactory.makeOutputTarget(
- this.task.getRendererType(), this.outputConfig, out,
- session.getLogger(), session.getGraphicServer());
+ OutputTargetFactory.makeOutputTarget(this.task.getRendererType(), this.outputConfig, out,
+ session.getGraphicServer());
final ForayTarget target = new ForayTarget(document, null, outputTarget.getFontSelectionConstraints());
target.addOutputTarget(outputTarget, out);
Modified: trunk/foray/foray-app/src/main/java/org/foray/app/test/TestConverter.java
===================================================================
--- trunk/foray/foray-app/src/main/java/org/foray/app/test/TestConverter.java 2022-02-27 13:34:01 UTC (rev 12623)
+++ trunk/foray/foray-app/src/main/java/org/foray/app/test/TestConverter.java 2022-02-27 14:01:05 UTC (rev 12624)
@@ -308,8 +308,7 @@
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());
+ rendererType, renderOptions, bos, session.getGraphicServer());
final ForayTarget target = new ForayTarget(document, null, renderer.getFontSelectionConstraints());
target.addOutputTarget(renderer, bos);
Modified: trunk/foray/foray-app/src/main/java/org/foray/demo/embed/DemoFo2Pdf.java
===================================================================
--- trunk/foray/foray-app/src/main/java/org/foray/demo/embed/DemoFo2Pdf.java 2022-02-27 13:34:01 UTC (rev 12623)
+++ trunk/foray/foray-app/src/main/java/org/foray/demo/embed/DemoFo2Pdf.java 2022-02-27 14:01:05 UTC (rev 12624)
@@ -72,9 +72,8 @@
//Setup Renderer
final OutputStream out = new FileOutputStream(pdf);
- final OutputTarget renderer = OutputTargetFactory.makeOutputTarget(
- OutputTargetType.PDF, null, out, session.getLogger(),
- session.getGraphicServer());
+ final OutputTarget renderer =
+ OutputTargetFactory.makeOutputTarget(OutputTargetType.PDF, null, out, session.getGraphicServer());
//Setup ForayTarget
final ForayTarget target = new ForayTarget(document, null, renderer.getFontSelectionConstraints());
Modified: trunk/foray/foray-app/src/main/java/org/foray/demo/embed/DemoObj2Pdf.java
===================================================================
--- trunk/foray/foray-app/src/main/java/org/foray/demo/embed/DemoObj2Pdf.java 2022-02-27 13:34:01 UTC (rev 12623)
+++ trunk/foray/foray-app/src/main/java/org/foray/demo/embed/DemoObj2Pdf.java 2022-02-27 14:01:05 UTC (rev 12624)
@@ -95,9 +95,8 @@
} catch (final FileNotFoundException e) {
throw new ForayException(e);
}
- final OutputTarget renderer = OutputTargetFactory.makeOutputTarget(
- OutputTargetType.PDF, null, out, session.getLogger(),
- session.getGraphicServer());
+ final OutputTarget renderer =
+ OutputTargetFactory.makeOutputTarget(OutputTargetType.PDF, null, out, session.getGraphicServer());
//Setup ForayTarget
final ForayTarget target = new ForayTarget(document, null, renderer.getFontSelectionConstraints());
Modified: trunk/foray/foray-app/src/main/java/org/foray/demo/embed/DemoXml2Pdf.java
===================================================================
--- trunk/foray/foray-app/src/main/java/org/foray/demo/embed/DemoXml2Pdf.java 2022-02-27 13:34:01 UTC (rev 12623)
+++ trunk/foray/foray-app/src/main/java/org/foray/demo/embed/DemoXml2Pdf.java 2022-02-27 14:01:05 UTC (rev 12624)
@@ -96,9 +96,8 @@
} catch (final FileNotFoundException e) {
throw new ForayException(e);
}
- final OutputTarget renderer = OutputTargetFactory.makeOutputTarget(
- OutputTargetType.PDF, null, out, session.getLogger(),
- session.getGraphicServer());
+ final OutputTarget renderer =
+ OutputTargetFactory.makeOutputTarget(OutputTargetType.PDF, null, out, session.getGraphicServer());
//Setup ForayTarget
final ForayTarget target = new ForayTarget(document, null, renderer.getFontSelectionConstraints());
Modified: trunk/foray/foray-app/src/main/java/org/foray/demo/servlet/AbstractDemoServlet.java
===================================================================
--- trunk/foray/foray-app/src/main/java/org/foray/demo/servlet/AbstractDemoServlet.java 2022-02-27 13:34:01 UTC (rev 12623)
+++ trunk/foray/foray-app/src/main/java/org/foray/demo/servlet/AbstractDemoServlet.java 2022-02-27 14:01:05 UTC (rev 12624)
@@ -195,8 +195,7 @@
// Setup the Renderer
final ByteArrayOutputStream output = new ByteArrayOutputStream();
final OutputTarget renderer = OutputTargetFactory.makeOutputTarget(
- OutputTargetType.PDF, null, output,
- session.getLogger(), session.getGraphicServer());
+ OutputTargetType.PDF, null, output, session.getGraphicServer());
// Setup ForayTarget
final ForayTarget target = new ForayTarget(document, null, renderer.getFontSelectionConstraints());
@@ -235,17 +234,14 @@
// Setup ForayDocument
final TransformerFactory factory = TransformerFactory.newInstance();
- final Transformer transformer = factory.newTransformer(
- new StreamSource(xslFile));
+ final Transformer transformer = factory.newTransformer(new StreamSource(xslFile));
final Source source = new StreamSource(xmlFile);
- final ForayDocument document = new ForayDocument(session,
- transformer, source);
+ final ForayDocument document = new ForayDocument(session, transformer, source);
// Setup the Renderer
final ByteArrayOutputStream output = new ByteArrayOutputStream();
final OutputTarget renderer = OutputTargetFactory.makeOutputTarget(
- OutputTargetType.PDF, null, output,
- session.getLogger(), session.getGraphicServer());
+ OutputTargetType.PDF, null, output, session.getGraphicServer());
// Setup ForayTarget
final ForayTarget target = new ForayTarget(document, null, renderer.getFontSelectionConstraints());
Modified: trunk/foray/foray-app/src/main/java/org/foray/demo/servlet/DemoServlet.java
===================================================================
--- trunk/foray/foray-app/src/main/java/org/foray/demo/servlet/DemoServlet.java 2022-02-27 13:34:01 UTC (rev 12623)
+++ trunk/foray/foray-app/src/main/java/org/foray/demo/servlet/DemoServlet.java 2022-02-27 14:01:05 UTC (rev 12624)
@@ -131,13 +131,11 @@
* @return The newly-created target.
* @throws ForayException For errors during target creation.
*/
- private ForayTarget setupTarget(final ForayDocument document)
- throws ForayException {
+ private ForayTarget setupTarget(final ForayDocument document) throws ForayException {
// Setup the Renderer
final ByteArrayOutputStream output = new ByteArrayOutputStream();
final OutputTarget renderer = OutputTargetFactory.makeOutputTarget(
- OutputTargetType.PDF, null, output,
- document.getLogger(), document.getGraphicServer());
+ OutputTargetType.PDF, null, output, document.getGraphicServer());
// Setup ForayTarget
final ForayTarget target = new ForayTarget(document, null, null);
Modified: trunk/foray/foray-mif/build.gradle
===================================================================
--- trunk/foray/foray-mif/build.gradle 2022-02-27 13:34:01 UTC (rev 12623)
+++ trunk/foray/foray-mif/build.gradle 2022-02-27 14:01:05 UTC (rev 12624)
@@ -5,8 +5,7 @@
description = 'foray-mif'
dependencies {
- /* TODO: Convert SLF4J "api" dependency to "implementation". */
- api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
+ implementation group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
api group: 'org.axsl', name: 'axsl-mif', version: versions.axsl
api group: 'org.axsl', name: 'axsl-output', version: versions.axsl
Modified: trunk/foray/foray-mif/src/main/java/org/foray/mif/MifBook.java
===================================================================
--- trunk/foray/foray-mif/src/main/java/org/foray/mif/MifBook.java 2022-02-27 13:34:01 UTC (rev 12623)
+++ trunk/foray/foray-mif/src/main/java/org/foray/mif/MifBook.java 2022-02-27 14:01:05 UTC (rev 12624)
@@ -31,6 +31,7 @@
import org.axsl.output.OutputException;
import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.io.OutputStream;
@@ -65,10 +66,9 @@
/**
* Creates an empty MIF document.
- * @param logger The logger to use for user messages.
*/
- public MifBook(final Logger logger) {
- this.logger = logger;
+ public MifBook() {
+ this.logger = LoggerFactory.getLogger(getClass());
this.bookComponent = new MifBookComponent();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-02-27 13:34:04
|
Revision: 12623
http://sourceforge.net/p/foray/code/12623
Author: victormote
Date: 2022-02-27 13:34:01 +0000 (Sun, 27 Feb 2022)
Log Message:
-----------
Get all builds into conformity with recommendations made by the autonomousapps dependency analysis.
Modified Paths:
--------------
trunk/foray/foray-core/build.gradle
trunk/foray/foray-font/build.gradle
trunk/foray/foray-fotree/build.gradle
trunk/foray/foray-orthography/build.gradle
trunk/foray/foray-xml/src/main/java/org/foray/xml/SaxParser.java
Modified: trunk/foray/foray-core/build.gradle
===================================================================
--- trunk/foray/foray-core/build.gradle 2022-02-27 05:32:22 UTC (rev 12622)
+++ trunk/foray/foray-core/build.gradle 2022-02-27 13:34:01 UTC (rev 12623)
@@ -21,7 +21,7 @@
api group: 'org.axsl', name: 'axsl-speech', version: versions.axsl
api group: 'org.axsl', name: 'axsl-linebreak', version: versions.axsl
- implementation project(':foray-common')
+ api project(':foray-common')
api project(':foray-xml')
}
Modified: trunk/foray/foray-font/build.gradle
===================================================================
--- trunk/foray/foray-font/build.gradle 2022-02-27 05:32:22 UTC (rev 12622)
+++ trunk/foray/foray-font/build.gradle 2022-02-27 13:34:01 UTC (rev 12623)
@@ -21,14 +21,12 @@
api (group: 'org.axsl', name: 'axsl-orthography', version: versions.axsl)
implementation (group: 'org.axsl', name: 'axsl-unicode', version: versions.axsl)
- implementation project(':foray-common')
+ api project(':foray-common')
api (project(':foray-xml'))
testImplementation group: 'junit', name: 'junit', version: versions.junit
testImplementation group: 'org.mockito', name: 'mockito-core', version: versions.mockito
testRuntimeOnly (project(':foray-ps'))
-
- testFixturesImplementation project(':foray-common')
}
Modified: trunk/foray/foray-fotree/build.gradle
===================================================================
--- trunk/foray/foray-fotree/build.gradle 2022-02-27 05:32:22 UTC (rev 12622)
+++ trunk/foray/foray-fotree/build.gradle 2022-02-27 13:34:01 UTC (rev 12623)
@@ -23,7 +23,7 @@
implementation group: 'org.axsl', name: 'axsl-unicode', version: versions.axsl
api group: 'org.axsl', name: 'axsl-value', version: versions.axsl
- implementation project(':foray-common')
+ api project(':foray-common')
api project(':foray-xml')
Modified: trunk/foray/foray-orthography/build.gradle
===================================================================
--- trunk/foray/foray-orthography/build.gradle 2022-02-27 05:32:22 UTC (rev 12622)
+++ trunk/foray/foray-orthography/build.gradle 2022-02-27 13:34:01 UTC (rev 12623)
@@ -20,7 +20,7 @@
implementation (group: 'org.axsl', name: 'axsl-unicode', version: versions.axsl)
api (group: 'org.axsl', name: 'axsl-value', version: versions.axsl)
- implementation project(':foray-common')
+ api project(':foray-common')
api (project(':foray-xml'))
testImplementation group: 'junit', name: 'junit', version: versions.junit
Modified: trunk/foray/foray-xml/src/main/java/org/foray/xml/SaxParser.java
===================================================================
--- trunk/foray/foray-xml/src/main/java/org/foray/xml/SaxParser.java 2022-02-27 05:32:22 UTC (rev 12622)
+++ trunk/foray/foray-xml/src/main/java/org/foray/xml/SaxParser.java 2022-02-27 13:34:01 UTC (rev 12623)
@@ -51,7 +51,13 @@
import javax.xml.parsers.SAXParserFactory;
/**
- * Abstract superclass for SAX parsers.
+ * <p>Abstract superclass for SAX parsers.</p>
+ *
+ * <p>In order to avoid exposing a logger in the API, this class implements basic logging functions on behalf of the
+ * subclass.
+ * If these basic functions are not adequate to the needs of the subclass, it is of course free to implement a
+ * different logging solution.</p>
+ *
* @param <T> The type of object that should be produced by this parser.
*/
public abstract class SaxParser<T extends Object> extends DefaultHandler2 {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-02-27 05:32:25
|
Revision: 12622
http://sourceforge.net/p/foray/code/12622
Author: victormote
Date: 2022-02-27 05:32:22 +0000 (Sun, 27 Feb 2022)
Log Message:
-----------
Remove SLF4J from public API of foray-xml.
Modified Paths:
--------------
trunk/foray/foray-xml/src/main/java/org/foray/xml/ForayAssignId.java
trunk/foray/foray-xml/src/main/java/org/foray/xml/ForayXdiff.java
Modified: trunk/foray/foray-xml/src/main/java/org/foray/xml/ForayAssignId.java
===================================================================
--- trunk/foray/foray-xml/src/main/java/org/foray/xml/ForayAssignId.java 2022-02-27 04:52:52 UTC (rev 12621)
+++ trunk/foray/foray-xml/src/main/java/org/foray/xml/ForayAssignId.java 2022-02-27 05:32:22 UTC (rev 12622)
@@ -310,7 +310,7 @@
* Returns the logger.
* @return The logger.
*/
- public Logger getLogger() {
+ private Logger getLogger() {
if (this.logger == null) {
this.logger = LoggerFactory.getLogger(ForayAssignId.class);
}
Modified: trunk/foray/foray-xml/src/main/java/org/foray/xml/ForayXdiff.java
===================================================================
--- trunk/foray/foray-xml/src/main/java/org/foray/xml/ForayXdiff.java 2022-02-27 04:52:52 UTC (rev 12621)
+++ trunk/foray/foray-xml/src/main/java/org/foray/xml/ForayXdiff.java 2022-02-27 05:32:22 UTC (rev 12622)
@@ -432,7 +432,7 @@
* Returns the logger.
* @return The logger.
*/
- public Logger getLogger() {
+ private Logger getLogger() {
if (this.logger == null) {
this.logger = LoggerFactory.getLogger(ForayXdiff.class);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-02-27 04:52:55
|
Revision: 12621
http://sourceforge.net/p/foray/code/12621
Author: victormote
Date: 2022-02-27 04:52:52 +0000 (Sun, 27 Feb 2022)
Log Message:
-----------
Remove SLF4J logger from foray-xml API.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoTree4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoTreeParser4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Root4a.java
trunk/foray/foray-xml/src/main/java/org/foray/xml/SaxParser.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java 2022-02-27 04:36:17 UTC (rev 12620)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java 2022-02-27 04:52:52 UTC (rev 12621)
@@ -333,7 +333,7 @@
* @return The logger.
*/
public Logger getLogger() {
- return getParent().getLogger();
+ return getFoTree().getLogger();
}
/**
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoTree4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoTree4a.java 2022-02-27 04:36:17 UTC (rev 12620)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoTree4a.java 2022-02-27 04:52:52 UTC (rev 12621)
@@ -43,6 +43,7 @@
import org.axsl.speech.SpeechServer;
import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.net.URL;
@@ -86,6 +87,9 @@
* initialize the variable to zero.*/
private int lastSequentialIndex = 0;
+ /** The logger for this tree and all of its descendants. */
+ private Logger logger = LoggerFactory.getLogger(this.getClass());
+
/**
* Constructor.
* @param treeServer The parent tree server.
@@ -250,7 +254,7 @@
* @return The logger.
*/
public Logger getLogger() {
- return this.treeBuilder.getLogger();
+ return this.logger;
}
/**
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoTreeParser4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoTreeParser4a.java 2022-02-27 04:36:17 UTC (rev 12620)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoTreeParser4a.java 2022-02-27 04:52:52 UTC (rev 12621)
@@ -274,12 +274,12 @@
public void startDocument() throws SAXException {
// Allow the FoTreeBuilder to be reused
this.rootFObj = null;
- getLogger().info("Begin parsing the Formatting Object (FO) input.");
+ infoMessage("Begin parsing the Formatting Object (FO) input.");
}
@Override
public void endDocument() throws SAXException {
- getLogger().info("End parsing the Formatting Object (FO) input.");
+ infoMessage("End parsing the Formatting Object (FO) input.");
try {
notifyDocumentComplete();
} catch (final FoTreeException e) {
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Root4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Root4a.java 2022-02-27 04:36:17 UTC (rev 12620)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Root4a.java 2022-02-27 04:52:52 UTC (rev 12621)
@@ -42,8 +42,6 @@
import org.axsl.fotree.fo.Root;
import org.axsl.fotree.text.FoOrthographyServer;
-import org.slf4j.Logger;
-
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
@@ -57,7 +55,7 @@
public class Root4a extends FoObj implements Root {
/** The "parent" FoTreeBuilder. */
- private FoTree4a treeBuilder;
+ private FoTree4a foTree;
/** The children of this object. */
private List<FoObj> children = new ArrayList<FoObj>();
@@ -92,7 +90,7 @@
*/
public Root4a(final FoTree4a foTree, final PropertyList propertyList) {
super(null);
- this.treeBuilder = foTree;
+ this.foTree = foTree;
this.propertyList = propertyList;
}
@@ -162,15 +160,6 @@
/**
* {@inheritDoc}
- * Overrides the FoObj method, because this is the top of the tree.
- */
- @Override
- public Logger getLogger() {
- return this.treeBuilder.getLogger();
- }
-
- /**
- * {@inheritDoc}
* Overrides the method in FoObj because Root has no parent.
*/
@Override
@@ -229,7 +218,7 @@
*/
@Override
public FoTree4a getFoTree() {
- return this.treeBuilder;
+ return this.foTree;
}
/**
@@ -237,7 +226,7 @@
* @param treeBuilder The new "parent" tree builder.
*/
public void setFOTreeBuilder(final FoTree4a treeBuilder) {
- this.treeBuilder = treeBuilder;
+ this.foTree = treeBuilder;
}
@Override
@@ -502,7 +491,7 @@
@Override
public FoOrthographyServer getOrthographyServer() {
- return this.treeBuilder.getOrthographyServer();
+ return this.foTree.getOrthographyServer();
}
@Override
Modified: trunk/foray/foray-xml/src/main/java/org/foray/xml/SaxParser.java
===================================================================
--- trunk/foray/foray-xml/src/main/java/org/foray/xml/SaxParser.java 2022-02-27 04:36:17 UTC (rev 12620)
+++ trunk/foray/foray-xml/src/main/java/org/foray/xml/SaxParser.java 2022-02-27 04:52:52 UTC (rev 12621)
@@ -129,14 +129,6 @@
}
/**
- * Returns the logger for this parser.
- * @return The logger;
- */
- public final Logger getLogger() {
- return this.logger;
- }
-
- /**
* Returns the current location in the input document as a formatted string.
* @return The current location in the input document as a formatted string.
*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-02-27 04:36:19
|
Revision: 12620
http://sourceforge.net/p/foray/code/12620
Author: victormote
Date: 2022-02-27 04:36:17 +0000 (Sun, 27 Feb 2022)
Log Message:
-----------
Conform to aXSL change: Remove throw of Exception in favor of simply returning null if no match is found.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java
trunk/foray/foray-speech/src/main/java/org/foray/speech/SpeechServer4a.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java 2022-02-26 21:29:25 UTC (rev 12619)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java 2022-02-27 04:36:17 UTC (rev 12620)
@@ -79,7 +79,6 @@
import org.axsl.kp.KpLeaf;
import org.axsl.orthography.Orthography;
import org.axsl.orthography.OrthographyServer;
-import org.axsl.speech.SpeechException;
import org.axsl.speech.SpeechServer;
import org.axsl.speech.Voice;
import org.axsl.value.AbsoluteDirection;
@@ -2933,11 +2932,9 @@
* inexpensive to compute. */
final SpeechServer speechServer = this.getSpeechServer();
final String[] familyList = getPropertyList().getVoiceFamily(this, context);
- Voice selectedVoice = null;
- try {
- selectedVoice = speechServer.selectVoiceXsl(familyList);
- } catch (final SpeechException e) {
- this.getLogger().error("Error creating Voice.\n" + this.getContextMessage());
+ final Voice selectedVoice = speechServer.selectVoiceXsl(familyList);
+ if (selectedVoice == null) {
+ this.getFoTree().getLogger().error("Error creating Voice.\n" + this.getContextMessage());
}
return selectedVoice;
}
@@ -2969,7 +2966,7 @@
final FontUse resolvedFont = fontConsumer.selectFontXsl(strategy, fontFamily, style, weight, variant, stretch,
size, firstChar);
if (resolvedFont == null) {
- getLogger().error("Error creating Font.\n" + this.getContextMessage());
+ this.getFoTree().getLogger().error("Error creating Font.\n" + this.getContextMessage());
}
return resolvedFont;
}
Modified: trunk/foray/foray-speech/src/main/java/org/foray/speech/SpeechServer4a.java
===================================================================
--- trunk/foray/foray-speech/src/main/java/org/foray/speech/SpeechServer4a.java 2022-02-26 21:29:25 UTC (rev 12619)
+++ trunk/foray/foray-speech/src/main/java/org/foray/speech/SpeechServer4a.java 2022-02-27 04:36:17 UTC (rev 12620)
@@ -28,7 +28,6 @@
package org.foray.speech;
-import org.axsl.speech.SpeechException;
import org.axsl.speech.SpeechServer;
import org.axsl.speech.Voice;
@@ -62,14 +61,12 @@
}
@Override
- public Voice selectVoiceXsl(final String[] familyList)
- throws SpeechException {
+ public Voice selectVoiceXsl(final String[] familyList) {
return selectVoiceCss(familyList);
}
@Override
- public Voice selectVoiceCss(final String[] familyList)
- throws SpeechException {
+ public Voice selectVoiceCss(final String[] familyList) {
if (familyList == null) {
return SpeechServer4a.DEFAULT_VOICE;
} else {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-02-26 21:29:28
|
Revision: 12619
http://sourceforge.net/p/foray/code/12619
Author: victormote
Date: 2022-02-26 21:29:25 +0000 (Sat, 26 Feb 2022)
Log Message:
-----------
Steps toward eliminating Logger from public API of parser classes.
Modified Paths:
--------------
trunk/foray/foray-font/src/main/java/org/foray/font/config/FontConfigParser.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/DictionaryParser.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/OrthographyParser.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/ValidateChars.java
trunk/foray/foray-xml/src/main/java/org/foray/xml/SaxParser.java
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/config/FontConfigParser.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/config/FontConfigParser.java 2022-02-26 20:36:19 UTC (rev 12618)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/config/FontConfigParser.java 2022-02-26 21:29:25 UTC (rev 12619)
@@ -142,7 +142,7 @@
} catch (final MalformedURLException e) {
/* This shouldn't fail, but if it does, there isn't much that can
* be done. */
- getLogger().error(e.getMessage());
+ errorMessage(e.getMessage());
}
}
@@ -259,8 +259,7 @@
final URL baseFontUrl = this.fontServer.getBaseFontURL();
if (baseFontUrl != null) {
value = baseFontUrl.toExternalForm();
- getLogger().debug("FONT_BASE_DIRECTORY interpreted as: "
- + value);
+ debugMessage("FONT_BASE_DIRECTORY interpreted as: " + value);
}
}
}
@@ -465,7 +464,7 @@
* of invalidating everything. */
this.fontServer.setFatalConfigurationError(true);
}
- getLogger().debug("Font file: " + fontFileSource.toExternalForm());
+ debugMessage("Font file: " + fontFileSource.toExternalForm());
}
URL metricsFileSource = null;
@@ -478,7 +477,7 @@
* of invalidating everything. */
this.fontServer.setFatalConfigurationError(true);
}
- getLogger().debug("Metrics file: " + metricsFileSource.toExternalForm());
+ debugMessage("Metrics file: " + metricsFileSource.toExternalForm());
}
/* TODO vh: check that if ref is declared, it is alone */
@@ -790,7 +789,7 @@
* @param message The warning message.
*/
private void logWarning(final String message) {
- getLogger().warn(message + "\n" + getContextMessage());
+ warningMessage(message + "\n" + getContextMessage());
}
/**
@@ -798,7 +797,7 @@
* @param message The error message.
*/
private void logError(final String message) {
- getLogger().error(message + "\n" + getContextMessage());
+ errorMessage(message + "\n" + getContextMessage());
}
/**
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/DictionaryParser.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/DictionaryParser.java 2022-02-26 20:36:19 UTC (rev 12618)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/DictionaryParser.java 2022-02-26 21:29:25 UTC (rev 12619)
@@ -142,7 +142,7 @@
*/
public List<SegmentDictionary> parse(final InputSource inputSource)
throws IOException, SAXException, ParserConfigurationException {
- getLogger().debug("Begin dictionary word list parsing: " + inputSource.getSystemId());
+ debugMessage("Begin dictionary word list parsing: " + inputSource.getSystemId());
final XMLReader parser = createSax2Parser(true, true, true, ForayEntityResolver.getInstance(), false);
if (parser != null) {
@@ -294,7 +294,7 @@
final String country = attributes.getValue(StringUtils.EMPTY_STRING, "country");
final String script = attributes.getValue(StringUtils.EMPTY_STRING, "script");
this.currentDictionary.orthography = WritingSystem4a.find(language, script, country);
- getLogger().debug("Begin dictionary word list parsing: " + this.currentDictionary.orthography.toString());
+ debugMessage("Begin dictionary word list parsing: " + this.currentDictionary.orthography.toString());
final String soft = attributes.getValue(StringUtils.EMPTY_STRING, "soft-hyphen-char");
if (soft.length() != 1) {
throw new SAXException("Attribute soft-hyphen-char must have exactly one char.");
@@ -353,7 +353,7 @@
if (this.logDictionaryProblems) {
final String actualContentLowercase = actualContent.toLowerCase();
if (actualContentLowercase.compareTo(this.lastWord) < 0) {
- getLogger().warn("Out of alphabetical sequence: " + actualContent + " " + getLocationString());
+ warningMessage("Out of alphabetical sequence: " + actualContent + " " + getLocationString());
}
this.lastWord = actualContentLowercase;
}
@@ -429,9 +429,9 @@
case "ordinal": break;
case "word-group": break;
case "axsl-dictionary": {
- getLogger().debug("End parsing for dictionary: " + this.currentDictionary.orthography.toString());
- getLogger().debug("Qty of unique word segments parsed: " + segmentSet.size());
- getLogger().debug("Qty of words parsed: " + wordMap.size());
+ debugMessage("End parsing for dictionary: " + this.currentDictionary.orthography.toString());
+ debugMessage("Qty of unique word segments parsed: " + segmentSet.size());
+ debugMessage("Qty of words parsed: " + wordMap.size());
break;
}
case "axsl-dictionaries": break;
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/OrthographyParser.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/OrthographyParser.java 2022-02-26 20:36:19 UTC (rev 12618)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/OrthographyParser.java 2022-02-26 21:29:25 UTC (rev 12619)
@@ -241,8 +241,8 @@
final String reference = attributes.getValue("reference");
final DictionaryResource resource = this.dictionaries.get(reference);
if (resource == null) {
- getLogger().error("dictionary-resource not found: {}", reference);
- getLogger().error(getLocationString());
+ errorMessage("dictionary-resource not found: {}", reference);
+ errorMessage(getLocationString());
} else {
this.currentOrthographyConfig.setDictionaryResource(resource);
}
@@ -252,8 +252,8 @@
final String reference = attributes.getValue("reference");
final HyphenationPatternsResource resource = this.hyphenationPatterns.get(reference);
if (resource == null) {
- getLogger().error("hyphenation-patterns-resource not found: {}", reference);
- getLogger().error(getLocationString());
+ errorMessage("hyphenation-patterns-resource not found: {}", reference);
+ errorMessage(getLocationString());
} else {
this.currentOrthographyConfig.setHyphenationPatternsResource(resource);
}
@@ -263,8 +263,8 @@
final String reference = attributes.getValue("reference");
final List<Pattern> patterns = this.hyphenationServer.getMatchRules(reference);
if (patterns == null) {
- getLogger().error("match-rules not found: {}", reference);
- getLogger().error(getLocationString());
+ errorMessage("match-rules not found: {}", reference);
+ errorMessage(getLocationString());
} else {
this.currentOrthographyConfig.registerMatchRuleListId(reference);
}
@@ -274,8 +274,8 @@
final String reference = attributes.getValue("reference");
final List<DerivativePattern> rules = this.hyphenationServer.getDerivativePatterns(reference);
if (rules == null) {
- getLogger().error("derivative-rules not found: {}", reference);
- getLogger().error(getLocationString());
+ errorMessage("derivative-rules not found: {}", reference);
+ errorMessage(getLocationString());
} else {
this.currentOrthographyConfig.registerDerivativeRuleListId(reference);
}
@@ -285,8 +285,8 @@
final String reference = attributes.getValue("reference");
final List<WordWrapperFactory<?>> factories = this.derivativeLists.get(reference);
if (factories == null) {
- getLogger().error("derivative-factories not found: {}", reference);
- getLogger().error(getLocationString());
+ errorMessage("derivative-factories not found: {}", reference);
+ errorMessage(getLocationString());
} else {
this.currentOrthographyConfig.setWordWrapperFactories(factories);
}
@@ -422,7 +422,7 @@
case "extensible": return;
default: {
/* Make sure user knows about unknown tag. */
- getLogger().error("Unknown tag in orthography configuration: {}", localName);
+ errorMessage("Unknown tag in orthography configuration: {}", localName);
}
}
}
@@ -437,23 +437,23 @@
final String scriptString = attributes.getValue("script-iso-4char");
final Language4a language = Language4a.findFrom3Char(languageString);
if (language == null) {
- getLogger().error("Unable to find language for: {}", languageString);
- getLogger().error(getLocationString());
+ errorMessage("Unable to find language for: {}", languageString);
+ errorMessage(getLocationString());
}
final Script4a script = Script4a.findFromAlpha(scriptString);
if (script == null) {
- getLogger().error("Unable to find script for: {}", scriptString);
- getLogger().error(getLocationString());
+ errorMessage("Unable to find script for: {}", scriptString);
+ errorMessage(getLocationString());
}
final Country4a country = Country4a.findFrom3Char(countryString);
if (country == null) {
- getLogger().error("Unable to find country for: {}", countryString);
- getLogger().error(getLocationString());
+ errorMessage("Unable to find country for: {}", countryString);
+ errorMessage(getLocationString());
}
final WritingSystem4a writingSystem = WritingSystem4a.find(language, script, country);
if (writingSystem == null) {
- getLogger().error("Unable to find script for: {}_{}_{}", languageString, scriptString, countryString);
- getLogger().error(getLocationString());
+ errorMessage("Unable to find script for: {}_{}_{}", languageString, scriptString, countryString);
+ errorMessage(getLocationString());
}
this.hyphenationServer.registerOrthography(writingSystem, this.currentOrthographyConfig);
}
@@ -620,8 +620,8 @@
try {
return new URL(urlString);
} catch (final MalformedURLException e) {
- getLogger().error("Invalid URL: {}", urlString);
- getLogger().error(getLocationString());
+ errorMessage("Invalid URL: {}", urlString);
+ errorMessage(getLocationString());
return null;
}
}
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/ValidateChars.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/ValidateChars.java 2022-02-26 20:36:19 UTC (rev 12618)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/ValidateChars.java 2022-02-26 21:29:25 UTC (rev 12619)
@@ -160,8 +160,7 @@
final NaturalLanguage nl = this.server.getNaturalLanguage(
this.iso639);
if (nl == null) {
- getLogger().error("Cannot get NaturalLanguage instance for: "
- + this.iso639.getEnglishName());
+ errorMessage("Cannot get NaturalLanguage instance for: " + this.iso639.getEnglishName());
return;
}
final int invalidChar = nl.validateText(content);
@@ -168,7 +167,7 @@
if (invalidChar < 0) {
return;
}
- this.getLogger().error("Invalid char at index: " + invalidChar);
+ errorMessage("Invalid char at index: " + invalidChar);
}
/**
Modified: trunk/foray/foray-xml/src/main/java/org/foray/xml/SaxParser.java
===================================================================
--- trunk/foray/foray-xml/src/main/java/org/foray/xml/SaxParser.java 2022-02-26 20:36:19 UTC (rev 12618)
+++ trunk/foray/foray-xml/src/main/java/org/foray/xml/SaxParser.java 2022-02-26 21:29:25 UTC (rev 12619)
@@ -141,6 +141,9 @@
* @return The current location in the input document as a formatted string.
*/
protected String getLocationString() {
+ if (this.locator == null) {
+ return StringUtils.EMPTY_STRING;
+ }
return String.format(LOCATION_FORMAT_STRING, this.locator.getSystemId(), this.locator.getLineNumber(),
this.locator.getColumnNumber());
}
@@ -150,6 +153,9 @@
* @return The line and column number of the current location in the input document as a formatted string.
*/
protected String getShortLocationString() {
+ if (this.locator == null) {
+ return StringUtils.EMPTY_STRING;
+ }
return String.format(SHORT_LOCATION_FORMAT_STRING, 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...> - 2022-02-26 20:36:23
|
Revision: 12618
http://sourceforge.net/p/foray/code/12618
Author: victormote
Date: 2022-02-26 20:36:19 +0000 (Sat, 26 Feb 2022)
Log Message:
-----------
Steps toward eliminating Logger from public API of parser classes.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/Namespace.java
trunk/foray/foray-xml/build.gradle
trunk/foray/foray-xml/src/main/java/org/foray/xml/ForayPretty.java
trunk/foray/foray-xml/src/main/java/org/foray/xml/SaxParser.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/Namespace.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/Namespace.java 2022-02-26 19:56:51 UTC (rev 12617)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/Namespace.java 2022-02-26 20:36:19 UTC (rev 12618)
@@ -136,7 +136,7 @@
sb.append("unavailable");
}
if (this.errorCount == 0) {
- builder.getLogger().error(sb.toString());
+ builder.errorMessage(sb.toString());
}
this.errorCount++;
}
Modified: trunk/foray/foray-xml/build.gradle
===================================================================
--- trunk/foray/foray-xml/build.gradle 2022-02-26 19:56:51 UTC (rev 12617)
+++ trunk/foray/foray-xml/build.gradle 2022-02-26 20:36:19 UTC (rev 12618)
@@ -5,8 +5,7 @@
description = 'foray-xml'
dependencies {
- /* Dependency on SLF4J is "api" so that org.foray.xml.SaxParser can provide a logger to subclasses. */
- api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
+ implementation group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
implementation group: 'commons-cli', name: 'commons-cli', version: versions.commonsCli
implementation group: 'xml-resolver', name: 'xml-resolver', version: versions.xmlResolver
Modified: trunk/foray/foray-xml/src/main/java/org/foray/xml/ForayPretty.java
===================================================================
--- trunk/foray/foray-xml/src/main/java/org/foray/xml/ForayPretty.java 2022-02-26 19:56:51 UTC (rev 12617)
+++ trunk/foray/foray-xml/src/main/java/org/foray/xml/ForayPretty.java 2022-02-26 20:36:19 UTC (rev 12618)
@@ -596,7 +596,7 @@
/* Following line for debugging only */
this.output.flush();
} catch (final IOException e) {
- getLogger().error("Error converting text.");
+ errorMessage("Error converting text.");
}
final int lastLineBreakIndex = outputString.lastIndexOf(
this.lineTerminator);
Modified: trunk/foray/foray-xml/src/main/java/org/foray/xml/SaxParser.java
===================================================================
--- trunk/foray/foray-xml/src/main/java/org/foray/xml/SaxParser.java 2022-02-26 19:56:51 UTC (rev 12617)
+++ trunk/foray/foray-xml/src/main/java/org/foray/xml/SaxParser.java 2022-02-26 20:36:19 UTC (rev 12618)
@@ -197,9 +197,9 @@
try {
xmlReader.setFeature("http://xml.org/sax/features/validation", true);
} catch (final SAXNotRecognizedException e) {
- getLogger().warn("Parser does not recognize validation.");
+ this.logger.warn("Parser does not recognize validation.");
} catch (final SAXNotSupportedException e) {
- getLogger().warn("Parser does not support validation.");
+ this.logger.warn("Parser does not support validation.");
}
}
@@ -207,7 +207,7 @@
try {
xmlReader.setProperty("http://xml.org/sax/properties/lexical-handler", this);
} catch (final SAXNotSupportedException e1) {
- getLogger().error("Parser does not support LexicalHandler.");
+ this.logger.error("Parser does not support LexicalHandler.");
}
/* Bind the DeclHandler to the XMLReader if possible. */
@@ -214,7 +214,7 @@
try {
xmlReader.setProperty("http://xml.org/sax/properties/declaration-handler", this);
} catch (final SAXNotSupportedException e) {
- getLogger().error("Parser does not support Declaration Handler.");
+ this.logger.error("Parser does not support Declaration Handler.");
}
if (notifyCharRefs) {
@@ -226,7 +226,7 @@
xmlReader.setContentHandler(this);
xmlReader.setErrorHandler(this);
- getLogger().debug("{}: Using {} as SAX2 Parser", this.getClass().getName(), xmlReader.getClass().getName());
+ this.logger.debug("{}: Using {} as SAX2 Parser", this.getClass().getName(), xmlReader.getClass().getName());
return xmlReader;
}
@@ -249,7 +249,7 @@
throw new SAXException(e);
}
if (! expectedType.isAssignableFrom(theClass)) {
- getLogger().warn("Class \"{}\" is not a {} class.", className, expectedType.getName());
+ this.logger.warn("Class \"{}\" is not a {} class.", className, expectedType.getName());
return null;
}
@@ -311,32 +311,66 @@
}
@Override
+ public void error(final SAXParseException ex) {
+ this.logger.error(ex.getMessage());
+ }
+
+ @Override
public void warning(final SAXParseException ex) {
this.logger.warn(ex.getMessage());
}
/**
+ * Logs an error message, noting the location currently being parsed.
+ * @param message The message to be logged.
+ * @param arguments Parameters for the string template, if needed.
+ */
+ public void errorMessage(final String message, final Object... arguments) {
+ final String template = getLocationString() + ": " + message;
+ this.logger.error(template, arguments);
+ }
+
+ /**
* Logs a warning message, noting the location currently being parsed.
* @param message The message to be logged.
+ * @param arguments Parameters for the string template, if needed.
*/
- public void warningMessage(final String message) {
- this.logger.warn(getLocationString() + ": " + message);
+ public void warningMessage(final String message, final Object... arguments) {
+ final String template = getLocationString() + ": " + message;
+ this.logger.warn(template, arguments);
}
- @Override
- public void error(final SAXParseException ex) {
- this.logger.error(ex.getMessage());
+ /**
+ * Logs an info message, noting the location currently being parsed.
+ * @param message The message to be logged.
+ * @param arguments Parameters for the string template, if needed.
+ */
+ public void infoMessage(final String message, final Object... arguments) {
+ final String template = getLocationString() + ": " + message;
+ this.logger.info(template, arguments);
}
/**
- * Logs an error message, noting the location currently being parsed.
+ * Logs a debug message, noting the location currently being parsed.
* @param message The message to be logged.
+ * @param arguments Parameters for the string template, if needed.
*/
- public void errorMessage(final String message) {
- this.logger.error(getLocationString() + ": " + message);
+ public void debugMessage(final String message, final Object... arguments) {
+ final String template = getLocationString() + ": " + message;
+ this.logger.debug(template, arguments);
}
/**
+ * Logs a trace message, noting the location currently being parsed.
+ * @param message The message to be logged.
+ * @param arguments Parameters for the string template, if needed.
+ */
+ public void traceMessage(final String message, final Object... arguments) {
+ final String template = getLocationString() + ": " + message;
+ this.logger.trace(template, arguments);
+ }
+
+ /**
* Sets or unsets whether text parsing is active.
* If not active, the text will not be accumulated.
* @param isActive The new value for text parsing active.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-02-26 19:56:54
|
Revision: 12617
http://sourceforge.net/p/foray/code/12617
Author: victormote
Date: 2022-02-26 19:56:51 +0000 (Sat, 26 Feb 2022)
Log Message:
-----------
Improvements to dependency management.
Modified Paths:
--------------
trunk/foray/foray-core/build.gradle
trunk/foray/foray-font/build.gradle
trunk/foray/foray-fotree/build.gradle
trunk/foray/foray-orthography/build.gradle
trunk/foray/foray-xml/build.gradle
Modified: trunk/foray/foray-core/build.gradle
===================================================================
--- trunk/foray/foray-core/build.gradle 2022-02-26 18:06:59 UTC (rev 12616)
+++ trunk/foray/foray-core/build.gradle 2022-02-26 19:56:51 UTC (rev 12617)
@@ -21,6 +21,7 @@
api group: 'org.axsl', name: 'axsl-speech', version: versions.axsl
api group: 'org.axsl', name: 'axsl-linebreak', version: versions.axsl
+ implementation project(':foray-common')
api project(':foray-xml')
}
Modified: trunk/foray/foray-font/build.gradle
===================================================================
--- trunk/foray/foray-font/build.gradle 2022-02-26 18:06:59 UTC (rev 12616)
+++ trunk/foray/foray-font/build.gradle 2022-02-26 19:56:51 UTC (rev 12617)
@@ -13,7 +13,6 @@
api group: 'commons-io', name: 'commons-io', version: versions.commonsIo
implementation group: 'commons-discovery', name: 'commons-discovery', version: versions.commonsDiscovery
-// api group: 'org.apache.ant', name: 'ant-launcher', version: versions.ant
api group: 'commons-cli', name: 'commons-cli', version: versions.commonsCli
api (group: 'org.axsl', name: 'axsl-utility', version: versions.axsl)
@@ -22,12 +21,14 @@
api (group: 'org.axsl', name: 'axsl-orthography', version: versions.axsl)
implementation (group: 'org.axsl', name: 'axsl-unicode', version: versions.axsl)
+ implementation project(':foray-common')
api (project(':foray-xml'))
-
testImplementation group: 'junit', name: 'junit', version: versions.junit
testImplementation group: 'org.mockito', name: 'mockito-core', version: versions.mockito
testRuntimeOnly (project(':foray-ps'))
+
+ testFixturesImplementation project(':foray-common')
}
Modified: trunk/foray/foray-fotree/build.gradle
===================================================================
--- trunk/foray/foray-fotree/build.gradle 2022-02-26 18:06:59 UTC (rev 12616)
+++ trunk/foray/foray-fotree/build.gradle 2022-02-26 19:56:51 UTC (rev 12617)
@@ -23,6 +23,7 @@
implementation group: 'org.axsl', name: 'axsl-unicode', version: versions.axsl
api group: 'org.axsl', name: 'axsl-value', version: versions.axsl
+ implementation project(':foray-common')
api project(':foray-xml')
Modified: trunk/foray/foray-orthography/build.gradle
===================================================================
--- trunk/foray/foray-orthography/build.gradle 2022-02-26 18:06:59 UTC (rev 12616)
+++ trunk/foray/foray-orthography/build.gradle 2022-02-26 19:56:51 UTC (rev 12617)
@@ -20,6 +20,7 @@
implementation (group: 'org.axsl', name: 'axsl-unicode', version: versions.axsl)
api (group: 'org.axsl', name: 'axsl-value', version: versions.axsl)
+ implementation project(':foray-common')
api (project(':foray-xml'))
testImplementation group: 'junit', name: 'junit', version: versions.junit
Modified: trunk/foray/foray-xml/build.gradle
===================================================================
--- trunk/foray/foray-xml/build.gradle 2022-02-26 18:06:59 UTC (rev 12616)
+++ trunk/foray/foray-xml/build.gradle 2022-02-26 19:56:51 UTC (rev 12617)
@@ -5,12 +5,12 @@
description = 'foray-xml'
dependencies {
- implementation group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
-
+ /* Dependency on SLF4J is "api" so that org.foray.xml.SaxParser can provide a logger to subclasses. */
+ api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
implementation group: 'commons-cli', name: 'commons-cli', version: versions.commonsCli
implementation group: 'xml-resolver', name: 'xml-resolver', version: versions.xmlResolver
- api project(':foray-common')
+ implementation project(':foray-common')
testImplementation group: 'junit', name: 'junit', version: versions.junit
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-02-26 18:07:02
|
Revision: 12616
http://sourceforge.net/p/foray/code/12616
Author: victormote
Date: 2022-02-26 18:06:59 +0000 (Sat, 26 Feb 2022)
Log Message:
-----------
Move xml-related classes to foray-xml.
Modified Paths:
--------------
trunk/foray/build.gradle
trunk/foray/foray-app/src/main/java/org/foray/demo/embed/tools/AbstractObjectReader.java
trunk/foray/foray-common/build.gradle
trunk/foray/foray-core/build.gradle
trunk/foray/foray-core/src/main/java/org/foray/core/ForayConfigParser.java
trunk/foray/foray-core/src/main/java/org/foray/core/ForayDocument.java
trunk/foray/foray-font/build.gradle
trunk/foray/foray-font/src/main/java/org/foray/font/config/FontConfigParser.java
trunk/foray/foray-fotree/build.gradle
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoTreeParser4a.java
trunk/foray/foray-graphic/src/main/java/org/foray/graphic/GraphicServer4a.java
trunk/foray/foray-orthography/build.gradle
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/DictionaryParser.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/NatLangParser.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/OrthographyParser.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/PatternParser.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/SpellChecker.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/ValidateChars.java
trunk/foray/foray-xml/build.gradle
trunk/foray/foray-xml/src/main/java/org/foray/xml/ForayPretty.java
Added Paths:
-----------
trunk/foray/foray-xml/src/main/java/org/foray/xml/DocumentInputSource.java
trunk/foray/foray-xml/src/main/java/org/foray/xml/DocumentReader.java
trunk/foray/foray-xml/src/main/java/org/foray/xml/SaxParser.java
Removed Paths:
-------------
trunk/foray/foray-common/src/main/java/org/foray/common/xml/
Modified: trunk/foray/build.gradle
===================================================================
--- trunk/foray/build.gradle 2022-02-26 17:40:37 UTC (rev 12615)
+++ trunk/foray/build.gradle 2022-02-26 18:06:59 UTC (rev 12616)
@@ -18,6 +18,11 @@
Runs all tests from all projects.
8. gradle buildHealth
Runs the dependency analysis.
+ 9. gradle <subproject>:dependencies --configuration <configuration-name>
+ where <subproject> is one of: foray-app, foray-areatree, etc.
+ where <configuration-name> is one of: (usually) compileClasspath | runtimeClasspath
+ (see the full list at https://docs.gradle.org/current/userguide/java_plugin.html#tab:configurations)
+ Prints a dependency graph.
*/
plugins {
Modified: trunk/foray/foray-app/src/main/java/org/foray/demo/embed/tools/AbstractObjectReader.java
===================================================================
--- trunk/foray/foray-app/src/main/java/org/foray/demo/embed/tools/AbstractObjectReader.java 2022-02-26 17:40:37 UTC (rev 12615)
+++ trunk/foray/foray-app/src/main/java/org/foray/demo/embed/tools/AbstractObjectReader.java 2022-02-26 18:06:59 UTC (rev 12616)
@@ -28,7 +28,7 @@
package org.foray.demo.embed.tools;
-import org.foray.common.xml.DocumentReader;
+import org.foray.xml.DocumentReader;
import org.xml.sax.ContentHandler;
import org.xml.sax.DTDHandler;
Modified: trunk/foray/foray-common/build.gradle
===================================================================
--- trunk/foray/foray-common/build.gradle 2022-02-26 17:40:37 UTC (rev 12615)
+++ trunk/foray/foray-common/build.gradle 2022-02-26 18:06:59 UTC (rev 12616)
@@ -5,27 +5,22 @@
description = 'foray-common'
dependencies {
- /* TODO: Convert SLF4J "api" dependency to "implementation". */
- api (group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j)
+ /* TODO: foray-common should probably not have a dependency on SLF4J. */
+ implementation (group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j)
+ implementation (group: 'commons-io', name: 'commons-io', version: versions.commonsIo)
+ api (group: 'xml-resolver', name: 'xml-resolver', version: versions.xmlResolver)
+ api (group: 'com.ibm.icu', name: 'icu4j', version: versions.icu4j)
- implementation (group: 'commons-io', name: 'commons-io', version: versions.commonsIo)
- api (group: 'xml-resolver', name: 'xml-resolver', version: versions.xmlResolver)
- api (group: 'com.ibm.icu', name: 'icu4j', version: versions.icu4j)
+ api (group: 'org.axsl', name: 'axsl-utility', version: versions.axsl)
+ api (group: 'org.axsl', name: 'axsl-i18n', version: versions.axsl)
+ api (group: 'org.axsl', name: 'axsl-kp-model', version: versions.axsl)
+ api (group: 'org.axsl', name: 'axsl-orthography', version: versions.axsl)
+ api (group: 'org.axsl', name: 'axsl-ps', version: versions.axsl)
+ api (group: 'org.axsl', name: 'axsl-font', version: versions.axsl)
+ implementation (group: 'org.axsl', name: 'axsl-unicode', version: versions.axsl)
+ api (group: 'org.axsl', name: 'axsl-value', version: versions.axsl)
- api (group: 'org.axsl', name: 'axsl-utility', version: versions.axsl)
- api (group: 'org.axsl', name: 'axsl-i18n', version: versions.axsl)
- api (group: 'org.axsl', name: 'axsl-kp-model', version: versions.axsl)
- api (group: 'org.axsl', name: 'axsl-orthography', version: versions.axsl)
- api (group: 'org.axsl', name: 'axsl-ps', version: versions.axsl)
- api (group: 'org.axsl', name: 'axsl-font', version: versions.axsl)
- implementation (group: 'org.axsl', name: 'axsl-unicode', version: versions.axsl)
- api (group: 'org.axsl', name: 'axsl-value', version: versions.axsl)
-
-
- testImplementation group:
- 'junit', name: 'junit', version: versions.junit
-// testImplementation group:
-// 'org.mockito', name: 'mockito-core', version: versions.mockito
+ testImplementation (group: 'junit', name: 'junit', version: versions.junit)
}
javadoc {
Modified: trunk/foray/foray-core/build.gradle
===================================================================
--- trunk/foray/foray-core/build.gradle 2022-02-26 17:40:37 UTC (rev 12615)
+++ trunk/foray/foray-core/build.gradle 2022-02-26 18:06:59 UTC (rev 12616)
@@ -11,7 +11,6 @@
implementation group: 'xml-resolver', name: 'xml-resolver', version: versions.xmlResolver
api group: 'org.axsl', name: 'axsl-areatree', version: versions.axsl
-// api group: 'org.axsl', name: 'axsl-utility', version: versions.axsl
api group: 'org.axsl', name: 'axsl-fotree', version: versions.axsl
api group: 'org.axsl', name: 'axsl-font', version: versions.axsl
implementation group: 'org.axsl', name: 'axsl-galley', version: versions.axsl
@@ -22,8 +21,7 @@
api group: 'org.axsl', name: 'axsl-speech', version: versions.axsl
api group: 'org.axsl', name: 'axsl-linebreak', version: versions.axsl
- api project(':foray-common')
-
+ api project(':foray-xml')
}
javadoc {
Modified: trunk/foray/foray-core/src/main/java/org/foray/core/ForayConfigParser.java
===================================================================
--- trunk/foray/foray-core/src/main/java/org/foray/core/ForayConfigParser.java 2022-02-26 17:40:37 UTC (rev 12615)
+++ trunk/foray/foray-core/src/main/java/org/foray/core/ForayConfigParser.java 2022-02-26 18:06:59 UTC (rev 12616)
@@ -31,7 +31,7 @@
import org.foray.common.Configuration;
import org.foray.common.ConfigurationException;
import org.foray.common.ForayEntityResolver;
-import org.foray.common.xml.SaxParser;
+import org.foray.xml.SaxParser;
import org.xml.sax.Attributes;
import org.xml.sax.EntityResolver;
Modified: trunk/foray/foray-core/src/main/java/org/foray/core/ForayDocument.java
===================================================================
--- trunk/foray/foray-core/src/main/java/org/foray/core/ForayDocument.java 2022-02-26 17:40:37 UTC (rev 12615)
+++ trunk/foray/foray-core/src/main/java/org/foray/core/ForayDocument.java 2022-02-26 18:06:59 UTC (rev 12616)
@@ -28,9 +28,9 @@
package org.foray.core;
-import org.foray.common.xml.DocumentInputSource;
-import org.foray.common.xml.DocumentReader;
-import org.foray.common.xml.SaxParser;
+import org.foray.xml.DocumentInputSource;
+import org.foray.xml.DocumentReader;
+import org.foray.xml.SaxParser;
import org.axsl.area.AreaTreeFactory;
import org.axsl.font.FontConsumer;
Modified: trunk/foray/foray-font/build.gradle
===================================================================
--- trunk/foray/foray-font/build.gradle 2022-02-26 17:40:37 UTC (rev 12615)
+++ trunk/foray/foray-font/build.gradle 2022-02-26 18:06:59 UTC (rev 12616)
@@ -22,7 +22,7 @@
api (group: 'org.axsl', name: 'axsl-orthography', version: versions.axsl)
implementation (group: 'org.axsl', name: 'axsl-unicode', version: versions.axsl)
- api (project(':foray-common'))
+ api (project(':foray-xml'))
testImplementation group: 'junit', name: 'junit', version: versions.junit
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/config/FontConfigParser.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/config/FontConfigParser.java 2022-02-26 17:40:37 UTC (rev 12615)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/config/FontConfigParser.java 2022-02-26 18:06:59 UTC (rev 12616)
@@ -30,8 +30,8 @@
import org.foray.common.ForayEntityResolver;
import org.foray.common.url.UrlFactory;
-import org.foray.common.xml.SaxParser;
import org.foray.font.FontServer4a;
+import org.foray.xml.SaxParser;
import org.axsl.font.Font;
import org.axsl.font.FontException;
Modified: trunk/foray/foray-fotree/build.gradle
===================================================================
--- trunk/foray/foray-fotree/build.gradle 2022-02-26 17:40:37 UTC (rev 12615)
+++ trunk/foray/foray-fotree/build.gradle 2022-02-26 18:06:59 UTC (rev 12616)
@@ -23,7 +23,7 @@
implementation group: 'org.axsl', name: 'axsl-unicode', version: versions.axsl
api group: 'org.axsl', name: 'axsl-value', version: versions.axsl
- api project(':foray-common')
+ api project(':foray-xml')
testImplementation group: 'junit', name: 'junit', version: versions.junit
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoTreeParser4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoTreeParser4a.java 2022-02-26 17:40:37 UTC (rev 12615)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoTreeParser4a.java 2022-02-26 18:06:59 UTC (rev 12616)
@@ -29,12 +29,12 @@
package org.foray.fotree;
import org.foray.common.primitive.StringUtils;
-import org.foray.common.xml.SaxParser;
import org.foray.fotree.fo.obj.BookmarkTitle4a;
import org.foray.fotree.fo.obj.FoTextCharacters4a;
import org.foray.fotree.fo.obj.FoTextWords4a;
import org.foray.fotree.fo.obj.PageSequence4a;
import org.foray.fotree.fo.obj.Root4a;
+import org.foray.xml.SaxParser;
import org.axsl.fotree.FoTreeEvent;
import org.axsl.fotree.FoTreeException;
Modified: trunk/foray/foray-graphic/src/main/java/org/foray/graphic/GraphicServer4a.java
===================================================================
--- trunk/foray/foray-graphic/src/main/java/org/foray/graphic/GraphicServer4a.java 2022-02-26 17:40:37 UTC (rev 12615)
+++ trunk/foray/foray-graphic/src/main/java/org/foray/graphic/GraphicServer4a.java 2022-02-26 18:06:59 UTC (rev 12616)
@@ -31,7 +31,6 @@
import org.foray.common.MathMlUtil;
import org.foray.common.SvgUtil;
import org.foray.common.url.UrlUtil;
-import org.foray.common.xml.SaxParser;
import org.foray.graphic.factory.BmpFactory;
import org.foray.graphic.factory.EpsFactory;
import org.foray.graphic.factory.GifFactory;
@@ -47,6 +46,7 @@
import org.foray.graphic.output.GraphicOutputFactory;
import org.foray.graphic.output.GraphicPdfFactory;
import org.foray.graphic.output.GraphicPsFactory;
+import org.foray.xml.SaxParser;
import org.axsl.graphic.GraphicException;
import org.axsl.graphic.GraphicServer;
Modified: trunk/foray/foray-orthography/build.gradle
===================================================================
--- trunk/foray/foray-orthography/build.gradle 2022-02-26 17:40:37 UTC (rev 12615)
+++ trunk/foray/foray-orthography/build.gradle 2022-02-26 18:06:59 UTC (rev 12616)
@@ -20,7 +20,7 @@
implementation (group: 'org.axsl', name: 'axsl-unicode', version: versions.axsl)
api (group: 'org.axsl', name: 'axsl-value', version: versions.axsl)
- api (project(':foray-common'))
+ api (project(':foray-xml'))
testImplementation group: 'junit', name: 'junit', version: versions.junit
testImplementation group: 'org.mockito', name: 'mockito-core', version: versions.mockito
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/DictionaryParser.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/DictionaryParser.java 2022-02-26 17:40:37 UTC (rev 12615)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/DictionaryParser.java 2022-02-26 18:06:59 UTC (rev 12616)
@@ -31,7 +31,6 @@
import org.foray.common.ForayEntityResolver;
import org.foray.common.i18n.WritingSystem4a;
import org.foray.common.primitive.StringUtils;
-import org.foray.common.xml.SaxParser;
import org.foray.orthography.AmbiguousWord;
import org.foray.orthography.PosUtils;
import org.foray.orthography.SegmentDictionary;
@@ -41,6 +40,7 @@
import org.foray.orthography.StringWordSegmentFactory;
import org.foray.orthography.StringWordSegmentLatin1Factory;
import org.foray.orthography.StringWordSegmentUtf16Factory;
+import org.foray.xml.SaxParser;
import org.axsl.orthography.Word.PartOfSpeech;
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/NatLangParser.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/NatLangParser.java 2022-02-26 17:40:37 UTC (rev 12615)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/NatLangParser.java 2022-02-26 18:06:59 UTC (rev 12616)
@@ -30,7 +30,7 @@
import org.foray.common.ForayEntityResolver;
import org.foray.common.primitive.UnicodeCharUtils;
-import org.foray.common.xml.SaxParser;
+import org.foray.xml.SaxParser;
import org.xml.sax.Attributes;
import org.xml.sax.InputSource;
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/OrthographyParser.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/OrthographyParser.java 2022-02-26 17:40:37 UTC (rev 12615)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/OrthographyParser.java 2022-02-26 18:06:59 UTC (rev 12616)
@@ -36,7 +36,6 @@
import org.foray.common.resource.ResourceLocation;
import org.foray.common.resource.ResourceLocationClasspath;
import org.foray.common.resource.ResourceLocationUrl;
-import org.foray.common.xml.SaxParser;
import org.foray.orthography.DerivativePattern;
import org.foray.orthography.DerivativeRule;
import org.foray.orthography.DictionaryResource;
@@ -45,6 +44,7 @@
import org.foray.orthography.OrthographyServer4a;
import org.foray.orthography.PosUtils;
import org.foray.orthography.WordWrapperFactory;
+import org.foray.xml.SaxParser;
import org.axsl.orthography.Word;
import org.axsl.orthography.Word.DerivativeType;
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/PatternParser.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/PatternParser.java 2022-02-26 17:40:37 UTC (rev 12615)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/PatternParser.java 2022-02-26 18:06:59 UTC (rev 12616)
@@ -33,8 +33,8 @@
package org.foray.orthography.util;
-import org.foray.common.xml.SaxParser;
import org.foray.orthography.PatternTree;
+import org.foray.xml.SaxParser;
import org.axsl.orthography.OrthographyException;
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/SpellChecker.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/SpellChecker.java 2022-02-26 17:40:37 UTC (rev 12615)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/SpellChecker.java 2022-02-26 18:06:59 UTC (rev 12616)
@@ -34,11 +34,11 @@
import org.foray.common.i18n.WritingSystem4a;
import org.foray.common.primitive.ObjectUtils;
import org.foray.common.primitive.XmlUtils;
-import org.foray.common.xml.SaxParser;
import org.foray.orthography.Orthography4a;
import org.foray.orthography.OrthographyServer4a;
import org.foray.orthography.OrthographyServerConfig;
import org.foray.orthography.SegmentDictionary;
+import org.foray.xml.SaxParser;
import org.axsl.i18n.WritingSystem;
import org.axsl.orthography.OrthographyException;
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/ValidateChars.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/ValidateChars.java 2022-02-26 17:40:37 UTC (rev 12615)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/ValidateChars.java 2022-02-26 18:06:59 UTC (rev 12616)
@@ -31,9 +31,9 @@
import org.foray.common.i18n.Language4a;
import org.foray.common.primitive.XmlUtils;
import org.foray.common.url.UrlFactory;
-import org.foray.common.xml.SaxParser;
import org.foray.orthography.OrthographyServer4a;
import org.foray.orthography.OrthographyServerConfig;
+import org.foray.xml.SaxParser;
import org.axsl.i18n.Language;
import org.axsl.orthography.OrthographyException;
Modified: trunk/foray/foray-xml/build.gradle
===================================================================
--- trunk/foray/foray-xml/build.gradle 2022-02-26 17:40:37 UTC (rev 12615)
+++ trunk/foray/foray-xml/build.gradle 2022-02-26 18:06:59 UTC (rev 12616)
@@ -5,8 +5,7 @@
description = 'foray-xml'
dependencies {
- /* TODO: Convert SLF4J "api" dependency to "implementation". */
- api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
+ implementation group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
implementation group: 'commons-cli', name: 'commons-cli', version: versions.commonsCli
implementation group: 'xml-resolver', name: 'xml-resolver', version: versions.xmlResolver
@@ -14,7 +13,6 @@
testImplementation group: 'junit', name: 'junit', version: versions.junit
-
}
javadoc {
Copied: trunk/foray/foray-xml/src/main/java/org/foray/xml/DocumentInputSource.java (from rev 12602, trunk/foray/foray-common/src/main/java/org/foray/common/xml/DocumentInputSource.java)
===================================================================
--- trunk/foray/foray-xml/src/main/java/org/foray/xml/DocumentInputSource.java (rev 0)
+++ trunk/foray/foray-xml/src/main/java/org/foray/xml/DocumentInputSource.java 2022-02-26 18:06:59 UTC (rev 12616)
@@ -0,0 +1,65 @@
+/*
+ * 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.xml;
+
+import org.w3c.dom.Document;
+import org.xml.sax.InputSource;
+
+/**
+ * This is an InputSource to be used with DocumentReader.
+ *
+ * @author Kelly A Campbell
+ *
+ */
+
+public class DocumentInputSource extends InputSource {
+
+ /** The DOM document being read. */
+ private Document document;
+
+ /**
+ * Constructor.
+ * @param document The DOM document to be wrapped.
+ */
+ public DocumentInputSource(final Document document) {
+ super();
+ this.document = document;
+ }
+
+ /**
+ * Returns the wrapped DOM document.
+ * @return The wrapped DOM document.
+ */
+ public Document getDocument() {
+ return this.document;
+ }
+
+}
+
+
Copied: trunk/foray/foray-xml/src/main/java/org/foray/xml/DocumentReader.java (from rev 12602, trunk/foray/foray-common/src/main/java/org/foray/common/xml/DocumentReader.java)
===================================================================
--- trunk/foray/foray-xml/src/main/java/org/foray/xml/DocumentReader.java (rev 0)
+++ trunk/foray/foray-xml/src/main/java/org/foray/xml/DocumentReader.java 2022-02-26 18:06:59 UTC (rev 12616)
@@ -0,0 +1,273 @@
+/*
+ * 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.xml;
+
+import org.w3c.dom.Attr;
+import org.w3c.dom.Document;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.DTDHandler;
+import org.xml.sax.EntityResolver;
+import org.xml.sax.ErrorHandler;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXNotRecognizedException;
+import org.xml.sax.SAXNotSupportedException;
+import org.xml.sax.XMLReader;
+import org.xml.sax.helpers.AttributesImpl;
+
+import java.io.IOException;
+
+/**
+ * This presents a DOM as an XMLReader to make it easy to use a Document
+ * with a SAX-based implementation.
+ *
+ * @author Kelly A Campbell
+ *
+ */
+
+public class DocumentReader implements XMLReader {
+
+ /** Constant for the feature name for "namespaces". */
+ public static final String FEATURE_NAMESPACES
+ = "http://xml.org/sax/features/namespaces";
+
+ /** Constant for the feature name for "namespace-prefixes". */
+ public static final String FEATURE_NAMESPACE_PREFIXES
+ = "http://xml.org/sax/features/namespace-prefixes";
+
+ /** Configuration variable. */
+ private boolean namespaces = true;
+
+ /** Configuration variable. */
+ private boolean namespacePrefixes = true;
+
+ /** The entity resolver for this SAX reader. */
+ private EntityResolver entityResolver = null;
+
+ /** The DTD handler for this SAX reader. */
+ private DTDHandler dtdHandler = null;
+
+ /** The content handler for this SAX reader. */
+ private ContentHandler contentHandler = null;
+
+ /** The error handler for this SAX reader. */
+ private ErrorHandler errorHandler = null;
+
+ @Override
+ public boolean getFeature(final String name)
+ throws SAXNotRecognizedException, SAXNotSupportedException {
+ if (DocumentReader.FEATURE_NAMESPACES.equals(name)) {
+ return this.namespaces;
+ } else if (DocumentReader.FEATURE_NAMESPACE_PREFIXES.equals(name)) {
+ return this.namespacePrefixes;
+ } else {
+ throw new SAXNotRecognizedException("Feature '" + name
+ + "' not recognized or supported by Document2SAXAdapter");
+ }
+
+ }
+
+ @Override
+ public void setFeature(final String name, final boolean value)
+ throws SAXNotRecognizedException, SAXNotSupportedException {
+ if (DocumentReader.FEATURE_NAMESPACES.equals(name)) {
+ this.namespaces = value;
+ } else if (DocumentReader.FEATURE_NAMESPACE_PREFIXES.equals(name)) {
+ this.namespacePrefixes = value;
+ } else {
+ throw new SAXNotRecognizedException("Feature '" + name
+ + "' not recognized or supported by Document2SAXAdapter");
+ }
+
+ }
+
+ @Override
+ public Object getProperty(final String name)
+ throws SAXNotRecognizedException, SAXNotSupportedException {
+ throw new SAXNotRecognizedException("Property '" + name
+ + "' not recognized or supported by Document2SAXAdapter");
+ }
+
+ @Override
+ public void setProperty(final String name, final Object value)
+ throws SAXNotRecognizedException, SAXNotSupportedException {
+ throw new SAXNotRecognizedException("Property '" + name
+ + "' not recognized or supported by Document2SAXAdapter");
+ }
+
+ @Override
+ public void setEntityResolver(final EntityResolver resolver) {
+ this.entityResolver = resolver;
+ }
+
+ @Override
+ public EntityResolver getEntityResolver() {
+ return this.entityResolver;
+ }
+
+ @Override
+ public void setDTDHandler(final DTDHandler handler) {
+ this.dtdHandler = handler;
+ }
+
+ @Override
+ public DTDHandler getDTDHandler() {
+ return this.dtdHandler;
+ }
+
+ @Override
+ public void setContentHandler(final ContentHandler handler) {
+ this.contentHandler = handler;
+ }
+
+ @Override
+ public ContentHandler getContentHandler() {
+ return this.contentHandler;
+ }
+
+ @Override
+ public void setErrorHandler(final ErrorHandler handler) {
+ this.errorHandler = handler;
+ }
+
+ @Override
+ public ErrorHandler getErrorHandler() {
+ return this.errorHandler;
+ }
+
+ @Override
+ public void parse(final InputSource input) throws IOException,
+ SAXException {
+ if (input instanceof DocumentInputSource) {
+ final Document document =
+ ((DocumentInputSource) input).getDocument();
+ if (this.contentHandler == null) {
+ throw new SAXException("ContentHandler is null. Please use "
+ + "setContentHandler()");
+ }
+
+ /* most of this code is modified from John Cowan's */
+
+ Node currentNode;
+ final AttributesImpl currentAtts;
+
+ /* temporary array for making Strings into character arrays */
+ char[] array = null;
+
+ currentAtts = new AttributesImpl();
+
+ /* start at the document element */
+ currentNode = document;
+ while (currentNode != null) {
+ switch (currentNode.getNodeType()) {
+ case Node.DOCUMENT_NODE:
+ this.contentHandler.startDocument();
+ break;
+ case Node.CDATA_SECTION_NODE:
+ case Node.TEXT_NODE:
+ final String data = currentNode.getNodeValue();
+ final int datalen = data.length();
+ if (array == null || array.length < datalen) {
+ /*
+ * if the array isn't big enough, make a new
+ * one
+ */
+ array = new char[datalen];
+ }
+ data.getChars(0, datalen, array, 0);
+ this.contentHandler.characters(array, 0, datalen);
+ break;
+ case Node.PROCESSING_INSTRUCTION_NODE:
+ this.contentHandler.processingInstruction(
+ currentNode.getNodeName(),
+ currentNode.getNodeValue());
+ break;
+ case Node.ELEMENT_NODE:
+ final NamedNodeMap map = currentNode.getAttributes();
+ currentAtts.clear();
+ for (int i = map.getLength() - 1; i >= 0; i--) {
+ final Attr att = (Attr) map.item(i);
+ currentAtts.addAttribute(att.getNamespaceURI(),
+ att.getLocalName(),
+ att.getName(), "CDATA",
+ att.getValue());
+ }
+ this.contentHandler.startElement(
+ currentNode.getNamespaceURI(),
+ currentNode.getLocalName(),
+ currentNode.getNodeName(),
+ currentAtts);
+ break;
+ }
+
+ Node nextNode = currentNode.getFirstChild();
+ if (nextNode != null) {
+ currentNode = nextNode;
+ continue;
+ }
+
+ while (currentNode != null) {
+ switch (currentNode.getNodeType()) {
+ case Node.DOCUMENT_NODE:
+ this.contentHandler.endDocument();
+ break;
+ case Node.ELEMENT_NODE:
+ this.contentHandler.endElement(
+ currentNode.getNamespaceURI(),
+ currentNode.getLocalName(),
+ currentNode.getNodeName());
+ break;
+ }
+
+ nextNode = currentNode.getNextSibling();
+ if (nextNode != null) {
+ currentNode = nextNode;
+ break;
+ }
+
+ currentNode = currentNode.getParentNode();
+ }
+ }
+
+ } else {
+ throw new SAXException("DocumentReader only supports parsing of a "
+ + "DocumentInputSource");
+ }
+
+ }
+
+ @Override
+ public void parse(final String systemId) throws IOException, SAXException {
+ throw new SAXException("DocumentReader only supports parsing of a "
+ + "DocumentInputSource");
+ }
+
+}
Modified: trunk/foray/foray-xml/src/main/java/org/foray/xml/ForayPretty.java
===================================================================
--- trunk/foray/foray-xml/src/main/java/org/foray/xml/ForayPretty.java 2022-02-26 17:40:37 UTC (rev 12615)
+++ trunk/foray/foray-xml/src/main/java/org/foray/xml/ForayPretty.java 2022-02-26 18:06:59 UTC (rev 12616)
@@ -29,7 +29,6 @@
package org.foray.xml;
import org.foray.common.primitive.XmlUtils;
-import org.foray.common.xml.SaxParser;
import org.foray.xml.dtd.Dtd;
import org.foray.xml.dtd.DtdElement;
import org.foray.xml.dtd.ElementStack;
Copied: trunk/foray/foray-xml/src/main/java/org/foray/xml/SaxParser.java (from rev 12602, trunk/foray/foray-common/src/main/java/org/foray/common/xml/SaxParser.java)
===================================================================
--- trunk/foray/foray-xml/src/main/java/org/foray/xml/SaxParser.java (rev 0)
+++ trunk/foray/foray-xml/src/main/java/org/foray/xml/SaxParser.java 2022-02-26 18:06:59 UTC (rev 12616)
@@ -0,0 +1,348 @@
+/*
+ * 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.xml;
+
+import org.foray.common.primitive.StringUtils;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+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.SAXParseException;
+import org.xml.sax.XMLReader;
+import org.xml.sax.ext.DefaultHandler2;
+
+import java.io.IOException;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.net.URL;
+
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParserFactory;
+
+/**
+ * Abstract superclass for SAX parsers.
+ * @param <T> The type of object that should be produced by this parser.
+ */
+public abstract class SaxParser<T extends Object> extends DefaultHandler2 {
+
+ /** Format string for formatting the current location. */
+ private static final String LOCATION_FORMAT_STRING = "(%1s:%2$d:%3$d)";
+
+ /** Format string for formatting the current location. */
+ private static final String SHORT_LOCATION_FORMAT_STRING = "(%1$d:%2$d)";
+
+ /** Constant used to initialize string builders. */
+ private static final int MAX_EXPECTED_TEXT_LENGTH = 4096;
+
+ /* Register the URLStreamHandler for classpath: URLs.
+ * This has to be done only once, hence a static statement. */
+ static {
+ org.foray.common.url.classpath.Handler.register();
+ }
+
+ /** The locator instance for identifying the document, line, and column number of specific elements. */
+ private Locator locator;
+
+ /** The logger. */
+ private Logger logger = LoggerFactory.getLogger(this.getClass());
+
+ /** Receives content of text nodes. */
+ private StringBuilder textAccumulator = new StringBuilder(MAX_EXPECTED_TEXT_LENGTH);
+
+ /** Flag indicating whether text parsing is active. Some elements in some parsers contain text that should not be
+ * accumulated. */
+ private boolean textParsingActive = true;
+
+ /**
+ * Parses an input document and returns the object that was created.
+ * @param inputSource The input document.
+ * @return The object created by the parsing process.
+ * @throws IOException For IO errors during parsing.
+ * @throws ParserConfigurationException For errors during parser configuration.
+ * @throws SAXException For errors found by the SAX parser.
+ */
+ public abstract T parse(InputSource inputSource) throws IOException, ParserConfigurationException, SAXException;
+
+ /**
+ * Converts a URL to an InputSource and parses it.
+ * @param input The URL whose content is to be parsed.
+ * @return The object created by the parsing process.
+ * @throws IOException For IO errors during parsing.
+ * @throws ParserConfigurationException For errors during parser configuration.
+ * @throws SAXException For errors found by the SAX parser.
+ */
+ public T parse(final URL input)
+ throws IOException, ParserConfigurationException, SAXException {
+ final InputSource inputSource = new InputSource(input.toExternalForm());
+ return parse(inputSource);
+ }
+
+ @Override
+ public void setDocumentLocator(final Locator locator) {
+ this.locator = locator;
+ }
+
+ /**
+ * Returns the name of the SAX Parser class that is found in the classpath.
+ * @return The name of the SAX Parser class that is found in the classpath.
+ */
+ public static String getParserClassName() {
+ try {
+ return SAXParserFactory.newInstance().newSAXParser()
+ .getXMLReader().getClass().getName();
+ } catch (final ParserConfigurationException e) {
+ return null;
+ } catch (final SAXException e) {
+ return null;
+ }
+ }
+
+ /**
+ * Returns the logger for this parser.
+ * @return The logger;
+ */
+ public final Logger getLogger() {
+ return this.logger;
+ }
+
+ /**
+ * Returns the current location in the input document as a formatted string.
+ * @return The current location in the input document as a formatted string.
+ */
+ protected String getLocationString() {
+ return String.format(LOCATION_FORMAT_STRING, this.locator.getSystemId(), this.locator.getLineNumber(),
+ this.locator.getColumnNumber());
+ }
+
+ /**
+ * Returns the line and column number of the current location in the input document as a formatted string.
+ * @return The line and column number of the current location in the input document as a formatted string.
+ */
+ protected String getShortLocationString() {
+ return String.format(SHORT_LOCATION_FORMAT_STRING, this.locator.getLineNumber(),
+ this.locator.getColumnNumber());
+ }
+
+ /**
+ * Returns the locator, if any, for this parsing session.
+ * This may be useful for some subclasses that need fine-grained control over reporting, but most will want to use
+ * {@link #getLocationString()} or {@link #getShortLocationString()} instead.
+ * @return The locator.
+ * @see #getLocationString()
+ * @see #getShortLocationString()
+ */
+ protected Locator getLocator() {
+ return this.locator;
+ }
+
+ /**
+ * Creates a SAX2 parser.
+ * @param validate Indicates whether the parser should validate the document as it parses.
+ * @param namespaceAware Indicates whether the parser should be namespace-aware.
+ * @param namespacePrefixes Indicates wehther the parser should process namespace prefixes.
+ * @param entityResolver Specifies the entity resolver, if any that should be used.
+ * @param notifyCharRefs Indicates whether the "notify-char-refs" feature should be turned on.
+ * This appears to be a Xerces-only feature.
+ * This feature, or something like it is <em>very</em> important for cases where we wish to pass content through
+ * <em>absolutely unchanged.</em>
+ * Without it, character entities get silently transformed into characters without notification.
+ * When we are notified of this transformation, we have the option of ignoring the transformed characters and using
+ * the character entities instead.
+ * @return The newly-created SAX2 parser.
+ * @throws SAXException For errors creating the parser.
+ * @throws ParserConfigurationException For errors configuring the parser.
+ */
+ public XMLReader createSax2Parser(final boolean validate, final boolean namespaceAware,
+ final boolean namespacePrefixes, final EntityResolver entityResolver, final boolean notifyCharRefs)
+ throws SAXException, ParserConfigurationException {
+ final SAXParserFactory spf = javax.xml.parsers.SAXParserFactory.newInstance();
+ spf.setNamespaceAware(namespaceAware);
+ final XMLReader xmlReader = spf.newSAXParser().getXMLReader();
+ xmlReader.setFeature("http://xml.org/sax/features/namespace-prefixes", namespacePrefixes);
+ xmlReader.setEntityResolver(entityResolver);
+
+ /* Turn on validation if it is available. */
+ if (validate) {
+ try {
+ xmlReader.setFeature("http://xml.org/sax/features/validation", true);
+ } catch (final SAXNotRecognizedException e) {
+ getLogger().warn("Parser does not recognize validation.");
+ } catch (final SAXNotSupportedException e) {
+ getLogger().warn("Parser does not support validation.");
+ }
+ }
+
+ /* Bind the LexicalHandler to the XMLReader if possible. */
+ try {
+ xmlReader.setProperty("http://xml.org/sax/properties/lexical-handler", this);
+ } catch (final SAXNotSupportedException e1) {
+ getLogger().error("Parser does not support LexicalHandler.");
+ }
+
+ /* Bind the DeclHandler to the XMLReader if possible. */
+ try {
+ xmlReader.setProperty("http://xml.org/sax/properties/declaration-handler", this);
+ } catch (final SAXNotSupportedException e) {
+ getLogger().error("Parser does not support Declaration Handler.");
+ }
+
+ if (notifyCharRefs) {
+ /* Let any exceptions thrown here bubble up. If this feature has been requested, it is a fatal error if it
+ * is not available. */
+ xmlReader.setFeature("http://apache.org/xml/features/scanner/notify-char-refs", true);
+ }
+
+ xmlReader.setContentHandler(this);
+ xmlReader.setErrorHandler(this);
+
+ getLogger().debug("{}: Using {} as SAX2 Parser", this.getClass().getName(), xmlReader.getClass().getName());
+ return xmlReader;
+ }
+
+ /**
+ * Instantiates an instance of a specified class using reflection, and ensures that it is a subtype of a given type.
+ * @param className The name of the class that should be instantiated.
+ * @param expectedType The expected superclass for {@code className}.
+ * @param <T2> The type of the superclass object that is being instantiated.
+ * @param parameterTypes The array of parameter types.
+ * @param parameters The array of parameters.
+ * @return The new instance of {@code className}, or null if it could not be created.
+ * @throws SAXException Wraps a number of exceptions that can be thrown during instantiation by reflection.
+ */
+ protected <T2 extends Object> T2 instantiate(final String className, final Class<T2> expectedType,
+ final Class<?>[] parameterTypes, final Object[] parameters) throws SAXException {
+ Class<?> theClass = null;
+ try {
+ theClass = Class.forName(className);
+ } catch (final ClassNotFoundException e) {
+ throw new SAXException(e);
+ }
+ if (! expectedType.isAssignableFrom(theClass)) {
+ getLogger().warn("Class \"{}\" is not a {} class.", className, expectedType.getName());
+ return null;
+ }
+
+ @SuppressWarnings("unchecked")
+ final Class<T2> factoryClass = (Class<T2>) theClass;
+ Constructor<T2> constructor = null;
+ try {
+ constructor = factoryClass.getConstructor(parameterTypes);
+ } catch (final SecurityException e) {
+ throw new SAXException(e);
+ } catch (final NoSuchMethodException e) {
+ throw new SAXException(e);
+ }
+
+ T2 newInstance = null;
+ try {
+ newInstance = constructor.newInstance(parameters);
+ } catch (final IllegalArgumentException e) {
+ throw new SAXException(e);
+ } catch (final InstantiationException e) {
+ throw new SAXException(e);
+ } catch (final IllegalAccessException e) {
+ throw new SAXException(e);
+ } catch (final InvocationTargetException e) {
+ throw new SAXException(e);
+ }
+ return newInstance;
+ }
+
+ /**
+ * Uses by subclasses to clear their state so that they can be reused to parse another document.
+ * @throws UnsupportedOperationException If the subclass does not support reuse.
+ */
+ public abstract void reset();
+
+ @Override
+ public void characters(final char[] chars, final int start, final int length) throws SAXException {
+ if (this.textParsingActive) {
+ this.textAccumulator.append(chars, start, length);
+ }
+ }
+
+ /**
+ * Returns whatever text is accumulated, and clears the text buffer.
+ * @return The content of the text buffer before it is cleared.
+ */
+ public String getAndClearText() {
+ final String content = this.textAccumulator.toString();
+ StringUtils.clear(this.textAccumulator);
+ return content;
+ }
+
+ /**
+ * Appends text to the text buffer.
+ * @param chars The text to append to the buffer.
+ */
+ public void appendText(final CharSequence chars) {
+ this.textAccumulator.append(chars);
+ }
+
+ @Override
+ public void warning(final SAXParseException ex) {
+ this.logger.warn(ex.getMessage());
+ }
+
+ /**
+ * Logs a warning message, noting the location currently being parsed.
+ * @param message The message to be logged.
+ */
+ public void warningMessage(final String message) {
+ this.logger.warn(getLocationString() + ": " + message);
+ }
+
+ @Override
+ public void error(final SAXParseException ex) {
+ this.logger.error(ex.getMessage());
+ }
+
+ /**
+ * Logs an error message, noting the location currently being parsed.
+ * @param message The message to be logged.
+ */
+ public void errorMessage(final String message) {
+ this.logger.error(getLocationString() + ": " + message);
+ }
+
+ /**
+ * Sets or unsets whether text parsing is active.
+ * If not active, the text will not be accumulated.
+ * @param isActive The new value for text parsing active.
+ */
+ public void setTextParsingActive(final boolean isActive) {
+ this.textParsingActive = isActive;
+ }
+
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-02-26 17:40:40
|
Revision: 12615
http://sourceforge.net/p/foray/code/12615
Author: victormote
Date: 2022-02-26 17:40:37 +0000 (Sat, 26 Feb 2022)
Log Message:
-----------
Fix Gradle future compatibility warning.
Modified Paths:
--------------
trunk/foray/foray-app/build.gradle
Modified: trunk/foray/foray-app/build.gradle
===================================================================
--- trunk/foray/foray-app/build.gradle 2022-02-26 15:29:21 UTC (rev 12614)
+++ trunk/foray/foray-app/build.gradle 2022-02-26 17:40:37 UTC (rev 12615)
@@ -6,7 +6,7 @@
dependencies {
implementation group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
- runtimeClasspath group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
+ runtimeOnly group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
implementation group: 'javax.servlet', name: 'javax.servlet-api', version: versions.servletApi
implementation group: 'xml-resolver', name: 'xml-resolver', version: versions.xmlResolver
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-02-26 15:29:24
|
Revision: 12614
http://sourceforge.net/p/foray/code/12614
Author: victormote
Date: 2022-02-26 15:29:21 +0000 (Sat, 26 Feb 2022)
Log Message:
-----------
Isolate dependency on a runtime logger to foray-app.
Modified Paths:
--------------
trunk/foray/build.gradle
trunk/foray/foray-app/build.gradle
trunk/foray/foray-areatree/build.gradle
trunk/foray/foray-common/build.gradle
trunk/foray/foray-content/build.gradle
trunk/foray/foray-core/build.gradle
trunk/foray/foray-font/build.gradle
trunk/foray/foray-fotree/build.gradle
trunk/foray/foray-graphic/build.gradle
trunk/foray/foray-layout/build.gradle
trunk/foray/foray-linebreak/build.gradle
trunk/foray/foray-mif/build.gradle
trunk/foray/foray-orthography/build.gradle
trunk/foray/foray-output/build.gradle
trunk/foray/foray-pdf/build.gradle
trunk/foray/foray-pioneer/build.gradle
trunk/foray/foray-ps/build.gradle
trunk/foray/foray-render/build.gradle
trunk/foray/foray-speech/build.gradle
trunk/foray/foray-unicode/build.gradle
trunk/foray/foray-xml/build.gradle
trunk/foray/foray-zz-attic/build.gradle
Removed Paths:
-------------
trunk/foray/foray-00-master/build.gradle
Modified: trunk/foray/build.gradle
===================================================================
--- trunk/foray/build.gradle 2022-02-26 14:07:19 UTC (rev 12613)
+++ trunk/foray/build.gradle 2022-02-26 15:29:21 UTC (rev 12614)
@@ -16,6 +16,8 @@
Validates the html pages for the web.
7. gradle compileJava compileTestJava test
Runs all tests from all projects.
+ 8. gradle buildHealth
+ Runs the dependency analysis.
*/
plugins {
Deleted: trunk/foray/foray-00-master/build.gradle
===================================================================
--- trunk/foray/foray-00-master/build.gradle 2022-02-26 14:07:19 UTC (rev 12613)
+++ trunk/foray/foray-00-master/build.gradle 2022-02-26 15:29:21 UTC (rev 12614)
@@ -1,7 +0,0 @@
-description = 'foray-00-master'
-
-dependencies {
-}
-
-
-/* Last line of script. */
Modified: trunk/foray/foray-app/build.gradle
===================================================================
--- trunk/foray/foray-app/build.gradle 2022-02-26 14:07:19 UTC (rev 12613)
+++ trunk/foray/foray-app/build.gradle 2022-02-26 15:29:21 UTC (rev 12614)
@@ -6,6 +6,8 @@
dependencies {
implementation group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
+ runtimeClasspath group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
+
implementation group: 'javax.servlet', name: 'javax.servlet-api', version: versions.servletApi
implementation group: 'xml-resolver', name: 'xml-resolver', version: versions.xmlResolver
implementation group: 'org.apache.ant', name: 'ant', version: versions.ant
@@ -44,7 +46,6 @@
implementation project(':foray-speech')
implementation project(':foray-linebreak')
- implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
testImplementation group: 'junit', name: 'junit', version: versions.junit
testImplementation group: 'org.mockito', name: 'mockito-core', version: versions.mockito
Modified: trunk/foray/foray-areatree/build.gradle
===================================================================
--- trunk/foray/foray-areatree/build.gradle 2022-02-26 14:07:19 UTC (rev 12613)
+++ trunk/foray/foray-areatree/build.gradle 2022-02-26 15:29:21 UTC (rev 12614)
@@ -5,24 +5,27 @@
description = 'foray-areatree'
dependencies {
+ /* TODO: Convert SLF4J "api" dependency to "implementation". */
api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
- /* Do *** NOT *** add a dependency on axsl-galley, as axsl-areatree should be a superset of axsl-galley. If not, fix
- that instead. */
- api group: 'org.axsl', name: 'axsl-areatree', version: versions.axsl
- api(group: "org.axsl", name: "axsl-font", version: versions.axsl)
- api(group: "org.axsl", name: "axsl-fotree", version: versions.axsl)
- api(group: "org.axsl", name: "axsl-galley", version: versions.axsl)
- api(group: "org.axsl", name: "axsl-graphic", version: versions.axsl)
- api(group: "org.axsl", name: "axsl-i18n", version: versions.axsl)
- api(group: "org.axsl", name: "axsl-orthography", version: versions.axsl)
- api(group: "org.axsl", name: "axsl-value", version: versions.axsl)
- implementation(group: "org.axsl", name: "axsl-unicode", version: versions.axsl)
+ api group: 'org.axsl', name: 'axsl-areatree', version: versions.axsl
+ api group: "org.axsl", name: "axsl-font", version: versions.axsl
+ api group: "org.axsl", name: "axsl-fotree", version: versions.axsl
+ /* We dislike declaring a direct dependency on axsl-galley here as axsl-areatree is intended to be a direct superset
+ * of it, and a dependency on axsl-areatree should be sufficient. Indeed, from a gradle standpoint it is, as gradle
+ * handles the transitive dependency properly. However, there is no build pattern (known to us) that allows a module
+ * to declare that its API is a direct (non-transitive) superset of another module's API. Since we are using the
+ * autonomousapps dependency-analysis tool, which (for good reason) dislikes having transitive dependencies
+ * accidentally leak into the API of client code, we declare a direct dependency on axsl-galley here. */
+ api group: "org.axsl", name: "axsl-galley", version: versions.axsl
+ api group: "org.axsl", name: "axsl-graphic", version: versions.axsl
+ api group: "org.axsl", name: "axsl-i18n", version: versions.axsl
+ api group: "org.axsl", name: "axsl-orthography", version: versions.axsl
+ api group: "org.axsl", name: "axsl-value", version: versions.axsl
+ implementation group: "org.axsl", name: "axsl-unicode", version: versions.axsl
api project(':foray-common')
- implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
-
testImplementation group: 'junit', name: 'junit', version: versions.junit
}
Modified: trunk/foray/foray-common/build.gradle
===================================================================
--- trunk/foray/foray-common/build.gradle 2022-02-26 14:07:19 UTC (rev 12613)
+++ trunk/foray/foray-common/build.gradle 2022-02-26 15:29:21 UTC (rev 12614)
@@ -5,7 +5,9 @@
description = 'foray-common'
dependencies {
+ /* TODO: Convert SLF4J "api" dependency to "implementation". */
api (group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j)
+
implementation (group: 'commons-io', name: 'commons-io', version: versions.commonsIo)
api (group: 'xml-resolver', name: 'xml-resolver', version: versions.xmlResolver)
api (group: 'com.ibm.icu', name: 'icu4j', version: versions.icu4j)
@@ -19,8 +21,6 @@
implementation (group: 'org.axsl', name: 'axsl-unicode', version: versions.axsl)
api (group: 'org.axsl', name: 'axsl-value', version: versions.axsl)
- implementation group:
- 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
testImplementation group:
'junit', name: 'junit', version: versions.junit
Modified: trunk/foray/foray-content/build.gradle
===================================================================
--- trunk/foray/foray-content/build.gradle 2022-02-26 14:07:19 UTC (rev 12613)
+++ trunk/foray/foray-content/build.gradle 2022-02-26 15:29:21 UTC (rev 12614)
@@ -5,8 +5,6 @@
description = 'foray-content'
dependencies {
-// api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
-
api (group: 'org.axsl', name: 'axsl-content', version: versions.axsl)
api (group: 'org.axsl', name: 'axsl-fotree', version: versions.axsl)
api (group: 'org.axsl', name: 'axsl-font', version: versions.axsl)
@@ -15,15 +13,8 @@
api (group: 'org.axsl', name: 'axsl-kp-model', version: versions.axsl)
api (group: 'org.axsl', name: 'axsl-areatree', version: versions.axsl)
implementation (group: 'org.axsl', name: 'axsl-galley', version: versions.axsl)
-// api (group: 'org.axsl', name: 'axsl-context', version: versions.axsl)
-// api (group: 'org.axsl', name: 'axsl-linebreak', version: versions.axsl)
api (project(':foray-common'))
-
- implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
-
-// testImplementation group: 'junit', name: 'junit', version: versions.junit
-// testImplementation group: 'org.mockito', name: 'mockito-core', version: versions.mockito
}
javadoc {
Modified: trunk/foray/foray-core/build.gradle
===================================================================
--- trunk/foray/foray-core/build.gradle 2022-02-26 14:07:19 UTC (rev 12613)
+++ trunk/foray/foray-core/build.gradle 2022-02-26 15:29:21 UTC (rev 12614)
@@ -5,7 +5,9 @@
description = 'foray-core'
dependencies {
+ /* TODO: Convert SLF4J "api" dependency to "implementation". */
api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
+
implementation group: 'xml-resolver', name: 'xml-resolver', version: versions.xmlResolver
api group: 'org.axsl', name: 'axsl-areatree', version: versions.axsl
@@ -22,7 +24,6 @@
api project(':foray-common')
- implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
}
javadoc {
Modified: trunk/foray/foray-font/build.gradle
===================================================================
--- trunk/foray/foray-font/build.gradle 2022-02-26 14:07:19 UTC (rev 12613)
+++ trunk/foray/foray-font/build.gradle 2022-02-26 15:29:21 UTC (rev 12614)
@@ -8,7 +8,9 @@
dependencies {
+ /* TODO: Convert SLF4J "api" dependency to "implementation". */
api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
+
api group: 'commons-io', name: 'commons-io', version: versions.commonsIo
implementation group: 'commons-discovery', name: 'commons-discovery', version: versions.commonsDiscovery
// api group: 'org.apache.ant', name: 'ant-launcher', version: versions.ant
@@ -22,7 +24,6 @@
api (project(':foray-common'))
- implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
testImplementation group: 'junit', name: 'junit', version: versions.junit
testImplementation group: 'org.mockito', name: 'mockito-core', version: versions.mockito
Modified: trunk/foray/foray-fotree/build.gradle
===================================================================
--- trunk/foray/foray-fotree/build.gradle 2022-02-26 14:07:19 UTC (rev 12613)
+++ trunk/foray/foray-fotree/build.gradle 2022-02-26 15:29:21 UTC (rev 12614)
@@ -5,7 +5,9 @@
description = 'foray-fotree'
dependencies {
+ /* TODO: Convert SLF4J "api" dependency to "implementation". */
api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
+
api group: 'org.axsl.org.w3c.dom.svg', name: 'svg-dom-java', version: versions.svgDom
api group: 'org.axsl.org.w3c.dom.mathml', name: 'mathml-dom-java', version: versions.mathMlDom
@@ -23,7 +25,6 @@
api project(':foray-common')
- implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
testImplementation group: 'junit', name: 'junit', version: versions.junit
testImplementation group: 'org.mockito', name: 'mockito-core', version: versions.mockito
Modified: trunk/foray/foray-graphic/build.gradle
===================================================================
--- trunk/foray/foray-graphic/build.gradle 2022-02-26 14:07:19 UTC (rev 12613)
+++ trunk/foray/foray-graphic/build.gradle 2022-02-26 15:29:21 UTC (rev 12614)
@@ -5,36 +5,33 @@
description = 'foray-graphic'
dependencies {
+ /* TODO: Convert SLF4J "api" dependency to "implementation". */
api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
-// api group: 'commons-io', name: 'commons-io', version: versions.commonsIo
- api group: 'org.apache.xmlgraphics', name: 'xmlgraphics-commons', version: versions.xmlgraphicsCommons
- api group: 'org.apache.xmlgraphics', name: 'batik-bridge', version: versions.batik
- api group: 'org.apache.xmlgraphics', name: 'batik-gvt', version: versions.batik
- implementation group: 'org.apache.xmlgraphics', name: 'batik-parser', version: versions.batik
- implementation group: 'org.apache.xmlgraphics', name: 'batik-transcoder', version: versions.batik
-// api group: 'org.apache.xmlgraphics', name: 'batik-svg-dom', version: versions.batik
-// api group: 'org.apache.xmlgraphics', name: 'batik-css', version: versions.batik
- implementation(group: "org.apache.xmlgraphics", name: "batik-anim", version: versions.batik)
- api(group: "org.apache.xmlgraphics", name: "batik-dom", version: versions.batik)
- implementation(group: "org.apache.xmlgraphics", name: "batik-util", version: versions.batik)
- api(group: "xml-apis", name: "xml-apis", version: "1.4.01")
- api(group: "xml-apis", name: "xml-apis-ext", version: "1.3.04")
+
+ api (group: 'org.apache.xmlgraphics', name: 'xmlgraphics-commons', version: versions.xmlgraphicsCommons)
+ api (group: 'org.apache.xmlgraphics', name: 'batik-bridge', version: versions.batik)
+ api (group: 'org.apache.xmlgraphics', name: 'batik-gvt', version: versions.batik)
+ implementation (group: 'org.apache.xmlgraphics', name: 'batik-parser', version: versions.batik)
+ implementation (group: 'org.apache.xmlgraphics', name: 'batik-transcoder', version: versions.batik)
+ implementation (group: "org.apache.xmlgraphics", name: "batik-anim", version: versions.batik)
+ api (group: "org.apache.xmlgraphics", name: "batik-dom", version: versions.batik)
+ implementation (group: "org.apache.xmlgraphics", name: "batik-util", version: versions.batik)
+ api (group: "xml-apis", name: "xml-apis", version: "1.4.01")
+ api (group: "xml-apis", name: "xml-apis-ext", version: "1.3.04")
// api group: 'net.sourceforge.jeuclid', name: 'jeuclid-core', version: versions.jeuclid
- api group: 'de.rototor.jeuclid', name: 'jeuclid-core', version: versions.jeuclid
- api(group: "org.axsl.org.w3c.dom.svg", name:"svg-dom-java", version: versions.svgDom)
- api(group: "org.axsl.org.w3c.dom.mathml", name:"mathml-dom-java", version: versions.mathMlDom)
+ api (group: 'de.rototor.jeuclid', name: 'jeuclid-core', version: versions.jeuclid)
+ api (group: "org.axsl.org.w3c.dom.svg", name:"svg-dom-java", version: versions.svgDom)
+ api (group: "org.axsl.org.w3c.dom.mathml", name:"mathml-dom-java", version: versions.mathMlDom)
api (group: 'org.axsl', name: 'axsl-utility', version: versions.axsl)
api (group: 'org.axsl', name: 'axsl-font', version: versions.axsl)
api (group: 'org.axsl', name: 'axsl-graphic', version: versions.axsl)
api (group: 'org.axsl', name: 'axsl-orthography', version: versions.axsl)
-// api (group: 'org.axsl', name: 'axsl-pdf', version: versions.axsl)
api (group: 'org.axsl', name: 'axsl-ps', version: versions.axsl)
api (project(':foray-common'))
implementation (project(':foray-xml'))
- implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
testImplementation group: 'junit', name: 'junit', version: versions.junit
}
Modified: trunk/foray/foray-layout/build.gradle
===================================================================
--- trunk/foray/foray-layout/build.gradle 2022-02-26 14:07:19 UTC (rev 12613)
+++ trunk/foray/foray-layout/build.gradle 2022-02-26 15:29:21 UTC (rev 12614)
@@ -5,19 +5,9 @@
description = 'foray-layout'
dependencies {
-// api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
-
api group: 'org.axsl', name: 'axsl-layout', version: versions.axsl
api group: 'org.axsl', name: 'axsl-areatree', version: versions.axsl
-// api group: 'org.axsl', name: 'axsl-galley', version: versions.axsl
api group: 'org.axsl', name: 'axsl-fotree', version: versions.axsl
-// api group: 'org.axsl', name: 'axsl-linebreak', version: versions.axsl
-
-// api project(':foray-common')
- /* TODO: We should be able to eliminate the dependency on foray-content. */
-// api project(':foray-content')
-
- implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
}
javadoc {
Modified: trunk/foray/foray-linebreak/build.gradle
===================================================================
--- trunk/foray/foray-linebreak/build.gradle 2022-02-26 14:07:19 UTC (rev 12613)
+++ trunk/foray/foray-linebreak/build.gradle 2022-02-26 15:29:21 UTC (rev 12614)
@@ -5,18 +5,14 @@
description = 'foray-linebreak'
dependencies {
-// api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
+ api (group: 'org.axsl', name: 'axsl-linebreak', version: versions.axsl)
+ api (group: "org.axsl", name: "axsl-context", version: versions.axsl)
+ api (group: "org.axsl", name: "axsl-kp-model", version: versions.axsl)
- api group: 'org.axsl', name: 'axsl-linebreak', version: versions.axsl
- api(group: "org.axsl", name: "axsl-context", version: versions.axsl)
- api(group: "org.axsl", name: "axsl-kp-model", version: versions.axsl)
api project(':foray-common')
- implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
-
testImplementation group: 'junit', name: 'junit', version: versions.junit
testImplementation group: 'org.mockito', name: 'mockito-core', version: versions.mockito
-// testImplementation group: 'org.hamcrest', name: 'hamcrest', version: versions.hamcrest
testImplementation project(':foray-orthography')
testImplementation (testFixtures(project(':foray-font')))
Modified: trunk/foray/foray-mif/build.gradle
===================================================================
--- trunk/foray/foray-mif/build.gradle 2022-02-26 14:07:19 UTC (rev 12613)
+++ trunk/foray/foray-mif/build.gradle 2022-02-26 15:29:21 UTC (rev 12614)
@@ -5,6 +5,7 @@
description = 'foray-mif'
dependencies {
+ /* TODO: Convert SLF4J "api" dependency to "implementation". */
api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
api group: 'org.axsl', name: 'axsl-mif', version: versions.axsl
@@ -12,7 +13,6 @@
implementation project(':foray-common')
- implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
}
javadoc {
Modified: trunk/foray/foray-orthography/build.gradle
===================================================================
--- trunk/foray/foray-orthography/build.gradle 2022-02-26 14:07:19 UTC (rev 12613)
+++ trunk/foray/foray-orthography/build.gradle 2022-02-26 15:29:21 UTC (rev 12614)
@@ -5,9 +5,9 @@
description = 'foray-orthography'
dependencies {
+ /* TODO: Convert SLF4J "api" dependency to "implementation". */
api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
-// api group: 'xml-resolver', name: 'xml-resolver', version: versions.xmlResolver
-// api group: 'org.apache.ant', name: 'ant-launcher', version: versions.ant
+
api group: 'commons-cli', name: 'commons-cli', version: versions.commonsCli
api group: 'commons-io', name: 'commons-io', version: versions.commonsIo
implementation group: 'com.ibm.icu', name: 'icu4j', version: versions.icu4j
@@ -22,8 +22,6 @@
api (project(':foray-common'))
- implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
-
testImplementation group: 'junit', name: 'junit', version: versions.junit
testImplementation group: 'org.mockito', name: 'mockito-core', version: versions.mockito
}
Modified: trunk/foray/foray-output/build.gradle
===================================================================
--- trunk/foray/foray-output/build.gradle 2022-02-26 14:07:19 UTC (rev 12613)
+++ trunk/foray/foray-output/build.gradle 2022-02-26 15:29:21 UTC (rev 12614)
@@ -5,6 +5,7 @@
description = 'foray-output'
dependencies {
+ /* TODO: Convert SLF4J "api" dependency to "implementation". */
api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
api (group: 'org.axsl', name: 'axsl-font', version: versions.axsl)
@@ -15,7 +16,6 @@
implementation (project(':foray-common'))
- implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
}
javadoc {
Modified: trunk/foray/foray-pdf/build.gradle
===================================================================
--- trunk/foray/foray-pdf/build.gradle 2022-02-26 14:07:19 UTC (rev 12613)
+++ trunk/foray/foray-pdf/build.gradle 2022-02-26 15:29:21 UTC (rev 12614)
@@ -5,7 +5,9 @@
description = 'foray-pdf'
dependencies {
+ /* TODO: Convert SLF4J "api" dependency to "implementation". */
api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
+
api group: 'org.apache.xmlgraphics', name: 'batik-awt-util', version: versions.batik
api (group: 'org.axsl', name: 'axsl-pdf', version: versions.axsl)
@@ -18,7 +20,6 @@
api (project(':foray-common'))
- implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
testImplementation group: 'junit', name: 'junit', version: versions.junit
// testImplementation group: 'org.mockito', name: 'mockito-core', version: versions.mockito
Modified: trunk/foray/foray-pioneer/build.gradle
===================================================================
--- trunk/foray/foray-pioneer/build.gradle 2022-02-26 14:07:19 UTC (rev 12613)
+++ trunk/foray/foray-pioneer/build.gradle 2022-02-26 15:29:21 UTC (rev 12614)
@@ -7,7 +7,6 @@
dependencies {
implementation group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
-// api group: 'org.axsl', name: 'axsl-utility', version: versions.axsl
api group: 'org.axsl', name: 'axsl-content', version: versions.axsl
implementation group: 'org.axsl', name: 'axsl-context', version: versions.axsl
api group: 'org.axsl', name: 'axsl-layout', version: versions.axsl
@@ -25,8 +24,6 @@
implementation project(':foray-common')
api project(':foray-layout')
implementation project(':foray-content')
-
- implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
}
javadoc {
Modified: trunk/foray/foray-ps/build.gradle
===================================================================
--- trunk/foray/foray-ps/build.gradle 2022-02-26 14:07:19 UTC (rev 12613)
+++ trunk/foray/foray-ps/build.gradle 2022-02-26 15:29:21 UTC (rev 12614)
@@ -6,6 +6,7 @@
dependencies {
implementation group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
+
implementation group: 'commons-cli', name: 'commons-cli', version: versions.commonsCli
api group: 'org.axsl', name: 'axsl-utility', version: versions.axsl
@@ -13,8 +14,6 @@
implementation project(':foray-common')
- implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
-
testImplementation group: 'junit', name: 'junit', version: versions.junit
testImplementation group: 'commons-io', name: 'commons-io', version: versions.commonsIo
}
Modified: trunk/foray/foray-render/build.gradle
===================================================================
--- trunk/foray/foray-render/build.gradle 2022-02-26 14:07:19 UTC (rev 12613)
+++ trunk/foray/foray-render/build.gradle 2022-02-26 15:29:21 UTC (rev 12614)
@@ -6,6 +6,7 @@
dependencies {
implementation group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
+
implementation group: 'org.axsl.org.w3c.dom.svg', name: 'svg-dom-java', version: versions.svgDom
implementation (group: 'org.axsl', name: 'axsl-utility', version: versions.axsl)
@@ -21,8 +22,6 @@
implementation (project(':foray-common'))
api (project(':foray-output'))
- implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
-
testImplementation group: 'junit', name: 'junit', version: versions.junit
}
Modified: trunk/foray/foray-speech/build.gradle
===================================================================
--- trunk/foray/foray-speech/build.gradle 2022-02-26 14:07:19 UTC (rev 12613)
+++ trunk/foray/foray-speech/build.gradle 2022-02-26 15:29:21 UTC (rev 12614)
@@ -6,9 +6,6 @@
dependencies {
api group: 'org.axsl', name: 'axsl-speech', version: versions.axsl
-// api project(':foray-common')
-
- implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
}
javadoc {
Modified: trunk/foray/foray-unicode/build.gradle
===================================================================
--- trunk/foray/foray-unicode/build.gradle 2022-02-26 14:07:19 UTC (rev 12613)
+++ trunk/foray/foray-unicode/build.gradle 2022-02-26 15:29:21 UTC (rev 12614)
@@ -6,11 +6,6 @@
dependencies {
implementation group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
-// api group: 'commons-cli', name: 'commons-cli', version: versions.commonsCli
-
- implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
-
-// testImplementation group: 'junit', name: 'junit', version: versions.junit
}
javadoc {
Modified: trunk/foray/foray-xml/build.gradle
===================================================================
--- trunk/foray/foray-xml/build.gradle 2022-02-26 14:07:19 UTC (rev 12613)
+++ trunk/foray/foray-xml/build.gradle 2022-02-26 15:29:21 UTC (rev 12614)
@@ -5,12 +5,13 @@
description = 'foray-xml'
dependencies {
+ /* TODO: Convert SLF4J "api" dependency to "implementation". */
api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
+
implementation group: 'commons-cli', name: 'commons-cli', version: versions.commonsCli
implementation group: 'xml-resolver', name: 'xml-resolver', version: versions.xmlResolver
api project(':foray-common')
- implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
testImplementation group: 'junit', name: 'junit', version: versions.junit
Modified: trunk/foray/foray-zz-attic/build.gradle
===================================================================
--- trunk/foray/foray-zz-attic/build.gradle 2022-02-26 14:07:19 UTC (rev 12613)
+++ trunk/foray/foray-zz-attic/build.gradle 2022-02-26 15:29:21 UTC (rev 12614)
@@ -12,7 +12,6 @@
api (project(':foray-common'))
testImplementation group: 'junit', name: 'junit', version: versions.junit
-// testImplementation group: 'org.mockito', name: 'mockito-core', version: versions.mockito
}
javadoc {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-02-26 14:07:23
|
Revision: 12613
http://sourceforge.net/p/foray/code/12613
Author: victormote
Date: 2022-02-26 14:07:19 +0000 (Sat, 26 Feb 2022)
Log Message:
-----------
Add autonomousapps dependency checker, and address its warnings.
Modified Paths:
--------------
trunk/foray/build.gradle
trunk/foray/foray-areatree/build.gradle
trunk/foray/foray-common/build.gradle
trunk/foray/foray-content/build.gradle
trunk/foray/foray-core/build.gradle
trunk/foray/foray-font/build.gradle
trunk/foray/foray-fotree/build.gradle
trunk/foray/foray-graphic/build.gradle
trunk/foray/foray-layout/build.gradle
trunk/foray/foray-linebreak/build.gradle
trunk/foray/foray-mif/build.gradle
trunk/foray/foray-orthography/build.gradle
trunk/foray/foray-output/build.gradle
trunk/foray/foray-pdf/build.gradle
trunk/foray/foray-pioneer/build.gradle
trunk/foray/foray-ps/build.gradle
trunk/foray/foray-render/build.gradle
trunk/foray/foray-speech/build.gradle
trunk/foray/foray-unicode/build.gradle
trunk/foray/foray-xml/build.gradle
trunk/foray/foray-zz-attic/build.gradle
Modified: trunk/foray/build.gradle
===================================================================
--- trunk/foray/build.gradle 2022-02-24 23:13:34 UTC (rev 12612)
+++ trunk/foray/build.gradle 2022-02-26 14:07:19 UTC (rev 12613)
@@ -21,6 +21,7 @@
plugins {
id 'foray.common-conventions'
id 'java'
+ id "com.autonomousapps.dependency-analysis" version "1.0.0-rc02"
}
Modified: trunk/foray/foray-areatree/build.gradle
===================================================================
--- trunk/foray/foray-areatree/build.gradle 2022-02-24 23:13:34 UTC (rev 12612)
+++ trunk/foray/foray-areatree/build.gradle 2022-02-26 14:07:19 UTC (rev 12613)
@@ -10,6 +10,14 @@
/* Do *** NOT *** add a dependency on axsl-galley, as axsl-areatree should be a superset of axsl-galley. If not, fix
that instead. */
api group: 'org.axsl', name: 'axsl-areatree', version: versions.axsl
+ api(group: "org.axsl", name: "axsl-font", version: versions.axsl)
+ api(group: "org.axsl", name: "axsl-fotree", version: versions.axsl)
+ api(group: "org.axsl", name: "axsl-galley", version: versions.axsl)
+ api(group: "org.axsl", name: "axsl-graphic", version: versions.axsl)
+ api(group: "org.axsl", name: "axsl-i18n", version: versions.axsl)
+ api(group: "org.axsl", name: "axsl-orthography", version: versions.axsl)
+ api(group: "org.axsl", name: "axsl-value", version: versions.axsl)
+ implementation(group: "org.axsl", name: "axsl-unicode", version: versions.axsl)
api project(':foray-common')
Modified: trunk/foray/foray-common/build.gradle
===================================================================
--- trunk/foray/foray-common/build.gradle 2022-02-24 23:13:34 UTC (rev 12612)
+++ trunk/foray/foray-common/build.gradle 2022-02-26 14:07:19 UTC (rev 12613)
@@ -5,29 +5,27 @@
description = 'foray-common'
dependencies {
- api (group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j) { transitive = false }
- api (group: 'commons-io', name: 'commons-io', version: versions.commonsIo) { transitive = false }
- api (group: 'xml-resolver', name: 'xml-resolver', version: versions.xmlResolver) { transitive = false }
- api (group: 'com.ibm.icu', name: 'icu4j', version: versions.icu4j) { transitive = false }
+ api (group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j)
+ implementation (group: 'commons-io', name: 'commons-io', version: versions.commonsIo)
+ api (group: 'xml-resolver', name: 'xml-resolver', version: versions.xmlResolver)
+ api (group: 'com.ibm.icu', name: 'icu4j', version: versions.icu4j)
- /* Turn transitive resolution OFF for both aXSL and FOray modules, for greater design visibility. */
+ api (group: 'org.axsl', name: 'axsl-utility', version: versions.axsl)
+ api (group: 'org.axsl', name: 'axsl-i18n', version: versions.axsl)
+ api (group: 'org.axsl', name: 'axsl-kp-model', version: versions.axsl)
+ api (group: 'org.axsl', name: 'axsl-orthography', version: versions.axsl)
+ api (group: 'org.axsl', name: 'axsl-ps', version: versions.axsl)
+ api (group: 'org.axsl', name: 'axsl-font', version: versions.axsl)
+ implementation (group: 'org.axsl', name: 'axsl-unicode', version: versions.axsl)
+ api (group: 'org.axsl', name: 'axsl-value', version: versions.axsl)
- api (group: 'org.axsl', name: 'axsl-utility', version: versions.axsl) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-i18n', version: versions.axsl) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-kp-model', version: versions.axsl) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-orthography', version: versions.axsl) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-ps', version: versions.axsl) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-font', version: versions.axsl) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-unicode', version: versions.axsl) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-value', version: versions.axsl) { transitive = false }
-
implementation group:
'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
testImplementation group:
'junit', name: 'junit', version: versions.junit
- testImplementation group:
- 'org.mockito', name: 'mockito-core', version: versions.mockito
+// testImplementation group:
+// 'org.mockito', name: 'mockito-core', version: versions.mockito
}
javadoc {
Modified: trunk/foray/foray-content/build.gradle
===================================================================
--- trunk/foray/foray-content/build.gradle 2022-02-24 23:13:34 UTC (rev 12612)
+++ trunk/foray/foray-content/build.gradle 2022-02-26 14:07:19 UTC (rev 12613)
@@ -5,27 +5,25 @@
description = 'foray-content'
dependencies {
- api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
+// api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
- /* Turn transitive resolution OFF for both aXSL and FOray modules, for greater design visibility. */
+ api (group: 'org.axsl', name: 'axsl-content', version: versions.axsl)
+ api (group: 'org.axsl', name: 'axsl-fotree', version: versions.axsl)
+ api (group: 'org.axsl', name: 'axsl-font', version: versions.axsl)
+ api (group: 'org.axsl', name: 'axsl-value', version: versions.axsl)
+ api (group: 'org.axsl', name: 'axsl-orthography', version: versions.axsl)
+ api (group: 'org.axsl', name: 'axsl-kp-model', version: versions.axsl)
+ api (group: 'org.axsl', name: 'axsl-areatree', version: versions.axsl)
+ implementation (group: 'org.axsl', name: 'axsl-galley', version: versions.axsl)
+// api (group: 'org.axsl', name: 'axsl-context', version: versions.axsl)
+// api (group: 'org.axsl', name: 'axsl-linebreak', version: versions.axsl)
- api (group: 'org.axsl', name: 'axsl-content', version: versions.axsl) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-fotree', version: versions.axsl) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-font', version: versions.axsl) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-value', version: versions.axsl) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-orthography', version: versions.axsl) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-kp-model', version: versions.axsl) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-areatree', version: versions.axsl) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-galley', version: versions.axsl) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-context', version: versions.axsl) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-linebreak', version: versions.axsl) { transitive = false }
+ api (project(':foray-common'))
- api (project(':foray-common')) { transitive = false }
-
implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
- testImplementation group: 'junit', name: 'junit', version: versions.junit
- testImplementation group: 'org.mockito', name: 'mockito-core', version: versions.mockito
+// testImplementation group: 'junit', name: 'junit', version: versions.junit
+// testImplementation group: 'org.mockito', name: 'mockito-core', version: versions.mockito
}
javadoc {
Modified: trunk/foray/foray-core/build.gradle
===================================================================
--- trunk/foray/foray-core/build.gradle 2022-02-24 23:13:34 UTC (rev 12612)
+++ trunk/foray/foray-core/build.gradle 2022-02-26 14:07:19 UTC (rev 12613)
@@ -6,13 +6,13 @@
dependencies {
api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
- api group: 'xml-resolver', name: 'xml-resolver', version: versions.xmlResolver
+ implementation group: 'xml-resolver', name: 'xml-resolver', version: versions.xmlResolver
api group: 'org.axsl', name: 'axsl-areatree', version: versions.axsl
- api group: 'org.axsl', name: 'axsl-utility', version: versions.axsl
+// api group: 'org.axsl', name: 'axsl-utility', version: versions.axsl
api group: 'org.axsl', name: 'axsl-fotree', version: versions.axsl
api group: 'org.axsl', name: 'axsl-font', version: versions.axsl
- api group: 'org.axsl', name: 'axsl-galley', version: versions.axsl
+ implementation group: 'org.axsl', name: 'axsl-galley', version: versions.axsl
api group: 'org.axsl', name: 'axsl-graphic', version: versions.axsl
api group: 'org.axsl', name: 'axsl-layout', version: versions.axsl
api group: 'org.axsl', name: 'axsl-orthography', version: versions.axsl
Modified: trunk/foray/foray-font/build.gradle
===================================================================
--- trunk/foray/foray-font/build.gradle 2022-02-24 23:13:34 UTC (rev 12612)
+++ trunk/foray/foray-font/build.gradle 2022-02-26 14:07:19 UTC (rev 12613)
@@ -10,25 +10,23 @@
dependencies {
api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
api group: 'commons-io', name: 'commons-io', version: versions.commonsIo
- api group: 'commons-discovery', name: 'commons-discovery', version: versions.commonsDiscovery
- api group: 'org.apache.ant', name: 'ant-launcher', version: versions.ant
+ implementation group: 'commons-discovery', name: 'commons-discovery', version: versions.commonsDiscovery
+// api group: 'org.apache.ant', name: 'ant-launcher', version: versions.ant
api group: 'commons-cli', name: 'commons-cli', version: versions.commonsCli
- /* Turn transitive resolution OFF for both aXSL and FOray modules, for greater design visibility. */
+ api (group: 'org.axsl', name: 'axsl-utility', version: versions.axsl)
+ api (group: 'org.axsl', name: 'axsl-font', version: versions.axsl)
+ api (group: 'org.axsl', name: 'axsl-ps', version: versions.axsl)
+ api (group: 'org.axsl', name: 'axsl-orthography', version: versions.axsl)
+ implementation (group: 'org.axsl', name: 'axsl-unicode', version: versions.axsl)
- api (group: 'org.axsl', name: 'axsl-utility', version: versions.axsl) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-font', version: versions.axsl) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-ps', version: versions.axsl) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-orthography', version: versions.axsl) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-unicode', version: versions.axsl) { transitive = false }
+ api (project(':foray-common'))
- api (project(':foray-common')) { transitive = false }
- api (project(':foray-ps')) { transitive = false }
-
implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
testImplementation group: 'junit', name: 'junit', version: versions.junit
testImplementation group: 'org.mockito', name: 'mockito-core', version: versions.mockito
+ testRuntimeOnly (project(':foray-ps'))
}
@@ -39,20 +37,6 @@
}
-//publishing {
-// suppressPomMetadataWarningsFor('java-test-fixtures')
-// publications {
-// maven(MavenPublication) {
-// suppressPomMetadataWarningsFor 'java-test-fixtures'
-// }
-// /* Next line suppresses warnings about test fixtures being incompatible with older versions of Maven. This is likely
-// a temporary necessity. */
-// suppressPomMetadataWarningsFor('java-test-fixtures')
-// }
-//}
-//publishing.publications.
-
-
task serializeBase14Metrics(type: JavaExec) {
/* This task doesn't declare any outputs, so force them to never be up-to-date. */
outputs.upToDateWhen { false }
Modified: trunk/foray/foray-fotree/build.gradle
===================================================================
--- trunk/foray/foray-fotree/build.gradle 2022-02-24 23:13:34 UTC (rev 12612)
+++ trunk/foray/foray-fotree/build.gradle 2022-02-26 14:07:19 UTC (rev 12613)
@@ -10,15 +10,15 @@
api group: 'org.axsl.org.w3c.dom.mathml', name: 'mathml-dom-java', version: versions.mathMlDom
api group: 'org.axsl', name: 'axsl-fotree', version: versions.axsl
- api group: 'org.axsl', name: 'axsl-utility', version: versions.axsl
+ implementation group: 'org.axsl', name: 'axsl-utility', version: versions.axsl
api group: 'org.axsl', name: 'axsl-i18n', version: versions.axsl
api group: 'org.axsl', name: 'axsl-font', version: versions.axsl
api group: 'org.axsl', name: 'axsl-graphic', version: versions.axsl
api group: 'org.axsl', name: 'axsl-orthography', version: versions.axsl
api group: 'org.axsl', name: 'axsl-speech', version: versions.axsl
- api group: 'org.axsl', name: 'axsl-linebreak', version: versions.axsl
+// api group: 'org.axsl', name: 'axsl-linebreak', version: versions.axsl
api group: 'org.axsl', name: 'axsl-kp-model', version: versions.axsl
- api group: 'org.axsl', name: 'axsl-unicode', version: versions.axsl
+ implementation group: 'org.axsl', name: 'axsl-unicode', version: versions.axsl
api group: 'org.axsl', name: 'axsl-value', version: versions.axsl
api project(':foray-common')
Modified: trunk/foray/foray-graphic/build.gradle
===================================================================
--- trunk/foray/foray-graphic/build.gradle 2022-02-24 23:13:34 UTC (rev 12612)
+++ trunk/foray/foray-graphic/build.gradle 2022-02-26 14:07:19 UTC (rev 12613)
@@ -6,29 +6,34 @@
dependencies {
api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
- api group: 'commons-io', name: 'commons-io', version: versions.commonsIo
+// api group: 'commons-io', name: 'commons-io', version: versions.commonsIo
api group: 'org.apache.xmlgraphics', name: 'xmlgraphics-commons', version: versions.xmlgraphicsCommons
api group: 'org.apache.xmlgraphics', name: 'batik-bridge', version: versions.batik
api group: 'org.apache.xmlgraphics', name: 'batik-gvt', version: versions.batik
- api group: 'org.apache.xmlgraphics', name: 'batik-parser', version: versions.batik
- api group: 'org.apache.xmlgraphics', name: 'batik-transcoder', version: versions.batik
- api group: 'org.apache.xmlgraphics', name: 'batik-svg-dom', version: versions.batik
- api group: 'org.apache.xmlgraphics', name: 'batik-css', version: versions.batik
+ implementation group: 'org.apache.xmlgraphics', name: 'batik-parser', version: versions.batik
+ implementation group: 'org.apache.xmlgraphics', name: 'batik-transcoder', version: versions.batik
+// api group: 'org.apache.xmlgraphics', name: 'batik-svg-dom', version: versions.batik
+// api group: 'org.apache.xmlgraphics', name: 'batik-css', version: versions.batik
+ implementation(group: "org.apache.xmlgraphics", name: "batik-anim", version: versions.batik)
+ api(group: "org.apache.xmlgraphics", name: "batik-dom", version: versions.batik)
+ implementation(group: "org.apache.xmlgraphics", name: "batik-util", version: versions.batik)
+ api(group: "xml-apis", name: "xml-apis", version: "1.4.01")
+ api(group: "xml-apis", name: "xml-apis-ext", version: "1.3.04")
// api group: 'net.sourceforge.jeuclid', name: 'jeuclid-core', version: versions.jeuclid
api group: 'de.rototor.jeuclid', name: 'jeuclid-core', version: versions.jeuclid
+ api(group: "org.axsl.org.w3c.dom.svg", name:"svg-dom-java", version: versions.svgDom)
+ api(group: "org.axsl.org.w3c.dom.mathml", name:"mathml-dom-java", version: versions.mathMlDom)
- /* Turn transitive resolution OFF for both aXSL and FOray modules, for greater design visibility. */
+ api (group: 'org.axsl', name: 'axsl-utility', version: versions.axsl)
+ api (group: 'org.axsl', name: 'axsl-font', version: versions.axsl)
+ api (group: 'org.axsl', name: 'axsl-graphic', version: versions.axsl)
+ api (group: 'org.axsl', name: 'axsl-orthography', version: versions.axsl)
+// api (group: 'org.axsl', name: 'axsl-pdf', version: versions.axsl)
+ api (group: 'org.axsl', name: 'axsl-ps', version: versions.axsl)
- api (group: 'org.axsl', name: 'axsl-utility', version: versions.axsl) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-font', version: versions.axsl) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-graphic', version: versions.axsl) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-orthography', version: versions.axsl) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-pdf', version: versions.axsl) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-ps', version: versions.axsl) { transitive = false }
+ api (project(':foray-common'))
+ implementation (project(':foray-xml'))
- api (project(':foray-common')) { transitive = false }
- api (project(':foray-xml')) { transitive = false }
-
implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
testImplementation group: 'junit', name: 'junit', version: versions.junit
Modified: trunk/foray/foray-layout/build.gradle
===================================================================
--- trunk/foray/foray-layout/build.gradle 2022-02-24 23:13:34 UTC (rev 12612)
+++ trunk/foray/foray-layout/build.gradle 2022-02-26 14:07:19 UTC (rev 12613)
@@ -5,17 +5,17 @@
description = 'foray-layout'
dependencies {
- api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
+// api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
api group: 'org.axsl', name: 'axsl-layout', version: versions.axsl
api group: 'org.axsl', name: 'axsl-areatree', version: versions.axsl
- api group: 'org.axsl', name: 'axsl-galley', version: versions.axsl
+// api group: 'org.axsl', name: 'axsl-galley', version: versions.axsl
api group: 'org.axsl', name: 'axsl-fotree', version: versions.axsl
- api group: 'org.axsl', name: 'axsl-linebreak', version: versions.axsl
+// api group: 'org.axsl', name: 'axsl-linebreak', version: versions.axsl
- api project(':foray-common')
+// api project(':foray-common')
/* TODO: We should be able to eliminate the dependency on foray-content. */
- api project(':foray-content')
+// api project(':foray-content')
implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
}
Modified: trunk/foray/foray-linebreak/build.gradle
===================================================================
--- trunk/foray/foray-linebreak/build.gradle 2022-02-24 23:13:34 UTC (rev 12612)
+++ trunk/foray/foray-linebreak/build.gradle 2022-02-26 14:07:19 UTC (rev 12613)
@@ -5,8 +5,11 @@
description = 'foray-linebreak'
dependencies {
- api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
+// api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
+
api group: 'org.axsl', name: 'axsl-linebreak', version: versions.axsl
+ api(group: "org.axsl", name: "axsl-context", version: versions.axsl)
+ api(group: "org.axsl", name: "axsl-kp-model", version: versions.axsl)
api project(':foray-common')
implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
@@ -17,6 +20,10 @@
testImplementation project(':foray-orthography')
testImplementation (testFixtures(project(':foray-font')))
+ testImplementation(group: "org.axsl", name: "axsl-font", version: versions.axsl)
+ testImplementation(group: "org.axsl", name: "axsl-orthography", version: versions.axsl)
+ testImplementation(group: "org.axsl", name: "axsl-ps", version: versions.axsl)
+ testImplementation(project(":foray-ps"))
}
javadoc {
Modified: trunk/foray/foray-mif/build.gradle
===================================================================
--- trunk/foray/foray-mif/build.gradle 2022-02-24 23:13:34 UTC (rev 12612)
+++ trunk/foray/foray-mif/build.gradle 2022-02-26 14:07:19 UTC (rev 12613)
@@ -10,7 +10,7 @@
api group: 'org.axsl', name: 'axsl-mif', version: versions.axsl
api group: 'org.axsl', name: 'axsl-output', version: versions.axsl
- api project(':foray-common')
+ implementation project(':foray-common')
implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
}
Modified: trunk/foray/foray-orthography/build.gradle
===================================================================
--- trunk/foray/foray-orthography/build.gradle 2022-02-24 23:13:34 UTC (rev 12612)
+++ trunk/foray/foray-orthography/build.gradle 2022-02-26 14:07:19 UTC (rev 12613)
@@ -6,24 +6,22 @@
dependencies {
api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
- api group: 'xml-resolver', name: 'xml-resolver', version: versions.xmlResolver
- api group: 'org.apache.ant', name: 'ant-launcher', version: versions.ant
+// api group: 'xml-resolver', name: 'xml-resolver', version: versions.xmlResolver
+// api group: 'org.apache.ant', name: 'ant-launcher', version: versions.ant
api group: 'commons-cli', name: 'commons-cli', version: versions.commonsCli
api group: 'commons-io', name: 'commons-io', version: versions.commonsIo
- api group: 'com.ibm.icu', name: 'icu4j', version: versions.icu4j
+ implementation group: 'com.ibm.icu', name: 'icu4j', version: versions.icu4j
- /* Turn transitive resolution OFF for both aXSL and FOray modules, for greater design visibility. */
+ api (group: 'org.axsl', name: 'axsl-utility', version: versions.axsl)
+ api (group: 'org.axsl', name: 'axsl-i18n', version: versions.axsl)
+ api (group: 'org.axsl', name: 'axsl-orthography', version: versions.axsl)
+ api (group: 'org.axsl', name: 'axsl-fotree', version: versions.axsl)
+ api (group: 'org.axsl', name: 'axsl-kp-model', version: versions.axsl)
+ implementation (group: 'org.axsl', name: 'axsl-unicode', version: versions.axsl)
+ api (group: 'org.axsl', name: 'axsl-value', version: versions.axsl)
- api (group: 'org.axsl', name: 'axsl-utility', version: versions.axsl) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-i18n', version: versions.axsl) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-orthography', version: versions.axsl) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-fotree', version: versions.axsl) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-kp-model', version: versions.axsl) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-unicode', version: versions.axsl) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-value', version: versions.axsl) { transitive = false }
+ api (project(':foray-common'))
- api (project(':foray-common')) { transitive = false }
-
implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
testImplementation group: 'junit', name: 'junit', version: versions.junit
Modified: trunk/foray/foray-output/build.gradle
===================================================================
--- trunk/foray/foray-output/build.gradle 2022-02-24 23:13:34 UTC (rev 12612)
+++ trunk/foray/foray-output/build.gradle 2022-02-26 14:07:19 UTC (rev 12613)
@@ -7,16 +7,14 @@
dependencies {
api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
- /* Turn transitive resolution OFF for both aXSL and FOray modules, for greater design visibility. */
+ api (group: 'org.axsl', name: 'axsl-font', version: versions.axsl)
+ api (group: 'org.axsl', name: 'axsl-output', version: versions.axsl)
+ api (group: 'org.axsl', name: 'axsl-mif', version: versions.axsl)
+ api (group: 'org.axsl', name: 'axsl-fotree', version: versions.axsl)
+// api (group: 'org.axsl', name: 'axsl-value', version: versions.axsl)
- api (group: 'org.axsl', name: 'axsl-font', version: versions.axsl) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-output', version: versions.axsl) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-mif', version: versions.axsl) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-fotree', version: versions.axsl) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-value', version: versions.axsl) { transitive = false }
+ implementation (project(':foray-common'))
- api (project(':foray-common')) { transitive = false }
-
implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
}
Modified: trunk/foray/foray-pdf/build.gradle
===================================================================
--- trunk/foray/foray-pdf/build.gradle 2022-02-24 23:13:34 UTC (rev 12612)
+++ trunk/foray/foray-pdf/build.gradle 2022-02-26 14:07:19 UTC (rev 12613)
@@ -8,24 +8,23 @@
api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
api group: 'org.apache.xmlgraphics', name: 'batik-awt-util', version: versions.batik
- /* Turn transitive resolution OFF for both aXSL and FOray modules, for greater design visibility. */
+ api (group: 'org.axsl', name: 'axsl-pdf', version: versions.axsl)
+ api (group: 'org.axsl', name: 'axsl-utility', version: versions.axsl)
+ api (group: 'org.axsl', name: 'axsl-font', version: versions.axsl)
+ api (group: 'org.axsl', name: 'axsl-graphic', version: versions.axsl)
+ api (group: 'org.axsl', name: 'axsl-orthography', version: versions.axsl)
+ api (group: 'org.axsl', name: 'axsl-ps', version: versions.axsl)
+ implementation (group: 'org.axsl', name: 'axsl-unicode', version: versions.axsl)
- api (group: 'org.axsl', name: 'axsl-pdf', version: versions.axsl) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-utility', version: versions.axsl) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-font', version: versions.axsl) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-graphic', version: versions.axsl) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-orthography', version: versions.axsl) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-ps', version: versions.axsl) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-unicode', version: versions.axsl) { transitive = false }
+ api (project(':foray-common'))
- api (project(':foray-common')) { transitive = false }
-
implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
testImplementation group: 'junit', name: 'junit', version: versions.junit
- testImplementation group: 'org.mockito', name: 'mockito-core', version: versions.mockito
+// testImplementation group: 'org.mockito', name: 'mockito-core', version: versions.mockito
testImplementation project(':foray-font')
+ testImplementation(project(":foray-ps"))
}
javadoc {
Modified: trunk/foray/foray-pioneer/build.gradle
===================================================================
--- trunk/foray/foray-pioneer/build.gradle 2022-02-24 23:13:34 UTC (rev 12612)
+++ trunk/foray/foray-pioneer/build.gradle 2022-02-26 14:07:19 UTC (rev 12613)
@@ -5,22 +5,26 @@
description = 'foray-pioneer'
dependencies {
- api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
+ implementation group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
- api group: 'org.axsl', name: 'axsl-utility', version: versions.axsl
+// api group: 'org.axsl', name: 'axsl-utility', version: versions.axsl
+ api group: 'org.axsl', name: 'axsl-content', version: versions.axsl
+ implementation group: 'org.axsl', name: 'axsl-context', version: versions.axsl
api group: 'org.axsl', name: 'axsl-layout', version: versions.axsl
api group: 'org.axsl', name: 'axsl-fotree', version: versions.axsl
api group: 'org.axsl', name: 'axsl-areatree', version: versions.axsl
- api group: 'org.axsl', name: 'axsl-galley', version: versions.axsl
+ implementation group: 'org.axsl', name: 'axsl-galley', version: versions.axsl
api group: 'org.axsl', name: 'axsl-linebreak', version: versions.axsl
api group: 'org.axsl', name: 'axsl-kp-model', version: versions.axsl
- api group: 'org.axsl', name: 'axsl-graphic', version: versions.axsl
+ implementation group: 'org.axsl', name: 'axsl-graphic', version: versions.axsl
api group: 'org.axsl', name: 'axsl-font', version: versions.axsl
- api group: 'org.axsl', name: 'axsl-orthography', version: versions.axsl
+ implementation group: 'org.axsl', name: 'axsl-orthography', version: versions.axsl
+ implementation group: 'org.axsl', name: 'axsl-unicode', version: versions.axsl
+ api group: 'org.axsl', name: 'axsl-value', version: versions.axsl
- api project(':foray-common')
+ implementation project(':foray-common')
api project(':foray-layout')
- api project(':foray-content')
+ implementation project(':foray-content')
implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
}
Modified: trunk/foray/foray-ps/build.gradle
===================================================================
--- trunk/foray/foray-ps/build.gradle 2022-02-24 23:13:34 UTC (rev 12612)
+++ trunk/foray/foray-ps/build.gradle 2022-02-26 14:07:19 UTC (rev 12613)
@@ -5,18 +5,18 @@
description = 'foray-ps'
dependencies {
- api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
- api group: 'commons-cli', name: 'commons-cli', version: versions.commonsCli
- api group: 'commons-io', name: 'commons-io', version: versions.commonsIo
+ implementation group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
+ implementation group: 'commons-cli', name: 'commons-cli', version: versions.commonsCli
api group: 'org.axsl', name: 'axsl-utility', version: versions.axsl
api group: 'org.axsl', name: 'axsl-ps', version: versions.axsl
- api project(':foray-common')
+ implementation project(':foray-common')
implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
testImplementation group: 'junit', name: 'junit', version: versions.junit
+ testImplementation group: 'commons-io', name: 'commons-io', version: versions.commonsIo
}
javadoc {
Modified: trunk/foray/foray-render/build.gradle
===================================================================
--- trunk/foray/foray-render/build.gradle 2022-02-24 23:13:34 UTC (rev 12612)
+++ trunk/foray/foray-render/build.gradle 2022-02-26 14:07:19 UTC (rev 12613)
@@ -5,24 +5,22 @@
description = 'foray-render'
dependencies {
- api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
- api group: 'org.axsl.org.w3c.dom.svg', name: 'svg-dom-java', version: versions.svgDom
+ implementation group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
+ implementation group: 'org.axsl.org.w3c.dom.svg', name: 'svg-dom-java', version: versions.svgDom
- /* Turn transitive resolution OFF for both aXSL and FOray modules, for greater design visibility. */
+ implementation (group: 'org.axsl', name: 'axsl-utility', version: versions.axsl)
+ api (group: 'org.axsl', name: 'axsl-output', version: versions.axsl)
+ api (group: 'org.axsl', name: 'axsl-font', version: versions.axsl)
+ api (group: 'org.axsl', name: 'axsl-pdf', version: versions.axsl)
+ api (group: 'org.axsl', name: 'axsl-galley', version: versions.axsl)
+ api (group: 'org.axsl', name: 'axsl-value', version: versions.axsl)
+ api (group: 'org.axsl', name: 'axsl-graphic', version: versions.axsl)
+ implementation (group: 'org.axsl', name: 'axsl-orthography', version: versions.axsl)
+ api (group: 'org.axsl', name: 'axsl-ps', version: versions.axsl)
- api (group: 'org.axsl', name: 'axsl-utility', version: versions.axsl) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-output', version: versions.axsl) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-font', version: versions.axsl) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-pdf', version: versions.axsl) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-galley', version: versions.axsl) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-value', version: versions.axsl) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-graphic', version: versions.axsl) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-orthography', version: versions.axsl) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-ps', version: versions.axsl) { transitive = false }
+ implementation (project(':foray-common'))
+ api (project(':foray-output'))
- api (project(':foray-common')) { transitive = false }
- api (project(':foray-output')) { transitive = false }
-
implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
testImplementation group: 'junit', name: 'junit', version: versions.junit
Modified: trunk/foray/foray-speech/build.gradle
===================================================================
--- trunk/foray/foray-speech/build.gradle 2022-02-24 23:13:34 UTC (rev 12612)
+++ trunk/foray/foray-speech/build.gradle 2022-02-26 14:07:19 UTC (rev 12613)
@@ -6,7 +6,7 @@
dependencies {
api group: 'org.axsl', name: 'axsl-speech', version: versions.axsl
- api project(':foray-common')
+// api project(':foray-common')
implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
}
Modified: trunk/foray/foray-unicode/build.gradle
===================================================================
--- trunk/foray/foray-unicode/build.gradle 2022-02-24 23:13:34 UTC (rev 12612)
+++ trunk/foray/foray-unicode/build.gradle 2022-02-26 14:07:19 UTC (rev 12613)
@@ -5,12 +5,12 @@
description = 'foray-unicode'
dependencies {
- api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
- api group: 'commons-cli', name: 'commons-cli', version: versions.commonsCli
+ implementation group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
+// api group: 'commons-cli', name: 'commons-cli', version: versions.commonsCli
implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
- testImplementation group: 'junit', name: 'junit', version: versions.junit
+// testImplementation group: 'junit', name: 'junit', version: versions.junit
}
javadoc {
Modified: trunk/foray/foray-xml/build.gradle
===================================================================
--- trunk/foray/foray-xml/build.gradle 2022-02-24 23:13:34 UTC (rev 12612)
+++ trunk/foray/foray-xml/build.gradle 2022-02-26 14:07:19 UTC (rev 12613)
@@ -6,8 +6,8 @@
dependencies {
api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
- api group: 'commons-cli', name: 'commons-cli', version: versions.commonsCli
- api group: 'xml-resolver', name: 'xml-resolver', version: versions.xmlResolver
+ implementation group: 'commons-cli', name: 'commons-cli', version: versions.commonsCli
+ implementation group: 'xml-resolver', name: 'xml-resolver', version: versions.xmlResolver
api project(':foray-common')
implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
Modified: trunk/foray/foray-zz-attic/build.gradle
===================================================================
--- trunk/foray/foray-zz-attic/build.gradle 2022-02-24 23:13:34 UTC (rev 12612)
+++ trunk/foray/foray-zz-attic/build.gradle 2022-02-26 14:07:19 UTC (rev 12613)
@@ -5,15 +5,14 @@
description = 'foray-zz-attic'
dependencies {
- api (group: 'commons-io', name: 'commons-io', version: versions.commonsIo) { transitive = false }
- api (group: 'jakarta.activation', name: 'jakarta.activation-api', version: '1.2.2') { transitive = false }
+ implementation (group: 'commons-io', name: 'commons-io', version: versions.commonsIo)
+ api (group: 'jakarta.activation', name: 'jakarta.activation-api', version: '1.2.2')
- api (group: 'org.axsl', name: 'axsl-utility', version: versions.axsl) { transitive = false }
+ implementation (group: 'org.axsl', name: 'axsl-utility', version: versions.axsl)
+ api (project(':foray-common'))
- api (project(':foray-common')) { transitive = false }
-
testImplementation group: 'junit', name: 'junit', version: versions.junit
- testImplementation group: 'org.mockito', name: 'mockito-core', version: versions.mockito
+// testImplementation group: 'org.mockito', name: 'mockito-core', version: versions.mockito
}
javadoc {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-02-24 23:13:37
|
Revision: 12612
http://sourceforge.net/p/foray/code/12612
Author: victormote
Date: 2022-02-24 23:13:34 +0000 (Thu, 24 Feb 2022)
Log Message:
-----------
Suppress warnings about java-test-fixtures incompatibilities.
Modified Paths:
--------------
trunk/foray/buildSrc/src/main/groovy/foray.common-conventions.gradle
trunk/foray/foray-font/build.gradle
Modified: trunk/foray/buildSrc/src/main/groovy/foray.common-conventions.gradle
===================================================================
--- trunk/foray/buildSrc/src/main/groovy/foray.common-conventions.gradle 2022-02-24 21:10:49 UTC (rev 12611)
+++ trunk/foray/buildSrc/src/main/groovy/foray.common-conventions.gradle 2022-02-24 23:13:34 UTC (rev 12612)
@@ -162,10 +162,16 @@
publishing {
publications {
- mavenJava(MavenPublication) {
+ maven(MavenPublication) {
from components.java
artifact packageSources
artifact packageJavadocs
+ /* The next two lines suppress warnings about usage of java-test-fixtures causing incompatibilities with
+ * older versions of Maven. This is likely only a temporary necessity. Also, we may not always wish to
+ * publish such fixtures, also allowing these lines to be removed. While writing this, only foray-font uses
+ * the java-test-fixtures plugin. */
+ suppressPomMetadataWarningsFor('testFixturesApiElements')
+ suppressPomMetadataWarningsFor('testFixturesRuntimeElements')
}
}
}
Modified: trunk/foray/foray-font/build.gradle
===================================================================
--- trunk/foray/foray-font/build.gradle 2022-02-24 21:10:49 UTC (rev 12611)
+++ trunk/foray/foray-font/build.gradle 2022-02-24 23:13:34 UTC (rev 12612)
@@ -1,11 +1,11 @@
plugins {
id 'foray.library-conventions'
+ /* Allow creation of test fixtures. */
+ id 'java-test-fixtures'
}
description = 'foray-font'
-/* Allow creation of test fixtures. */
-apply plugin: 'java-test-fixtures'
dependencies {
api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
@@ -39,6 +39,20 @@
}
+//publishing {
+// suppressPomMetadataWarningsFor('java-test-fixtures')
+// publications {
+// maven(MavenPublication) {
+// suppressPomMetadataWarningsFor 'java-test-fixtures'
+// }
+// /* Next line suppresses warnings about test fixtures being incompatible with older versions of Maven. This is likely
+// a temporary necessity. */
+// suppressPomMetadataWarningsFor('java-test-fixtures')
+// }
+//}
+//publishing.publications.
+
+
task serializeBase14Metrics(type: JavaExec) {
/* This task doesn't declare any outputs, so force them to never be up-to-date. */
outputs.upToDateWhen { false }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-02-24 21:10:53
|
Revision: 12611
http://sourceforge.net/p/foray/code/12611
Author: victormote
Date: 2022-02-24 21:10:49 +0000 (Thu, 24 Feb 2022)
Log Message:
-----------
1. Move remaining shared logic to appropriate conventions file. 2. Use "versions" Map to store dependency versions.
Modified Paths:
--------------
trunk/foray/build.gradle
trunk/foray/foray-app/build.gradle
trunk/foray/foray-areatree/build.gradle
trunk/foray/foray-common/build.gradle
trunk/foray/foray-content/build.gradle
trunk/foray/foray-core/build.gradle
trunk/foray/foray-font/build.gradle
trunk/foray/foray-fotree/build.gradle
trunk/foray/foray-graphic/build.gradle
trunk/foray/foray-layout/build.gradle
trunk/foray/foray-linebreak/build.gradle
trunk/foray/foray-mif/build.gradle
trunk/foray/foray-orthography/build.gradle
trunk/foray/foray-output/build.gradle
trunk/foray/foray-pdf/build.gradle
trunk/foray/foray-pioneer/build.gradle
trunk/foray/foray-ps/build.gradle
trunk/foray/foray-render/build.gradle
trunk/foray/foray-speech/build.gradle
trunk/foray/foray-unicode/build.gradle
trunk/foray/foray-xml/build.gradle
trunk/foray/foray-zz-attic/build.gradle
Modified: trunk/foray/build.gradle
===================================================================
--- trunk/foray/build.gradle 2022-02-24 20:38:59 UTC (rev 12610)
+++ trunk/foray/build.gradle 2022-02-24 21:10:49 UTC (rev 12611)
@@ -23,38 +23,8 @@
id 'java'
}
-allprojects {
- /******************** See Note 1 below for information about dependency releases. ********************/
- /* Dependencies related to aXSL. These should be maintained at the same versions used by aXSL. */
- ext.axslVersion = '0.3-SNAPSHOT' // Latest is 0.3-SNAPSHOT as of 2021-01-12. See Note 2.
- ext.svgDomVersion = '1.1' // See aXSL master/build.gradle
- ext.mathMlDomVersion = '2.0' // See aXSL master/build.gradle
- /* End of aXSL-related dependencies. */
-
- ext.slf4jVersion = '1.7.30' // Latest is 1.7.30 as of 2021-01-12.
- ext.commonsIoVersion = '2.6' // Latest is 2.8.0 as of 2021-01-12. See Note 3.
- ext.commonsDiscoveryVersion = '0.5' // Latest is 0.5 as of 2021-01-12.
- ext.commonsCliVersion = '1.4' // Latest is 1.4 as of 2021-01-12.
- ext.xmlResolverVersion = '1.2' // Latest is 1.2 as of 2021-01-12. See Note 4.
- ext.antVersion = '1.9.15' // Latest is 1.10.9 as of 2021-01-12. See Note 5.
- ext.servletApiVersion = '3.1.0' // Latest is 4.0.1 as of 2021-01-12. See Note 6.
- ext.xmlgraphicsCommonsVersion = '2.6' // Latest is 2.6 as of 2022-01-17.
- ext.batikVersion = '1.14' // Latest is 1.14 as of 2022-01-17.
- ext.jeuclidVersion = '3.1.14' // Latest is 3.1.14 as of 2021-01-12. See Note 7.
- ext.icu4jVersion = '68.2' // Latest is 68.2 as of 2021-01-12.
-
- ext.junitVersion = '4.13.2' // Latest is 5.8.2 as of 2022-01-17. See Note 8.
- ext.mockitoVersion = '2.28.2' // Latest is 3.7.0 as of 2021-01-12. See Note 9.
- ext.logbackClassicVersion = '1.2.3' // Latest is 1.2.3 as of 2021-01-12.
-
- ext.checkstyleVersion = '8.39' // Latest is 8.39 as of 2021-01-12.
-
-
-}
-
-
/* Configure the aggregate javadocs. */
task allJavadoc(type: Javadoc) {
source subprojects.collect {project -> project.sourceSets.main.allJava}
Modified: trunk/foray/foray-app/build.gradle
===================================================================
--- trunk/foray/foray-app/build.gradle 2022-02-24 20:38:59 UTC (rev 12610)
+++ trunk/foray/foray-app/build.gradle 2022-02-24 21:10:49 UTC (rev 12611)
@@ -5,26 +5,26 @@
description = 'foray-app'
dependencies {
- implementation group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion
- implementation group: 'javax.servlet', name: 'javax.servlet-api', version: servletApiVersion
- implementation group: 'xml-resolver', name: 'xml-resolver', version: xmlResolverVersion
- implementation group: 'org.apache.ant', name: 'ant', version: antVersion
- implementation group: 'commons-io', name: 'commons-io', version: commonsIoVersion
- implementation group: 'commons-cli', name: 'commons-cli', version: commonsCliVersion
+ implementation group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
+ implementation group: 'javax.servlet', name: 'javax.servlet-api', version: versions.servletApi
+ implementation group: 'xml-resolver', name: 'xml-resolver', version: versions.xmlResolver
+ implementation group: 'org.apache.ant', name: 'ant', version: versions.ant
+ implementation group: 'commons-io', name: 'commons-io', version: versions.commonsIo
+ implementation group: 'commons-cli', name: 'commons-cli', version: versions.commonsCli
- implementation group: 'org.axsl', name: 'axsl-font', version: axslVersion
- implementation group: 'org.axsl', name: 'axsl-linebreak', version: axslVersion
- implementation group: 'org.axsl', name: 'axsl-ps', version: axslVersion
- implementation group: 'org.axsl', name: 'axsl-areatree', version: axslVersion
- implementation group: 'org.axsl', name: 'axsl-output', version: axslVersion
- implementation group: 'org.axsl', name: 'axsl-fotree', version: axslVersion
- implementation group: 'org.axsl', name: 'axsl-galley', version: axslVersion
- implementation group: 'org.axsl', name: 'axsl-orthography', version: axslVersion
- implementation group: 'org.axsl', name: 'axsl-graphic', version: axslVersion
- implementation group: 'org.axsl', name: 'axsl-layout', version: axslVersion
- implementation group: 'org.axsl', name: 'axsl-speech', version: axslVersion
- implementation group: 'org.axsl', name: 'axsl-mif', version: axslVersion
- implementation group: 'org.axsl', name: 'axsl-pdf', version: axslVersion
+ implementation group: 'org.axsl', name: 'axsl-font', version: versions.axsl
+ implementation group: 'org.axsl', name: 'axsl-linebreak', version: versions.axsl
+ implementation group: 'org.axsl', name: 'axsl-ps', version: versions.axsl
+ implementation group: 'org.axsl', name: 'axsl-areatree', version: versions.axsl
+ implementation group: 'org.axsl', name: 'axsl-output', version: versions.axsl
+ implementation group: 'org.axsl', name: 'axsl-fotree', version: versions.axsl
+ implementation group: 'org.axsl', name: 'axsl-galley', version: versions.axsl
+ implementation group: 'org.axsl', name: 'axsl-orthography', version: versions.axsl
+ implementation group: 'org.axsl', name: 'axsl-graphic', version: versions.axsl
+ implementation group: 'org.axsl', name: 'axsl-layout', version: versions.axsl
+ implementation group: 'org.axsl', name: 'axsl-speech', version: versions.axsl
+ implementation group: 'org.axsl', name: 'axsl-mif', version: versions.axsl
+ implementation group: 'org.axsl', name: 'axsl-pdf', version: versions.axsl
implementation project(':foray-areatree')
@@ -44,10 +44,10 @@
implementation project(':foray-speech')
implementation project(':foray-linebreak')
- implementation group: 'ch.qos.logback', name: 'logback-classic', version: logbackClassicVersion
+ implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
- testImplementation group: 'junit', name: 'junit', version: junitVersion
- testImplementation group: 'org.mockito', name: 'mockito-core', version: mockitoVersion
+ testImplementation group: 'junit', name: 'junit', version: versions.junit
+ testImplementation group: 'org.mockito', name: 'mockito-core', version: versions.mockito
}
javadoc {
Modified: trunk/foray/foray-areatree/build.gradle
===================================================================
--- trunk/foray/foray-areatree/build.gradle 2022-02-24 20:38:59 UTC (rev 12610)
+++ trunk/foray/foray-areatree/build.gradle 2022-02-24 21:10:49 UTC (rev 12611)
@@ -5,17 +5,17 @@
description = 'foray-areatree'
dependencies {
- api group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion
+ api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
/* Do *** NOT *** add a dependency on axsl-galley, as axsl-areatree should be a superset of axsl-galley. If not, fix
that instead. */
- api group: 'org.axsl', name: 'axsl-areatree', version: axslVersion
+ api group: 'org.axsl', name: 'axsl-areatree', version: versions.axsl
api project(':foray-common')
- implementation group: 'ch.qos.logback', name: 'logback-classic', version: logbackClassicVersion
+ implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
- testImplementation group: 'junit', name: 'junit', version: junitVersion
+ testImplementation group: 'junit', name: 'junit', version: versions.junit
}
javadoc {
Modified: trunk/foray/foray-common/build.gradle
===================================================================
--- trunk/foray/foray-common/build.gradle 2022-02-24 20:38:59 UTC (rev 12610)
+++ trunk/foray/foray-common/build.gradle 2022-02-24 21:10:49 UTC (rev 12611)
@@ -5,29 +5,29 @@
description = 'foray-common'
dependencies {
- api (group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion) { transitive = false }
- api (group: 'commons-io', name: 'commons-io', version: commonsIoVersion) { transitive = false }
- api (group: 'xml-resolver', name: 'xml-resolver', version: xmlResolverVersion) { transitive = false }
- api (group: 'com.ibm.icu', name: 'icu4j', version: icu4jVersion) { transitive = false }
+ api (group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j) { transitive = false }
+ api (group: 'commons-io', name: 'commons-io', version: versions.commonsIo) { transitive = false }
+ api (group: 'xml-resolver', name: 'xml-resolver', version: versions.xmlResolver) { transitive = false }
+ api (group: 'com.ibm.icu', name: 'icu4j', version: versions.icu4j) { transitive = false }
/* Turn transitive resolution OFF for both aXSL and FOray modules, for greater design visibility. */
- api (group: 'org.axsl', name: 'axsl-utility', version: axslVersion) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-i18n', version: axslVersion) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-kp-model', version: axslVersion) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-orthography', version: axslVersion) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-ps', version: axslVersion) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-font', version: axslVersion) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-unicode', version: axslVersion) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-value', version: axslVersion) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-utility', version: versions.axsl) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-i18n', version: versions.axsl) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-kp-model', version: versions.axsl) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-orthography', version: versions.axsl) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-ps', version: versions.axsl) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-font', version: versions.axsl) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-unicode', version: versions.axsl) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-value', version: versions.axsl) { transitive = false }
implementation group:
- 'ch.qos.logback', name: 'logback-classic', version: logbackClassicVersion
+ 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
testImplementation group:
- 'junit', name: 'junit', version: junitVersion
+ 'junit', name: 'junit', version: versions.junit
testImplementation group:
- 'org.mockito', name: 'mockito-core', version: mockitoVersion
+ 'org.mockito', name: 'mockito-core', version: versions.mockito
}
javadoc {
Modified: trunk/foray/foray-content/build.gradle
===================================================================
--- trunk/foray/foray-content/build.gradle 2022-02-24 20:38:59 UTC (rev 12610)
+++ trunk/foray/foray-content/build.gradle 2022-02-24 21:10:49 UTC (rev 12611)
@@ -5,27 +5,27 @@
description = 'foray-content'
dependencies {
- api group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion
+ api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
/* Turn transitive resolution OFF for both aXSL and FOray modules, for greater design visibility. */
- api (group: 'org.axsl', name: 'axsl-content', version: axslVersion) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-fotree', version: axslVersion) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-font', version: axslVersion) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-value', version: axslVersion) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-orthography', version: axslVersion) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-kp-model', version: axslVersion) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-areatree', version: axslVersion) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-galley', version: axslVersion) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-context', version: axslVersion) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-linebreak', version: axslVersion) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-content', version: versions.axsl) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-fotree', version: versions.axsl) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-font', version: versions.axsl) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-value', version: versions.axsl) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-orthography', version: versions.axsl) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-kp-model', version: versions.axsl) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-areatree', version: versions.axsl) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-galley', version: versions.axsl) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-context', version: versions.axsl) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-linebreak', version: versions.axsl) { transitive = false }
api (project(':foray-common')) { transitive = false }
- implementation group: 'ch.qos.logback', name: 'logback-classic', version: logbackClassicVersion
+ implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
- testImplementation group: 'junit', name: 'junit', version: junitVersion
- testImplementation group: 'org.mockito', name: 'mockito-core', version: mockitoVersion
+ testImplementation group: 'junit', name: 'junit', version: versions.junit
+ testImplementation group: 'org.mockito', name: 'mockito-core', version: versions.mockito
}
javadoc {
Modified: trunk/foray/foray-core/build.gradle
===================================================================
--- trunk/foray/foray-core/build.gradle 2022-02-24 20:38:59 UTC (rev 12610)
+++ trunk/foray/foray-core/build.gradle 2022-02-24 21:10:49 UTC (rev 12611)
@@ -5,24 +5,24 @@
description = 'foray-core'
dependencies {
- api group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion
- api group: 'xml-resolver', name: 'xml-resolver', version: xmlResolverVersion
+ api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
+ api group: 'xml-resolver', name: 'xml-resolver', version: versions.xmlResolver
- api group: 'org.axsl', name: 'axsl-areatree', version: axslVersion
- api group: 'org.axsl', name: 'axsl-utility', version: axslVersion
- api group: 'org.axsl', name: 'axsl-fotree', version: axslVersion
- api group: 'org.axsl', name: 'axsl-font', version: axslVersion
- api group: 'org.axsl', name: 'axsl-galley', version: axslVersion
- api group: 'org.axsl', name: 'axsl-graphic', version: axslVersion
- api group: 'org.axsl', name: 'axsl-layout', version: axslVersion
- api group: 'org.axsl', name: 'axsl-orthography', version: axslVersion
- api group: 'org.axsl', name: 'axsl-output', version: axslVersion
- api group: 'org.axsl', name: 'axsl-speech', version: axslVersion
- api group: 'org.axsl', name: 'axsl-linebreak', version: axslVersion
+ api group: 'org.axsl', name: 'axsl-areatree', version: versions.axsl
+ api group: 'org.axsl', name: 'axsl-utility', version: versions.axsl
+ api group: 'org.axsl', name: 'axsl-fotree', version: versions.axsl
+ api group: 'org.axsl', name: 'axsl-font', version: versions.axsl
+ api group: 'org.axsl', name: 'axsl-galley', version: versions.axsl
+ api group: 'org.axsl', name: 'axsl-graphic', version: versions.axsl
+ api group: 'org.axsl', name: 'axsl-layout', version: versions.axsl
+ api group: 'org.axsl', name: 'axsl-orthography', version: versions.axsl
+ api group: 'org.axsl', name: 'axsl-output', version: versions.axsl
+ api group: 'org.axsl', name: 'axsl-speech', version: versions.axsl
+ api group: 'org.axsl', name: 'axsl-linebreak', version: versions.axsl
api project(':foray-common')
- implementation group: 'ch.qos.logback', name: 'logback-classic', version: logbackClassicVersion
+ implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
}
javadoc {
Modified: trunk/foray/foray-font/build.gradle
===================================================================
--- trunk/foray/foray-font/build.gradle 2022-02-24 20:38:59 UTC (rev 12610)
+++ trunk/foray/foray-font/build.gradle 2022-02-24 21:10:49 UTC (rev 12611)
@@ -8,27 +8,27 @@
apply plugin: 'java-test-fixtures'
dependencies {
- api group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion
- api group: 'commons-io', name: 'commons-io', version: commonsIoVersion
- api group: 'commons-discovery', name: 'commons-discovery', version: commonsDiscoveryVersion
- api group: 'org.apache.ant', name: 'ant-launcher', version: antVersion
- api group: 'commons-cli', name: 'commons-cli', version: commonsCliVersion
+ api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
+ api group: 'commons-io', name: 'commons-io', version: versions.commonsIo
+ api group: 'commons-discovery', name: 'commons-discovery', version: versions.commonsDiscovery
+ api group: 'org.apache.ant', name: 'ant-launcher', version: versions.ant
+ api group: 'commons-cli', name: 'commons-cli', version: versions.commonsCli
/* Turn transitive resolution OFF for both aXSL and FOray modules, for greater design visibility. */
- api (group: 'org.axsl', name: 'axsl-utility', version: axslVersion) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-font', version: axslVersion) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-ps', version: axslVersion) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-orthography', version: axslVersion) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-unicode', version: axslVersion) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-utility', version: versions.axsl) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-font', version: versions.axsl) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-ps', version: versions.axsl) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-orthography', version: versions.axsl) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-unicode', version: versions.axsl) { transitive = false }
api (project(':foray-common')) { transitive = false }
api (project(':foray-ps')) { transitive = false }
- implementation group: 'ch.qos.logback', name: 'logback-classic', version: logbackClassicVersion
+ implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
- testImplementation group: 'junit', name: 'junit', version: junitVersion
- testImplementation group: 'org.mockito', name: 'mockito-core', version: mockitoVersion
+ testImplementation group: 'junit', name: 'junit', version: versions.junit
+ testImplementation group: 'org.mockito', name: 'mockito-core', version: versions.mockito
}
Modified: trunk/foray/foray-fotree/build.gradle
===================================================================
--- trunk/foray/foray-fotree/build.gradle 2022-02-24 20:38:59 UTC (rev 12610)
+++ trunk/foray/foray-fotree/build.gradle 2022-02-24 21:10:49 UTC (rev 12611)
@@ -5,28 +5,28 @@
description = 'foray-fotree'
dependencies {
- api group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion
- api group: 'org.axsl.org.w3c.dom.svg', name: 'svg-dom-java', version: svgDomVersion
- api group: 'org.axsl.org.w3c.dom.mathml', name: 'mathml-dom-java', version: mathMlDomVersion
+ api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
+ api group: 'org.axsl.org.w3c.dom.svg', name: 'svg-dom-java', version: versions.svgDom
+ api group: 'org.axsl.org.w3c.dom.mathml', name: 'mathml-dom-java', version: versions.mathMlDom
- api group: 'org.axsl', name: 'axsl-fotree', version: axslVersion
- api group: 'org.axsl', name: 'axsl-utility', version: axslVersion
- api group: 'org.axsl', name: 'axsl-i18n', version: axslVersion
- api group: 'org.axsl', name: 'axsl-font', version: axslVersion
- api group: 'org.axsl', name: 'axsl-graphic', version: axslVersion
- api group: 'org.axsl', name: 'axsl-orthography', version: axslVersion
- api group: 'org.axsl', name: 'axsl-speech', version: axslVersion
- api group: 'org.axsl', name: 'axsl-linebreak', version: axslVersion
- api group: 'org.axsl', name: 'axsl-kp-model', version: axslVersion
- api group: 'org.axsl', name: 'axsl-unicode', version: axslVersion
- api group: 'org.axsl', name: 'axsl-value', version: axslVersion
+ api group: 'org.axsl', name: 'axsl-fotree', version: versions.axsl
+ api group: 'org.axsl', name: 'axsl-utility', version: versions.axsl
+ api group: 'org.axsl', name: 'axsl-i18n', version: versions.axsl
+ api group: 'org.axsl', name: 'axsl-font', version: versions.axsl
+ api group: 'org.axsl', name: 'axsl-graphic', version: versions.axsl
+ api group: 'org.axsl', name: 'axsl-orthography', version: versions.axsl
+ api group: 'org.axsl', name: 'axsl-speech', version: versions.axsl
+ api group: 'org.axsl', name: 'axsl-linebreak', version: versions.axsl
+ api group: 'org.axsl', name: 'axsl-kp-model', version: versions.axsl
+ api group: 'org.axsl', name: 'axsl-unicode', version: versions.axsl
+ api group: 'org.axsl', name: 'axsl-value', version: versions.axsl
api project(':foray-common')
- implementation group: 'ch.qos.logback', name: 'logback-classic', version: logbackClassicVersion
+ implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
- testImplementation group: 'junit', name: 'junit', version: junitVersion
- testImplementation group: 'org.mockito', name: 'mockito-core', version: mockitoVersion
+ testImplementation group: 'junit', name: 'junit', version: versions.junit
+ testImplementation group: 'org.mockito', name: 'mockito-core', version: versions.mockito
}
javadoc {
Modified: trunk/foray/foray-graphic/build.gradle
===================================================================
--- trunk/foray/foray-graphic/build.gradle 2022-02-24 20:38:59 UTC (rev 12610)
+++ trunk/foray/foray-graphic/build.gradle 2022-02-24 21:10:49 UTC (rev 12611)
@@ -5,33 +5,33 @@
description = 'foray-graphic'
dependencies {
- api group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion
- api group: 'commons-io', name: 'commons-io', version: commonsIoVersion
- api group: 'org.apache.xmlgraphics', name: 'xmlgraphics-commons', version: xmlgraphicsCommonsVersion
- api group: 'org.apache.xmlgraphics', name: 'batik-bridge', version: batikVersion
- api group: 'org.apache.xmlgraphics', name: 'batik-gvt', version: batikVersion
- api group: 'org.apache.xmlgraphics', name: 'batik-parser', version: batikVersion
- api group: 'org.apache.xmlgraphics', name: 'batik-transcoder', version: batikVersion
- api group: 'org.apache.xmlgraphics', name: 'batik-svg-dom', version: batikVersion
- api group: 'org.apache.xmlgraphics', name: 'batik-css', version: batikVersion
-// api group: 'net.sourceforge.jeuclid', name: 'jeuclid-core', version: jeuclidVersion
- api group: 'de.rototor.jeuclid', name: 'jeuclid-core', version: jeuclidVersion
+ api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
+ api group: 'commons-io', name: 'commons-io', version: versions.commonsIo
+ api group: 'org.apache.xmlgraphics', name: 'xmlgraphics-commons', version: versions.xmlgraphicsCommons
+ api group: 'org.apache.xmlgraphics', name: 'batik-bridge', version: versions.batik
+ api group: 'org.apache.xmlgraphics', name: 'batik-gvt', version: versions.batik
+ api group: 'org.apache.xmlgraphics', name: 'batik-parser', version: versions.batik
+ api group: 'org.apache.xmlgraphics', name: 'batik-transcoder', version: versions.batik
+ api group: 'org.apache.xmlgraphics', name: 'batik-svg-dom', version: versions.batik
+ api group: 'org.apache.xmlgraphics', name: 'batik-css', version: versions.batik
+// api group: 'net.sourceforge.jeuclid', name: 'jeuclid-core', version: versions.jeuclid
+ api group: 'de.rototor.jeuclid', name: 'jeuclid-core', version: versions.jeuclid
/* Turn transitive resolution OFF for both aXSL and FOray modules, for greater design visibility. */
- api (group: 'org.axsl', name: 'axsl-utility', version: axslVersion) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-font', version: axslVersion) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-graphic', version: axslVersion) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-orthography', version: axslVersion) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-pdf', version: axslVersion) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-ps', version: axslVersion) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-utility', version: versions.axsl) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-font', version: versions.axsl) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-graphic', version: versions.axsl) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-orthography', version: versions.axsl) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-pdf', version: versions.axsl) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-ps', version: versions.axsl) { transitive = false }
api (project(':foray-common')) { transitive = false }
api (project(':foray-xml')) { transitive = false }
- implementation group: 'ch.qos.logback', name: 'logback-classic', version: logbackClassicVersion
+ implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
- testImplementation group: 'junit', name: 'junit', version: junitVersion
+ testImplementation group: 'junit', name: 'junit', version: versions.junit
}
javadoc {
Modified: trunk/foray/foray-layout/build.gradle
===================================================================
--- trunk/foray/foray-layout/build.gradle 2022-02-24 20:38:59 UTC (rev 12610)
+++ trunk/foray/foray-layout/build.gradle 2022-02-24 21:10:49 UTC (rev 12611)
@@ -5,19 +5,19 @@
description = 'foray-layout'
dependencies {
- api group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion
+ api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
- api group: 'org.axsl', name: 'axsl-layout', version: axslVersion
- api group: 'org.axsl', name: 'axsl-areatree', version: axslVersion
- api group: 'org.axsl', name: 'axsl-galley', version: axslVersion
- api group: 'org.axsl', name: 'axsl-fotree', version: axslVersion
- api group: 'org.axsl', name: 'axsl-linebreak', version: axslVersion
+ api group: 'org.axsl', name: 'axsl-layout', version: versions.axsl
+ api group: 'org.axsl', name: 'axsl-areatree', version: versions.axsl
+ api group: 'org.axsl', name: 'axsl-galley', version: versions.axsl
+ api group: 'org.axsl', name: 'axsl-fotree', version: versions.axsl
+ api group: 'org.axsl', name: 'axsl-linebreak', version: versions.axsl
api project(':foray-common')
/* TODO: We should be able to eliminate the dependency on foray-content. */
api project(':foray-content')
- implementation group: 'ch.qos.logback', name: 'logback-classic', version: logbackClassicVersion
+ implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
}
javadoc {
Modified: trunk/foray/foray-linebreak/build.gradle
===================================================================
--- trunk/foray/foray-linebreak/build.gradle 2022-02-24 20:38:59 UTC (rev 12610)
+++ trunk/foray/foray-linebreak/build.gradle 2022-02-24 21:10:49 UTC (rev 12611)
@@ -5,15 +5,15 @@
description = 'foray-linebreak'
dependencies {
- api group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion
- api group: 'org.axsl', name: 'axsl-linebreak', version: axslVersion
+ api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
+ api group: 'org.axsl', name: 'axsl-linebreak', version: versions.axsl
api project(':foray-common')
- implementation group: 'ch.qos.logback', name: 'logback-classic', version: logbackClassicVersion
+ implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
- testImplementation group: 'junit', name: 'junit', version: junitVersion
- testImplementation group: 'org.mockito', name: 'mockito-core', version: mockitoVersion
-// testImplementation group: 'org.hamcrest', name: 'hamcrest', version: hamcrestVersion
+ testImplementation group: 'junit', name: 'junit', version: versions.junit
+ testImplementation group: 'org.mockito', name: 'mockito-core', version: versions.mockito
+// testImplementation group: 'org.hamcrest', name: 'hamcrest', version: versions.hamcrest
testImplementation project(':foray-orthography')
testImplementation (testFixtures(project(':foray-font')))
Modified: trunk/foray/foray-mif/build.gradle
===================================================================
--- trunk/foray/foray-mif/build.gradle 2022-02-24 20:38:59 UTC (rev 12610)
+++ trunk/foray/foray-mif/build.gradle 2022-02-24 21:10:49 UTC (rev 12611)
@@ -5,14 +5,14 @@
description = 'foray-mif'
dependencies {
- api group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion
+ api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
- api group: 'org.axsl', name: 'axsl-mif', version: axslVersion
- api group: 'org.axsl', name: 'axsl-output', version: axslVersion
+ api group: 'org.axsl', name: 'axsl-mif', version: versions.axsl
+ api group: 'org.axsl', name: 'axsl-output', version: versions.axsl
api project(':foray-common')
- implementation group: 'ch.qos.logback', name: 'logback-classic', version: logbackClassicVersion
+ implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
}
javadoc {
Modified: trunk/foray/foray-orthography/build.gradle
===================================================================
--- trunk/foray/foray-orthography/build.gradle 2022-02-24 20:38:59 UTC (rev 12610)
+++ trunk/foray/foray-orthography/build.gradle 2022-02-24 21:10:49 UTC (rev 12611)
@@ -5,29 +5,29 @@
description = 'foray-orthography'
dependencies {
- api group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion
- api group: 'xml-resolver', name: 'xml-resolver', version: xmlResolverVersion
- api group: 'org.apache.ant', name: 'ant-launcher', version: antVersion
- api group: 'commons-cli', name: 'commons-cli', version: commonsCliVersion
- api group: 'commons-io', name: 'commons-io', version: commonsIoVersion
- api group: 'com.ibm.icu', name: 'icu4j', version: icu4jVersion
+ api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
+ api group: 'xml-resolver', name: 'xml-resolver', version: versions.xmlResolver
+ api group: 'org.apache.ant', name: 'ant-launcher', version: versions.ant
+ api group: 'commons-cli', name: 'commons-cli', version: versions.commonsCli
+ api group: 'commons-io', name: 'commons-io', version: versions.commonsIo
+ api group: 'com.ibm.icu', name: 'icu4j', version: versions.icu4j
/* Turn transitive resolution OFF for both aXSL and FOray modules, for greater design visibility. */
- api (group: 'org.axsl', name: 'axsl-utility', version: axslVersion) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-i18n', version: axslVersion) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-orthography', version: axslVersion) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-fotree', version: axslVersion) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-kp-model', version: axslVersion) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-unicode', version: axslVersion) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-value', version: axslVersion) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-utility', version: versions.axsl) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-i18n', version: versions.axsl) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-orthography', version: versions.axsl) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-fotree', version: versions.axsl) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-kp-model', version: versions.axsl) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-unicode', version: versions.axsl) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-value', version: versions.axsl) { transitive = false }
api (project(':foray-common')) { transitive = false }
- implementation group: 'ch.qos.logback', name: 'logback-classic', version: logbackClassicVersion
+ implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
- testImplementation group: 'junit', name: 'junit', version: junitVersion
- testImplementation group: 'org.mockito', name: 'mockito-core', version: mockitoVersion
+ testImplementation group: 'junit', name: 'junit', version: versions.junit
+ testImplementation group: 'org.mockito', name: 'mockito-core', version: versions.mockito
}
Modified: trunk/foray/foray-output/build.gradle
===================================================================
--- trunk/foray/foray-output/build.gradle 2022-02-24 20:38:59 UTC (rev 12610)
+++ trunk/foray/foray-output/build.gradle 2022-02-24 21:10:49 UTC (rev 12611)
@@ -5,19 +5,19 @@
description = 'foray-output'
dependencies {
- api group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion
+ api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
/* Turn transitive resolution OFF for both aXSL and FOray modules, for greater design visibility. */
- api (group: 'org.axsl', name: 'axsl-font', version: axslVersion) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-output', version: axslVersion) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-mif', version: axslVersion) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-fotree', version: axslVersion) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-value', version: axslVersion) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-font', version: versions.axsl) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-output', version: versions.axsl) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-mif', version: versions.axsl) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-fotree', version: versions.axsl) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-value', version: versions.axsl) { transitive = false }
api (project(':foray-common')) { transitive = false }
- implementation group: 'ch.qos.logback', name: 'logback-classic', version: logbackClassicVersion
+ implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
}
javadoc {
Modified: trunk/foray/foray-pdf/build.gradle
===================================================================
--- trunk/foray/foray-pdf/build.gradle 2022-02-24 20:38:59 UTC (rev 12610)
+++ trunk/foray/foray-pdf/build.gradle 2022-02-24 21:10:49 UTC (rev 12611)
@@ -5,25 +5,25 @@
description = 'foray-pdf'
dependencies {
- api group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion
- api group: 'org.apache.xmlgraphics', name: 'batik-awt-util', version: batikVersion
+ api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
+ api group: 'org.apache.xmlgraphics', name: 'batik-awt-util', version: versions.batik
/* Turn transitive resolution OFF for both aXSL and FOray modules, for greater design visibility. */
- api (group: 'org.axsl', name: 'axsl-pdf', version: axslVersion) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-utility', version: axslVersion) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-font', version: axslVersion) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-graphic', version: axslVersion) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-orthography', version: axslVersion) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-ps', version: axslVersion) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-unicode', version: axslVersion) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-pdf', version: versions.axsl) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-utility', version: versions.axsl) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-font', version: versions.axsl) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-graphic', version: versions.axsl) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-orthography', version: versions.axsl) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-ps', version: versions.axsl) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-unicode', version: versions.axsl) { transitive = false }
api (project(':foray-common')) { transitive = false }
- implementation group: 'ch.qos.logback', name: 'logback-classic', version: logbackClassicVersion
+ implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
- testImplementation group: 'junit', name: 'junit', version: junitVersion
- testImplementation group: 'org.mockito', name: 'mockito-core', version: mockitoVersion
+ testImplementation group: 'junit', name: 'junit', version: versions.junit
+ testImplementation group: 'org.mockito', name: 'mockito-core', version: versions.mockito
testImplementation project(':foray-font')
}
Modified: trunk/foray/foray-pioneer/build.gradle
===================================================================
--- trunk/foray/foray-pioneer/build.gradle 2022-02-24 20:38:59 UTC (rev 12610)
+++ trunk/foray/foray-pioneer/build.gradle 2022-02-24 21:10:49 UTC (rev 12611)
@@ -5,24 +5,24 @@
description = 'foray-pioneer'
dependencies {
- api group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion
+ api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
- api group: 'org.axsl', name: 'axsl-utility', version: axslVersion
- api group: 'org.axsl', name: 'axsl-layout', version: axslVersion
- api group: 'org.axsl', name: 'axsl-fotree', version: axslVersion
- api group: 'org.axsl', name: 'axsl-areatree', version: axslVersion
- api group: 'org.axsl', name: 'axsl-galley', version: axslVersion
- api group: 'org.axsl', name: 'axsl-linebreak', version: axslVersion
- api group: 'org.axsl', name: 'axsl-kp-model', version: axslVersion
- api group: 'org.axsl', name: 'axsl-graphic', version: axslVersion
- api group: 'org.axsl', name: 'axsl-font', version: axslVersion
- api group: 'org.axsl', name: 'axsl-orthography', version: axslVersion
+ api group: 'org.axsl', name: 'axsl-utility', version: versions.axsl
+ api group: 'org.axsl', name: 'axsl-layout', version: versions.axsl
+ api group: 'org.axsl', name: 'axsl-fotree', version: versions.axsl
+ api group: 'org.axsl', name: 'axsl-areatree', version: versions.axsl
+ api group: 'org.axsl', name: 'axsl-galley', version: versions.axsl
+ api group: 'org.axsl', name: 'axsl-linebreak', version: versions.axsl
+ api group: 'org.axsl', name: 'axsl-kp-model', version: versions.axsl
+ api group: 'org.axsl', name: 'axsl-graphic', version: versions.axsl
+ api group: 'org.axsl', name: 'axsl-font', version: versions.axsl
+ api group: 'org.axsl', name: 'axsl-orthography', version: versions.axsl
api project(':foray-common')
api project(':foray-layout')
api project(':foray-content')
- implementation group: 'ch.qos.logback', name: 'logback-classic', version: logbackClassicVersion
+ implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
}
javadoc {
Modified: trunk/foray/foray-ps/build.gradle
===================================================================
--- trunk/foray/foray-ps/build.gradle 2022-02-24 20:38:59 UTC (rev 12610)
+++ trunk/foray/foray-ps/build.gradle 2022-02-24 21:10:49 UTC (rev 12611)
@@ -5,18 +5,18 @@
description = 'foray-ps'
dependencies {
- api group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion
- api group: 'commons-cli', name: 'commons-cli', version: commonsCliVersion
- api group: 'commons-io', name: 'commons-io', version: commonsIoVersion
+ api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
+ api group: 'commons-cli', name: 'commons-cli', version: versions.commonsCli
+ api group: 'commons-io', name: 'commons-io', version: versions.commonsIo
- api group: 'org.axsl', name: 'axsl-utility', version: axslVersion
- api group: 'org.axsl', name: 'axsl-ps', version: axslVersion
+ api group: 'org.axsl', name: 'axsl-utility', version: versions.axsl
+ api group: 'org.axsl', name: 'axsl-ps', version: versions.axsl
api project(':foray-common')
- implementation group: 'ch.qos.logback', name: 'logback-classic', version: logbackClassicVersion
+ implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
- testImplementation group: 'junit', name: 'junit', version: junitVersion
+ testImplementation group: 'junit', name: 'junit', version: versions.junit
}
javadoc {
Modified: trunk/foray/foray-render/build.gradle
===================================================================
--- trunk/foray/foray-render/build.gradle 2022-02-24 20:38:59 UTC (rev 12610)
+++ trunk/foray/foray-render/build.gradle 2022-02-24 21:10:49 UTC (rev 12611)
@@ -5,27 +5,27 @@
description = 'foray-render'
dependencies {
- api group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion
- api group: 'org.axsl.org.w3c.dom.svg', name: 'svg-dom-java', version: svgDomVersion
+ api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
+ api group: 'org.axsl.org.w3c.dom.svg', name: 'svg-dom-java', version: versions.svgDom
/* Turn transitive resolution OFF for both aXSL and FOray modules, for greater design visibility. */
- api (group: 'org.axsl', name: 'axsl-utility', version: axslVersion) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-output', version: axslVersion) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-font', version: axslVersion) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-pdf', version: axslVersion) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-galley', version: axslVersion) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-value', version: axslVersion) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-graphic', version: axslVersion) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-orthography', version: axslVersion) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-ps', version: axslVersion) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-utility', version: versions.axsl) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-output', version: versions.axsl) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-font', version: versions.axsl) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-pdf', version: versions.axsl) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-galley', version: versions.axsl) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-value', version: versions.axsl) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-graphic', version: versions.axsl) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-orthography', version: versions.axsl) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-ps', version: versions.axsl) { transitive = false }
api (project(':foray-common')) { transitive = false }
api (project(':foray-output')) { transitive = false }
- implementation group: 'ch.qos.logback', name: 'logback-classic', version: logbackClassicVersion
+ implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
- testImplementation group: 'junit', name: 'junit', version: junitVersion
+ testImplementation group: 'junit', name: 'junit', version: versions.junit
}
javadoc {
Modified: trunk/foray/foray-speech/build.gradle
===================================================================
--- trunk/foray/foray-speech/build.gradle 2022-02-24 20:38:59 UTC (rev 12610)
+++ trunk/foray/foray-speech/build.gradle 2022-02-24 21:10:49 UTC (rev 12611)
@@ -5,10 +5,10 @@
description = 'foray-speech'
dependencies {
- api group: 'org.axsl', name: 'axsl-speech', version: axslVersion
+ api group: 'org.axsl', name: 'axsl-speech', version: versions.axsl
api project(':foray-common')
- implementation group: 'ch.qos.logback', name: 'logback-classic', version: logbackClassicVersion
+ implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
}
javadoc {
Modified: trunk/foray/foray-unicode/build.gradle
===================================================================
--- trunk/foray/foray-unicode/build.gradle 2022-02-24 20:38:59 UTC (rev 12610)
+++ trunk/foray/foray-unicode/build.gradle 2022-02-24 21:10:49 UTC (rev 12611)
@@ -5,12 +5,12 @@
description = 'foray-unicode'
dependencies {
- api group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion
- api group: 'commons-cli', name: 'commons-cli', version: commonsCliVersion
+ api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
+ api group: 'commons-cli', name: 'commons-cli', version: versions.commonsCli
- implementation group: 'ch.qos.logback', name: 'logback-classic', version: logbackClassicVersion
+ implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
- testImplementation group: 'junit', name: 'junit', version: junitVersion
+ testImplementation group: 'junit', name: 'junit', version: versions.junit
}
javadoc {
Modified: trunk/foray/foray-xml/build.gradle
===================================================================
--- trunk/foray/foray-xml/build.gradle 2022-02-24 20:38:59 UTC (rev 12610)
+++ trunk/foray/foray-xml/build.gradle 2022-02-24 21:10:49 UTC (rev 12611)
@@ -5,15 +5,14 @@
description = 'foray-xml'
dependencies {
- api group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion
- api group: 'commons-cli', name: 'commons-cli', version: commonsCliVersion
- api group: 'xml-resolver', name: 'xml-resolver', version: xmlResolverVersion
+ api group: 'org.slf4j', name: 'slf4j-api', version: versions.slf4j
+ api group: 'commons-cli', name: 'commons-cli', version: versions.commonsCli
+ api group: 'xml-resolver', name: 'xml-resolver', version: versions.xmlResolver
api project(':foray-common')
-// implementation group: 'xerces', name: 'xercesImpl', version: xercesImplVersion
- implementation group: 'ch.qos.logback', name: 'logback-classic', version: logbackClassicVersion
+ implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackClassic
- testImplementation group: 'junit', name: 'junit', version: junitVersion
+ testImplementation group: 'junit', name: 'junit', version: versions.junit
}
Modified: trunk/foray/foray-zz-attic/build.gradle
===================================================================
--- trunk/foray/foray-zz-attic/build.gradle 2022-02-24 20:38:59 UTC (rev 12610)
+++ trunk/foray/foray-zz-attic/build.gradle 2022-02-24 21:10:49 UTC (rev 12611)
@@ -5,15 +5,15 @@
description = 'foray-zz-attic'
dependencies {
- api (group: 'commons-io', name: 'commons-io', version: commonsIoVersion) { transitive = false }
+ api (group: 'commons-io', name: 'commons-io', version: versions.commonsIo) { transitive = false }
api (group: 'jakarta.activation', name: 'jakarta.activation-api', version: '1.2.2') { transitive = false }
- api (group: 'org.axsl', name: 'axsl-utility', version: axslVersion) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-utility', version: versions.axsl) { transitive = false }
api (project(':foray-common')) { transitive = false }
- testImplementation group: 'junit', name: 'junit', version: junitVersion
- testImplementation group: 'org.mockito', name: 'mockito-core', version: mockitoVersion
+ testImplementation group: 'junit', name: 'junit', version: versions.junit
+ testImplementation group: 'org.mockito', name: 'mockito-core', version: versions.mockito
}
javadoc {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-02-24 20:39:02
|
Revision: 12610
http://sourceforge.net/p/foray/code/12610
Author: victormote
Date: 2022-02-24 20:38:59 +0000 (Thu, 24 Feb 2022)
Log Message:
-----------
Move subproject logic to appropriate conventions file.
Modified Paths:
--------------
trunk/foray/build.gradle
trunk/foray/buildSrc/src/main/groovy/foray.app-conventions.gradle
trunk/foray/buildSrc/src/main/groovy/foray.common-conventions.gradle
trunk/foray/buildSrc/src/main/groovy/foray.library-conventions.gradle
trunk/foray/foray-app/build.gradle
Modified: trunk/foray/build.gradle
===================================================================
--- trunk/foray/build.gradle 2022-02-24 18:42:24 UTC (rev 12609)
+++ trunk/foray/build.gradle 2022-02-24 20:38:59 UTC (rev 12610)
@@ -23,13 +23,9 @@
id 'java'
}
-def buildDate = new Date().format("yyyy-MM-dd 'at' HH:mm 'GMT'", TimeZone.getTimeZone("GMT"))
-
allprojects {
/******************** See Note 1 below for information about dependency releases. ********************/
- ext.javaSourceCompatibility = JavaVersion.VERSION_1_7
- ext.javaTargetCompatibility = JavaVersion.VERSION_1_7
/* Dependencies related to aXSL. These should be maintained at the same versions used by aXSL. */
ext.axslVersion = '0.3-SNAPSHOT' // Latest is 0.3-SNAPSHOT as of 2021-01-12. See Note 2.
@@ -56,158 +52,9 @@
ext.checkstyleVersion = '8.39' // Latest is 8.39 as of 2021-01-12.
-/*
- * Notes on Dependency Releases (See above for references)
- * ========================================================
- * 1. Latest release information above is per www.mvnrepository.com, and ignores non-released artifacts (no alpha or
- * beta releases, except for aXSL).
- *
- * 2. At the moment, and for the foreseeable future, aXSL is controlled by FOray, as we attempt to get the module APIs
- * cleaned up and robust.
- *
- * 3. Apache Commons IO releases, starting at 2.7, are compiled with Java 1.8 (major version 52), which produces
- * compile-time warnings when we try to build with Java 1.7.
- * We have therefore stayed with the highest version that supports the Java 1.7 compiler, which is 2.6.
- *
- * 4. It looks like the catalog resolver code is part of Java 1.9.
- *
- * 5. Ant 1.10.9 is compiled with Java 1.8 (major version 52), which produces compile-time warnings when we try to
- * build with Java 1.7.
- * We have therefore stayed with the highest version of 1.9, which is 1.9.15.
- *
- * 6. Servlet-api 4.0.1 is compiled with Java 1.8 (major version 52), which produces compile-time warnings when we try
- * to build with Java 1.7.
- * We have therefore stayed with the highest version of 3.x, which is 3.1.0.
- *
- * 7. JEuclid has moved from group net.sourceforge.jeuclid to de.rototor.jeuclid, but continues to use the name
- * "jeuclid-core" and the same general release numbering sequence.
- * The latest version for group net.sourceforge.jeuclid as of 2021-01-12 is 3.1.9 per www.mvnrepository.com.
- *
- * 8. JUnit is compiled with Java 8 (major version 52) starting with release 5.0.0, and the artifact appears to be
- * named org.junit.jupiter:junit-jupiter-api also starting with that release.
- * We have therefore stayed with the highest version supporting Java 7, which is 4.13.2 as of Jan. 17, 2022.
- *
- * 9. Mockito is compiled with Java 8 (major version 52) starting with release 3.0.0.
- * We have therefore stayed with the highest version supporting Java 7, which 2.28.2.
- *
- */
-
}
-subprojects {
- apply plugin: 'java-library'
- apply plugin: 'checkstyle'
- apply plugin: 'maven-publish'
-
- java {
- sourceCompatibility = javaSourceCompatibility
- targetCompatibility = javaTargetCompatibility
- }
-
- tasks.withType(JavaCompile) {
- options.encoding = 'UTF-8'
-
- /*
- * We wish to continue building FOray in Java 1.7, primarily to maximize the potential audience.
- * Some modern compilers will no longer compile to that target, or will log warnings due to its end-of-life or
- * near-end-of-life status.
- * Therefore, we need to compile with an older compiler. In your personal gradle.properties file, set
- * property forayJdkHome to the home directory of the JDK you wish to use for the compile process.
- * For example:
- * forayJdkHome = c:/Program Files/Java/jdk1.8.0_162
- *
- * If a more recent compiler than 1.7 is used, you will be cross-compiling.
- * In the example above, we are using a 1.8 compiler to cross-compile to 1.7.
- * The Java 1.8 compiler will want a boot classpath containing the 1.7 runtime classes, to avoid compiling
- * against classes and methods that are actually missing in the 1.7 runtime.
- * You can provide the path to the jar containing those runtime classes by setting, in your personal
- * gradle.properties file, the property forayTargetRuntimeJar.
- * For example:
- * forayTargetRuntimeJar = c:/Program Files/Java/jdk1.7.0_80/jre/lib/rt.jar
- *
- * See the following for more information about cross-compiling:
- * https://stackoverflow.com/questions/15882586/bootstrap-class-path-not-set
- */
- compileJava.options.fork = true
- compileJava.options.forkOptions.javaHome = file(project.property('forayJdkHome'))
-// options.bootstrapClasspath = files(file(project.property('forayTargetRuntimeJar')))
-
- /* Set test options also. */
- compileTestJava.options.fork = true
- compileTestJava.options.forkOptions.javaHome = file(project.property('forayJdkHome'))
- }
-
- checkstyle {
- configFile = new File(rootProject.projectDir.absolutePath + '/foray-00-master/config/checkstyle/checkstyle-config.xml')
- configProperties.put('foray.root', rootProject.projectDir)
- toolVersion = checkstyleVersion
- }
-
- task packageSources(type: Jar, dependsOn:classes) {
- classifier = 'sources'
- from sourceSets.main.allSource
- }
-
- task packageJavadocs(type: Jar, dependsOn:javadoc) {
- classifier = 'javadoc'
- from javadoc.destinationDir
- }
-
-
- /* Configure the common parts of the project javadocs. */
- javadoc {
- failOnError = true
- options.encoding = 'UTF-8'
- options.author = false
- options.version = true
- options.use = true
- options.memberLevel = JavadocMemberLevel.PROTECTED
- options.bottom = "<p>This documentation was created ${buildDate} by <a href=\"http://www.foray.org\"" +
- "target=\"_new\">The FOray Group</a> and may be freely copied. See license for details.</p>"
- }
-
-
- jar {
- manifest {
- attributes("Implementation-Title": "${project.name}")
- attributes("Implementation-Version": "${project.version}")
- attributes("Implementation-Vendor": "The FOray project http://www.foray.org")
- }
- }
-
-
- artifacts {
- archives packageSources
- archives packageJavadocs
- }
-
- repositories {
- mavenLocal()
- maven { url "https://repo.maven.apache.org/maven2" }
- }
-
- publishing {
- publications {
- mavenJava(MavenPublication) {
- from components.java
- artifact packageSources
- artifact packageJavadocs
- }
- }
- }
-
-}
-
-
-/* Run all of the tests. */
-task testReport(type: TestReport) {
- destinationDir = file("$buildDir/reports/allTests")
- // Include the results from the `test` task in all subprojects
- reportOn subprojects*.test
-}
-
-
/* Configure the aggregate javadocs. */
task allJavadoc(type: Javadoc) {
source subprojects.collect {project -> project.sourceSets.main.allJava}
Modified: trunk/foray/buildSrc/src/main/groovy/foray.app-conventions.gradle
===================================================================
--- trunk/foray/buildSrc/src/main/groovy/foray.app-conventions.gradle 2022-02-24 18:42:24 UTC (rev 12609)
+++ trunk/foray/buildSrc/src/main/groovy/foray.app-conventions.gradle 2022-02-24 20:38:59 UTC (rev 12610)
@@ -2,9 +2,6 @@
plugins {
id 'foray.common-conventions'
- id 'java'
- id 'checkstyle'
- id 'maven-publish'
}
/* Last line of script. */
Modified: trunk/foray/buildSrc/src/main/groovy/foray.common-conventions.gradle
===================================================================
--- trunk/foray/buildSrc/src/main/groovy/foray.common-conventions.gradle 2022-02-24 18:42:24 UTC (rev 12609)
+++ trunk/foray/buildSrc/src/main/groovy/foray.common-conventions.gradle 2022-02-24 20:38:59 UTC (rev 12610)
@@ -1,6 +1,181 @@
/* Precompiled script plugin common to all FOray projects. */
+plugins {
+ id 'java'
+ id 'checkstyle'
+ id 'maven-publish'
+}
+
+
+repositories {
+ mavenLocal()
+ maven { url "https://repo.maven.apache.org/maven2" }
+}
+
group = 'org.foray'
version = '0.4-SNAPSHOT'
+ext.buildDate = new Date().format("yyyy-MM-dd 'at' HH:mm 'GMT'", TimeZone.getTimeZone("GMT"))
+
+
+/******************** See Note 1 below for information about dependency releases. ********************/
+ext.versions = [
+ javaSourceCompatibility: JavaVersion.VERSION_1_7,
+ javaTargetCompatibility: JavaVersion.VERSION_1_7,
+
+ /* Dependencies related to aXSL. These should be maintained at the same versions used by aXSL. */
+ axsl: '0.3-SNAPSHOT', // Latest is 0.3-SNAPSHOT as of 2021-01-12. See Note 2.
+ svgDom: '1.1', // See aXSL master/build.gradle
+ mathMlDom: '2.0', // See aXSL master/build.gradle
+ /* End of aXSL-related dependencies. */
+
+ slf4j: '1.7.30', // Latest is 1.7.30 as of 2021-01-12.
+ commonsIo: '2.6', // Latest is 2.8.0 as of 2021-01-12. See Note 3.
+ commonsDiscovery: '0.5', // Latest is 0.5 as of 2021-01-12.
+ commonsCli: '1.4', // Latest is 1.4 as of 2021-01-12.
+ xmlResolver: '1.2', // Latest is 1.2 as of 2021-01-12. See Note 4.
+ ant: '1.9.15', // Latest is 1.10.9 as of 2021-01-12. See Note 5.
+ servletApi: '3.1.0', // Latest is 4.0.1 as of 2021-01-12. See Note 6.
+ xmlgraphicsCommons: '2.6', // Latest is 2.6 as of 2022-01-17.
+ batik: '1.14', // Latest is 1.14 as of 2022-01-17.
+ jeuclid: '3.1.14', // Latest is 3.1.14 as of 2021-01-12. See Note 7.
+ icu4j: '68.2', // Latest is 68.2 as of 2021-01-12.
+
+ junit: '4.13.2', // Latest is 5.8.2 as of 2022-01-17. See Note 8.
+ mockito: '2.28.2', // Latest is 3.7.0 as of 2021-01-12. See Note 9.
+ logbackClassic: '1.2.3', // Latest is 1.2.3 as of 2021-01-12.
+
+ checkstyle: '8.39', // Latest is 8.39 as of 2021-01-12.
+]
+/*
+ * Notes on Dependency Releases (See above for references)
+ * ========================================================
+ * 1. Latest release information above is per www.mvnrepository.com, and ignores non-released artifacts (no alpha or
+ * beta releases, except for aXSL).
+ *
+ * 2. At the moment, and for the foreseeable future, aXSL is controlled by FOray, as we attempt to get the module APIs
+ * cleaned up and robust.
+ *
+ * 3. Apache Commons IO releases, starting at 2.7, are compiled with Java 1.8 (major version 52), which produces
+ * compile-time warnings when we try to build with Java 1.7.
+ * We have therefore stayed with the highest version that supports the Java 1.7 compiler, which is 2.6.
+ *
+ * 4. It looks like the catalog resolver code is part of Java 1.9.
+ *
+ * 5. Ant 1.10.9 is compiled with Java 1.8 (major version 52), which produces compile-time warnings when we try to
+ * build with Java 1.7.
+ * We have therefore stayed with the highest version of 1.9, which is 1.9.15.
+ *
+ * 6. Servlet-api 4.0.1 is compiled with Java 1.8 (major version 52), which produces compile-time warnings when we try
+ * to build with Java 1.7.
+ * We have therefore stayed with the highest version of 3.x, which is 3.1.0.
+ *
+ * 7. JEuclid has moved from group net.sourceforge.jeuclid to de.rototor.jeuclid, but continues to use the name
+ * "jeuclid-core" and the same general release numbering sequence.
+ * The latest version for group net.sourceforge.jeuclid as of 2021-01-12 is 3.1.9 per www.mvnrepository.com.
+ *
+ * 8. JUnit is compiled with Java 8 (major version 52) starting with release 5.0.0, and the artifact appears to be
+ * named org.junit.jupiter:junit-jupiter-api also starting with that release.
+ * We have therefore stayed with the highest version supporting Java 7, which is 4.13.2 as of Jan. 17, 2022.
+ *
+ * 9. Mockito is compiled with Java 8 (major version 52) starting with release 3.0.0.
+ * We have therefore stayed with the highest version supporting Java 7, which 2.28.2.
+ *
+ */
+
+
+java {
+ sourceCompatibility = versions.javaSourceCompatibility
+ targetCompatibility = versions.javaTargetCompatibility
+}
+
+tasks.withType(JavaCompile) {
+ options.encoding = 'UTF-8'
+
+ /*
+ * We wish to continue building FOray in Java 1.7, primarily to maximize the potential audience.
+ * Some modern compilers will no longer compile to that target, or will log warnings due to its end-of-life or
+ * near-end-of-life status.
+ * Therefore, we need to compile with an older compiler. In your personal gradle.properties file, set
+ * property forayJdkHome to the home directory of the JDK you wish to use for the compile process.
+ * For example:
+ * forayJdkHome = c:/Program Files/Java/jdk1.8.0_162
+ *
+ * If a more recent compiler than 1.7 is used, you will be cross-compiling.
+ * In the example above, we are using a 1.8 compiler to cross-compile to 1.7.
+ * The Java 1.8 compiler will want a boot classpath containing the 1.7 runtime classes, to avoid compiling
+ * against classes and methods that are actually missing in the 1.7 runtime.
+ * You can provide the path to the jar containing those runtime classes by setting, in your personal
+ * gradle.properties file, the property forayTargetRuntimeJar.
+ * For example:
+ * forayTargetRuntimeJar = c:/Program Files/Java/jdk1.7.0_80/jre/lib/rt.jar
+ *
+ * See the following for more information about cross-compiling:
+ * https://stackoverflow.com/questions/15882586/bootstrap-class-path-not-set
+ */
+ compileJava.options.fork = true
+ compileJava.options.forkOptions.javaHome = file(project.property('forayJdkHome'))
+// options.bootstrapClasspath = files(file(project.property('forayTargetRuntimeJar')))
+
+ /* Set test options also. */
+ compileTestJava.options.fork = true
+ compileTestJava.options.forkOptions.javaHome = file(project.property('forayJdkHome'))
+ }
+
+task packageSources(type: Jar, dependsOn:classes) {
+ classifier = 'sources'
+ from sourceSets.main.allSource
+}
+
+task packageJavadocs(type: Jar, dependsOn:javadoc) {
+ classifier = 'javadoc'
+ from javadoc.destinationDir
+}
+
+
+/* Configure the common parts of the project javadocs. */
+javadoc {
+ failOnError = true
+ options.encoding = 'UTF-8'
+ options.author = false
+ options.version = true
+ options.use = true
+ options.memberLevel = JavadocMemberLevel.PROTECTED
+ options.bottom = "<p>This documentation was created ${buildDate} by <a href=\"http://www.foray.org\"" +
+ "target=\"_new\">The FOray Group</a> and may be freely copied. See license for details.</p>"
+}
+
+
+jar {
+ manifest {
+ attributes("Implementation-Title": "${project.name}")
+ attributes("Implementation-Version": "${project.version}")
+ attributes("Implementation-Vendor": "The FOray project http://www.foray.org")
+ }
+}
+
+
+artifacts {
+ archives packageSources
+ archives packageJavadocs
+}
+
+publishing {
+ publications {
+ mavenJava(MavenPublication) {
+ from components.java
+ artifact packageSources
+ artifact packageJavadocs
+ }
+ }
+}
+
+
+
+checkstyle {
+ configFile = new File(rootProject.projectDir.absolutePath + '/foray-00-master/config/checkstyle/checkstyle-config.xml')
+ configProperties.put('foray.root', rootProject.projectDir)
+ toolVersion = versions.checkstyle
+}
+
/* Last line of script. */
Modified: trunk/foray/buildSrc/src/main/groovy/foray.library-conventions.gradle
===================================================================
--- trunk/foray/buildSrc/src/main/groovy/foray.library-conventions.gradle 2022-02-24 18:42:24 UTC (rev 12609)
+++ trunk/foray/buildSrc/src/main/groovy/foray.library-conventions.gradle 2022-02-24 20:38:59 UTC (rev 12610)
@@ -3,8 +3,7 @@
plugins {
id 'foray.common-conventions'
id 'java-library'
- id 'checkstyle'
- id 'maven-publish'
}
+
/* Last line of script. */
Modified: trunk/foray/foray-app/build.gradle
===================================================================
--- trunk/foray/foray-app/build.gradle 2022-02-24 18:42:24 UTC (rev 12609)
+++ trunk/foray/foray-app/build.gradle 2022-02-24 20:38:59 UTC (rev 12610)
@@ -5,45 +5,44 @@
description = 'foray-app'
dependencies {
- api group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion
- api group: 'javax.servlet', name: 'javax.servlet-api', version: servletApiVersion
- api group: 'xml-resolver', name: 'xml-resolver', version: xmlResolverVersion
-// api group: 'xerces', name: 'xercesImpl', version: xercesImplVersion
- api group: 'org.apache.ant', name: 'ant', version: antVersion
- api group: 'commons-io', name: 'commons-io', version: commonsIoVersion
- api group: 'commons-cli', name: 'commons-cli', version: commonsCliVersion
+ implementation group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion
+ implementation group: 'javax.servlet', name: 'javax.servlet-api', version: servletApiVersion
+ implementation group: 'xml-resolver', name: 'xml-resolver', version: xmlResolverVersion
+ implementation group: 'org.apache.ant', name: 'ant', version: antVersion
+ implementation group: 'commons-io', name: 'commons-io', version: commonsIoVersion
+ implementation group: 'commons-cli', name: 'commons-cli', version: commonsCliVersion
- api group: 'org.axsl', name: 'axsl-font', version: axslVersion
- api group: 'org.axsl', name: 'axsl-linebreak', version: axslVersion
- api group: 'org.axsl', name: 'axsl-ps', version: axslVersion
- api group: 'org.axsl', name: 'axsl-areatree', version: axslVersion
- api group: 'org.axsl', name: 'axsl-output', version: axslVersion
- api group: 'org.axsl', name: 'axsl-fotree', version: axslVersion
- api group: 'org.axsl', name: 'axsl-galley', version: axslVersion
- api group: 'org.axsl', name: 'axsl-orthography', version: axslVersion
- api group: 'org.axsl', name: 'axsl-graphic', version: axslVersion
- api group: 'org.axsl', name: 'axsl-layout', version: axslVersion
- api group: 'org.axsl', name: 'axsl-speech', version: axslVersion
- api group: 'org.axsl', name: 'axsl-mif', version: axslVersion
- api group: 'org.axsl', name: 'axsl-pdf', version: axslVersion
+ implementation group: 'org.axsl', name: 'axsl-font', version: axslVersion
+ implementation group: 'org.axsl', name: 'axsl-linebreak', version: axslVersion
+ implementation group: 'org.axsl', name: 'axsl-ps', version: axslVersion
+ implementation group: 'org.axsl', name: 'axsl-areatree', version: axslVersion
+ implementation group: 'org.axsl', name: 'axsl-output', version: axslVersion
+ implementation group: 'org.axsl', name: 'axsl-fotree', version: axslVersion
+ implementation group: 'org.axsl', name: 'axsl-galley', version: axslVersion
+ implementation group: 'org.axsl', name: 'axsl-orthography', version: axslVersion
+ implementation group: 'org.axsl', name: 'axsl-graphic', version: axslVersion
+ implementation group: 'org.axsl', name: 'axsl-layout', version: axslVersion
+ implementation group: 'org.axsl', name: 'axsl-speech', version: axslVersion
+ implementation group: 'org.axsl', name: 'axsl-mif', version: axslVersion
+ implementation group: 'org.axsl', name: 'axsl-pdf', version: axslVersion
- api project(':foray-areatree')
- api project(':foray-common')
- api project(':foray-core')
- api project(':foray-font')
- api project(':foray-fotree')
- api project(':foray-graphic')
- api project(':foray-layout')
- api project(':foray-mif')
- api project(':foray-orthography')
- api project(':foray-output')
- api project(':foray-pdf')
- api project(':foray-pioneer')
- api project(':foray-ps')
- api project(':foray-render')
- api project(':foray-speech')
- api project(':foray-linebreak')
+ implementation project(':foray-areatree')
+ implementation project(':foray-common')
+ implementation project(':foray-core')
+ implementation project(':foray-font')
+ implementation project(':foray-fotree')
+ implementation project(':foray-graphic')
+ implementation project(':foray-layout')
+ implementation project(':foray-mif')
+ implementation project(':foray-orthography')
+ implementation project(':foray-output')
+ implementation project(':foray-pdf')
+ implementation project(':foray-pioneer')
+ implementation project(':foray-ps')
+ implementation project(':foray-render')
+ implementation project(':foray-speech')
+ implementation project(':foray-linebreak')
implementation group: 'ch.qos.logback', name: 'logback-classic', version: logbackClassicVersion
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-02-24 18:42:32
|
Revision: 12609
http://sourceforge.net/p/foray/code/12609
Author: victormote
Date: 2022-02-24 18:42:24 +0000 (Thu, 24 Feb 2022)
Log Message:
-----------
Add gradle convention scripts and point each build file to them.
Modified Paths:
--------------
trunk/foray/build.gradle
trunk/foray/foray-app/build.gradle
trunk/foray/foray-areatree/build.gradle
trunk/foray/foray-common/build.gradle
trunk/foray/foray-content/build.gradle
trunk/foray/foray-core/build.gradle
trunk/foray/foray-font/build.gradle
trunk/foray/foray-fotree/build.gradle
trunk/foray/foray-graphic/build.gradle
trunk/foray/foray-layout/build.gradle
trunk/foray/foray-linebreak/build.gradle
trunk/foray/foray-mif/build.gradle
trunk/foray/foray-orthography/build.gradle
trunk/foray/foray-output/build.gradle
trunk/foray/foray-pdf/build.gradle
trunk/foray/foray-pioneer/build.gradle
trunk/foray/foray-ps/build.gradle
trunk/foray/foray-render/build.gradle
trunk/foray/foray-speech/build.gradle
trunk/foray/foray-unicode/build.gradle
trunk/foray/foray-xml/build.gradle
trunk/foray/foray-zz-attic/build.gradle
Added Paths:
-----------
trunk/foray/buildSrc/src/
trunk/foray/buildSrc/src/main/
trunk/foray/buildSrc/src/main/groovy/
trunk/foray/buildSrc/src/main/groovy/foray.app-conventions.gradle
trunk/foray/buildSrc/src/main/groovy/foray.common-conventions.gradle
trunk/foray/buildSrc/src/main/groovy/foray.library-conventions.gradle
Modified: trunk/foray/build.gradle
===================================================================
--- trunk/foray/build.gradle 2022-02-24 18:17:13 UTC (rev 12608)
+++ trunk/foray/build.gradle 2022-02-24 18:42:24 UTC (rev 12609)
@@ -1,5 +1,5 @@
/*
-This build file was designed to run with Gradle version 7.3.3.
+This build file and the related subproject build files were designed to run with Gradle version 7.3.3.
Important targets to run from the master directory:
1. gradle build
@@ -18,14 +18,15 @@
Runs all tests from all projects.
*/
+plugins {
+ id 'foray.common-conventions'
+ id 'java'
+}
+
def buildDate = new Date().format("yyyy-MM-dd 'at' HH:mm 'GMT'", TimeZone.getTimeZone("GMT"))
allprojects {
- apply plugin: 'java'
- group = 'org.foray'
- version = '0.4-SNAPSHOT'
-
/******************** See Note 1 below for information about dependency releases. ********************/
ext.javaSourceCompatibility = JavaVersion.VERSION_1_7
ext.javaTargetCompatibility = JavaVersion.VERSION_1_7
Added: trunk/foray/buildSrc/src/main/groovy/foray.app-conventions.gradle
===================================================================
--- trunk/foray/buildSrc/src/main/groovy/foray.app-conventions.gradle (rev 0)
+++ trunk/foray/buildSrc/src/main/groovy/foray.app-conventions.gradle 2022-02-24 18:42:24 UTC (rev 12609)
@@ -0,0 +1,10 @@
+/* Precompiled script plugin for FOray app projects. */
+
+plugins {
+ id 'foray.common-conventions'
+ id 'java'
+ id 'checkstyle'
+ id 'maven-publish'
+}
+
+/* Last line of script. */
Property changes on: trunk/foray/buildSrc/src/main/groovy/foray.app-conventions.gradle
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev
\ No newline at end of property
Added: trunk/foray/buildSrc/src/main/groovy/foray.common-conventions.gradle
===================================================================
--- trunk/foray/buildSrc/src/main/groovy/foray.common-conventions.gradle (rev 0)
+++ trunk/foray/buildSrc/src/main/groovy/foray.common-conventions.gradle 2022-02-24 18:42:24 UTC (rev 12609)
@@ -0,0 +1,6 @@
+/* Precompiled script plugin common to all FOray projects. */
+
+group = 'org.foray'
+version = '0.4-SNAPSHOT'
+
+/* Last line of script. */
Property changes on: trunk/foray/buildSrc/src/main/groovy/foray.common-conventions.gradle
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev
\ No newline at end of property
Added: trunk/foray/buildSrc/src/main/groovy/foray.library-conventions.gradle
===================================================================
--- trunk/foray/buildSrc/src/main/groovy/foray.library-conventions.gradle (rev 0)
+++ trunk/foray/buildSrc/src/main/groovy/foray.library-conventions.gradle 2022-02-24 18:42:24 UTC (rev 12609)
@@ -0,0 +1,10 @@
+/* Precompiled script plugin for FOray library projects. */
+
+plugins {
+ id 'foray.common-conventions'
+ id 'java-library'
+ id 'checkstyle'
+ id 'maven-publish'
+}
+
+/* Last line of script. */
Property changes on: trunk/foray/buildSrc/src/main/groovy/foray.library-conventions.gradle
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev
\ No newline at end of property
Modified: trunk/foray/foray-app/build.gradle
===================================================================
--- trunk/foray/foray-app/build.gradle 2022-02-24 18:17:13 UTC (rev 12608)
+++ trunk/foray/foray-app/build.gradle 2022-02-24 18:42:24 UTC (rev 12609)
@@ -1,3 +1,7 @@
+plugins {
+ id 'foray.app-conventions'
+}
+
description = 'foray-app'
dependencies {
Modified: trunk/foray/foray-areatree/build.gradle
===================================================================
--- trunk/foray/foray-areatree/build.gradle 2022-02-24 18:17:13 UTC (rev 12608)
+++ trunk/foray/foray-areatree/build.gradle 2022-02-24 18:42:24 UTC (rev 12609)
@@ -1,3 +1,7 @@
+plugins {
+ id 'foray.library-conventions'
+}
+
description = 'foray-areatree'
dependencies {
Modified: trunk/foray/foray-common/build.gradle
===================================================================
--- trunk/foray/foray-common/build.gradle 2022-02-24 18:17:13 UTC (rev 12608)
+++ trunk/foray/foray-common/build.gradle 2022-02-24 18:42:24 UTC (rev 12609)
@@ -1,3 +1,7 @@
+plugins {
+ id 'foray.library-conventions'
+}
+
description = 'foray-common'
dependencies {
Modified: trunk/foray/foray-content/build.gradle
===================================================================
--- trunk/foray/foray-content/build.gradle 2022-02-24 18:17:13 UTC (rev 12608)
+++ trunk/foray/foray-content/build.gradle 2022-02-24 18:42:24 UTC (rev 12609)
@@ -1,3 +1,7 @@
+plugins {
+ id 'foray.library-conventions'
+}
+
description = 'foray-content'
dependencies {
Modified: trunk/foray/foray-core/build.gradle
===================================================================
--- trunk/foray/foray-core/build.gradle 2022-02-24 18:17:13 UTC (rev 12608)
+++ trunk/foray/foray-core/build.gradle 2022-02-24 18:42:24 UTC (rev 12609)
@@ -1,3 +1,7 @@
+plugins {
+ id 'foray.library-conventions'
+}
+
description = 'foray-core'
dependencies {
Modified: trunk/foray/foray-font/build.gradle
===================================================================
--- trunk/foray/foray-font/build.gradle 2022-02-24 18:17:13 UTC (rev 12608)
+++ trunk/foray/foray-font/build.gradle 2022-02-24 18:42:24 UTC (rev 12609)
@@ -1,3 +1,7 @@
+plugins {
+ id 'foray.library-conventions'
+}
+
description = 'foray-font'
/* Allow creation of test fixtures. */
Modified: trunk/foray/foray-fotree/build.gradle
===================================================================
--- trunk/foray/foray-fotree/build.gradle 2022-02-24 18:17:13 UTC (rev 12608)
+++ trunk/foray/foray-fotree/build.gradle 2022-02-24 18:42:24 UTC (rev 12609)
@@ -1,3 +1,7 @@
+plugins {
+ id 'foray.library-conventions'
+}
+
description = 'foray-fotree'
dependencies {
Modified: trunk/foray/foray-graphic/build.gradle
===================================================================
--- trunk/foray/foray-graphic/build.gradle 2022-02-24 18:17:13 UTC (rev 12608)
+++ trunk/foray/foray-graphic/build.gradle 2022-02-24 18:42:24 UTC (rev 12609)
@@ -1,3 +1,7 @@
+plugins {
+ id 'foray.library-conventions'
+}
+
description = 'foray-graphic'
dependencies {
Modified: trunk/foray/foray-layout/build.gradle
===================================================================
--- trunk/foray/foray-layout/build.gradle 2022-02-24 18:17:13 UTC (rev 12608)
+++ trunk/foray/foray-layout/build.gradle 2022-02-24 18:42:24 UTC (rev 12609)
@@ -1,3 +1,7 @@
+plugins {
+ id 'foray.library-conventions'
+}
+
description = 'foray-layout'
dependencies {
Modified: trunk/foray/foray-linebreak/build.gradle
===================================================================
--- trunk/foray/foray-linebreak/build.gradle 2022-02-24 18:17:13 UTC (rev 12608)
+++ trunk/foray/foray-linebreak/build.gradle 2022-02-24 18:42:24 UTC (rev 12609)
@@ -1,3 +1,7 @@
+plugins {
+ id 'foray.library-conventions'
+}
+
description = 'foray-linebreak'
dependencies {
Modified: trunk/foray/foray-mif/build.gradle
===================================================================
--- trunk/foray/foray-mif/build.gradle 2022-02-24 18:17:13 UTC (rev 12608)
+++ trunk/foray/foray-mif/build.gradle 2022-02-24 18:42:24 UTC (rev 12609)
@@ -1,3 +1,7 @@
+plugins {
+ id 'foray.library-conventions'
+}
+
description = 'foray-mif'
dependencies {
Modified: trunk/foray/foray-orthography/build.gradle
===================================================================
--- trunk/foray/foray-orthography/build.gradle 2022-02-24 18:17:13 UTC (rev 12608)
+++ trunk/foray/foray-orthography/build.gradle 2022-02-24 18:42:24 UTC (rev 12609)
@@ -1,3 +1,7 @@
+plugins {
+ id 'foray.library-conventions'
+}
+
description = 'foray-orthography'
dependencies {
Modified: trunk/foray/foray-output/build.gradle
===================================================================
--- trunk/foray/foray-output/build.gradle 2022-02-24 18:17:13 UTC (rev 12608)
+++ trunk/foray/foray-output/build.gradle 2022-02-24 18:42:24 UTC (rev 12609)
@@ -1,3 +1,7 @@
+plugins {
+ id 'foray.library-conventions'
+}
+
description = 'foray-output'
dependencies {
Modified: trunk/foray/foray-pdf/build.gradle
===================================================================
--- trunk/foray/foray-pdf/build.gradle 2022-02-24 18:17:13 UTC (rev 12608)
+++ trunk/foray/foray-pdf/build.gradle 2022-02-24 18:42:24 UTC (rev 12609)
@@ -1,3 +1,7 @@
+plugins {
+ id 'foray.library-conventions'
+}
+
description = 'foray-pdf'
dependencies {
Modified: trunk/foray/foray-pioneer/build.gradle
===================================================================
--- trunk/foray/foray-pioneer/build.gradle 2022-02-24 18:17:13 UTC (rev 12608)
+++ trunk/foray/foray-pioneer/build.gradle 2022-02-24 18:42:24 UTC (rev 12609)
@@ -1,3 +1,7 @@
+plugins {
+ id 'foray.library-conventions'
+}
+
description = 'foray-pioneer'
dependencies {
Modified: trunk/foray/foray-ps/build.gradle
===================================================================
--- trunk/foray/foray-ps/build.gradle 2022-02-24 18:17:13 UTC (rev 12608)
+++ trunk/foray/foray-ps/build.gradle 2022-02-24 18:42:24 UTC (rev 12609)
@@ -1,3 +1,7 @@
+plugins {
+ id 'foray.library-conventions'
+}
+
description = 'foray-ps'
dependencies {
Modified: trunk/foray/foray-render/build.gradle
===================================================================
--- trunk/foray/foray-render/build.gradle 2022-02-24 18:17:13 UTC (rev 12608)
+++ trunk/foray/foray-render/build.gradle 2022-02-24 18:42:24 UTC (rev 12609)
@@ -1,3 +1,7 @@
+plugins {
+ id 'foray.library-conventions'
+}
+
description = 'foray-render'
dependencies {
Modified: trunk/foray/foray-speech/build.gradle
===================================================================
--- trunk/foray/foray-speech/build.gradle 2022-02-24 18:17:13 UTC (rev 12608)
+++ trunk/foray/foray-speech/build.gradle 2022-02-24 18:42:24 UTC (rev 12609)
@@ -1,3 +1,7 @@
+plugins {
+ id 'foray.library-conventions'
+}
+
description = 'foray-speech'
dependencies {
Modified: trunk/foray/foray-unicode/build.gradle
===================================================================
--- trunk/foray/foray-unicode/build.gradle 2022-02-24 18:17:13 UTC (rev 12608)
+++ trunk/foray/foray-unicode/build.gradle 2022-02-24 18:42:24 UTC (rev 12609)
@@ -1,3 +1,7 @@
+plugins {
+ id 'foray.library-conventions'
+}
+
description = 'foray-unicode'
dependencies {
Modified: trunk/foray/foray-xml/build.gradle
===================================================================
--- trunk/foray/foray-xml/build.gradle 2022-02-24 18:17:13 UTC (rev 12608)
+++ trunk/foray/foray-xml/build.gradle 2022-02-24 18:42:24 UTC (rev 12609)
@@ -1,3 +1,7 @@
+plugins {
+ id 'foray.library-conventions'
+}
+
description = 'foray-xml'
dependencies {
Modified: trunk/foray/foray-zz-attic/build.gradle
===================================================================
--- trunk/foray/foray-zz-attic/build.gradle 2022-02-24 18:17:13 UTC (rev 12608)
+++ trunk/foray/foray-zz-attic/build.gradle 2022-02-24 18:42:24 UTC (rev 12609)
@@ -1,3 +1,7 @@
+plugins {
+ id 'foray.library-conventions'
+}
+
description = 'foray-zz-attic'
dependencies {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-02-24 18:17:15
|
Revision: 12608
http://sourceforge.net/p/foray/code/12608
Author: victormote
Date: 2022-02-24 18:17:13 +0000 (Thu, 24 Feb 2022)
Log Message:
-----------
Add buildSrc and related build.gradle.
Added Paths:
-----------
trunk/foray/buildSrc/
trunk/foray/buildSrc/build.gradle
Added: trunk/foray/buildSrc/build.gradle
===================================================================
--- trunk/foray/buildSrc/build.gradle (rev 0)
+++ trunk/foray/buildSrc/build.gradle 2022-02-24 18:17:13 UTC (rev 12608)
@@ -0,0 +1,9 @@
+/* FOray buildSrc build. */
+
+plugins {
+/* From https://docs.gradle.org/current/samples/sample_convention_plugins.html:
+ * In order for precompiled script plugins to be discovered, the buildSrc project needs to apply the
+ * groovy-gradle-plugin plugin in its build.gradle file. */
+ id 'groovy-gradle-plugin'
+}
+
Property changes on: trunk/foray/buildSrc/build.gradle
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev
\ No newline at end of property
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-02-21 21:36:27
|
Revision: 12607
http://sourceforge.net/p/foray/code/12607
Author: victormote
Date: 2022-02-21 21:36:25 +0000 (Mon, 21 Feb 2022)
Log Message:
-----------
Conform to aXSL change: Remove BlockDiscrete interface.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/main/java/org/foray/area/AbstractListItemContent.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/BlockContainerRa.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/InlineContainerArea.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalBlockArea4a.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalFlowRa4a.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/RegionOuterRa4a.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/TableCellRa.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/link/LinkFactory.java
trunk/foray/foray-content/src/main/java/org/foray/content/ContentTree4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoContainerComplex.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Block4a.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/BlockDiscretePnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/PioneerLayoutStrategy.java
Removed Paths:
-------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BlockDiscrete4a.java
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/AbstractListItemContent.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/AbstractListItemContent.java 2022-02-18 22:43:38 UTC (rev 12606)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/AbstractListItemContent.java 2022-02-21 21:36:25 UTC (rev 12607)
@@ -32,7 +32,6 @@
import org.axsl.area.factory.BlockLevelAreaFactory;
import org.axsl.fotree.fo.Block;
import org.axsl.fotree.fo.BlockContainer;
-import org.axsl.fotree.fo.BlockDiscrete;
import org.axsl.fotree.fo.ListBlock;
import org.axsl.fotree.fo.Marker;
import org.axsl.fotree.fo.RetrieveMarker;
@@ -110,13 +109,6 @@
}
@Override
- public NormalBlockArea4a makeNormalBlockArea(final BlockDiscrete blockDiscrete) {
- final NormalBlockArea4a nbArea = NormalBlockArea4a.makeNormalBlockArea(blockDiscrete, this);
- this.children.add(nbArea);
- return nbArea;
- }
-
- @Override
public BlockContainerRa makeBlockContainerArea(final BlockContainer blockContainer) {
final BlockContainerRa newBcArea = BlockContainerRa.makeBlockContainerArea(blockContainer, this);
this.children.add(newBcArea);
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/BlockContainerRa.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/BlockContainerRa.java 2022-02-18 22:43:38 UTC (rev 12606)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/BlockContainerRa.java 2022-02-21 21:36:25 UTC (rev 12607)
@@ -34,7 +34,6 @@
import org.axsl.fotree.FoContext;
import org.axsl.fotree.fo.Block;
import org.axsl.fotree.fo.BlockContainer;
-import org.axsl.fotree.fo.BlockDiscrete;
import org.axsl.fotree.fo.ListBlock;
import org.axsl.fotree.fo.Marker;
import org.axsl.fotree.fo.RetrieveMarker;
@@ -228,13 +227,6 @@
}
@Override
- public NormalBlockArea4a makeNormalBlockArea(final BlockDiscrete blockDiscrete) {
- final NormalBlockArea4a nbArea = NormalBlockArea4a.makeNormalBlockArea(blockDiscrete, this);
- this.children.add(nbArea);
- return nbArea;
- }
-
- @Override
public BlockContainerRa makeBlockContainerArea(final BlockContainer blockContainer) {
final BlockContainerRa newBcArea = BlockContainerRa.makeBlockContainerArea(blockContainer, this);
this.children.add(newBcArea);
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/InlineContainerArea.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/InlineContainerArea.java 2022-02-18 22:43:38 UTC (rev 12606)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/InlineContainerArea.java 2022-02-21 21:36:25 UTC (rev 12607)
@@ -33,7 +33,6 @@
import org.axsl.area.AreaTreeException;
import org.axsl.fotree.fo.Block;
import org.axsl.fotree.fo.BlockContainer;
-import org.axsl.fotree.fo.BlockDiscrete;
import org.axsl.fotree.fo.Inline;
import org.axsl.fotree.fo.InlineContainer;
import org.axsl.fotree.fo.ListBlock;
@@ -248,13 +247,6 @@
}
@Override
- public NormalBlockArea4a makeNormalBlockArea(final BlockDiscrete blockDiscrete) {
- final NormalBlockArea4a nbArea = NormalBlockArea4a.makeNormalBlockArea(blockDiscrete, this);
- this.children.add(nbArea);
- return nbArea;
- }
-
- @Override
public BlockContainerRa makeBlockContainerArea(final BlockContainer blockContainer) {
final BlockContainerRa newBcArea
= BlockContainerRa.makeBlockContainerArea(blockContainer, this);
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalBlockArea4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalBlockArea4a.java 2022-02-18 22:43:38 UTC (rev 12606)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalBlockArea4a.java 2022-02-21 21:36:25 UTC (rev 12607)
@@ -37,7 +37,6 @@
import org.axsl.fotree.Fo;
import org.axsl.fotree.fo.Block;
import org.axsl.fotree.fo.BlockContainer;
-import org.axsl.fotree.fo.BlockDiscrete;
import org.axsl.fotree.fo.ListBlock;
import org.axsl.fotree.fo.Marker;
import org.axsl.fotree.fo.RetrieveMarker;
@@ -99,23 +98,6 @@
return newBlockArea;
}
- /**
- * Factory method that creates a new {@link NormalBlockArea4a}.
- * @param generatedBy The FO node generating this area.
- * @param parentArea The parent area.
- * @return The new instance.
- */
- static NormalBlockArea4a makeNormalBlockArea(final BlockDiscrete generatedBy, final AreaNode4a parentArea) {
- final NormalBlockArea4a newBlockArea = new NormalBlockArea4a(parentArea);
- final Link<NormalBlockAreaGenerator> linkage = newBlockArea.getLink((NormalBlockAreaGenerator) generatedBy);
- newBlockArea.foLink = linkage;
- newBlockArea.registerLink(generatedBy);
- final int initialPD = newBlockArea.computeInitialPD();
- newBlockArea.setProgressionDimension(initialPD);
- newBlockArea.initializeAnteriorSpace();
- return newBlockArea;
- }
-
@Override
public LineArea4a makeLineArea(final boolean allowOverflow) throws AreaTreeException {
/* The size of the next line does not need to consider the half-leading that follows the line.
@@ -156,7 +138,7 @@
if (fo instanceof Block) {
nbArea = bcFactory.makeNormalBlockArea((Block) fo);
} else {
- nbArea = bcFactory.makeNormalBlockArea((BlockDiscrete) fo);
+ throw new IllegalStateException();
}
return (NormalBlockArea4a) nbArea;
}
@@ -292,14 +274,6 @@
}
@Override
- public NormalBlockArea4a makeNormalBlockArea(final BlockDiscrete blockDiscrete) {
- final Block containingBlock = blockDiscrete.getParent();
- final NormalBlockArea4a nbArea = NormalBlockArea4a.makeNormalBlockArea(containingBlock, this);
- this.children.add(nbArea);
- return nbArea;
- }
-
- @Override
public BlockContainerRa makeBlockContainerArea(final BlockContainer blockContainer) {
final BlockContainerRa newBcArea
= BlockContainerRa.makeBlockContainerArea(blockContainer, this);
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalFlowRa4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalFlowRa4a.java 2022-02-18 22:43:38 UTC (rev 12606)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalFlowRa4a.java 2022-02-21 21:36:25 UTC (rev 12607)
@@ -35,7 +35,6 @@
import org.axsl.fotree.Fo;
import org.axsl.fotree.fo.Block;
import org.axsl.fotree.fo.BlockContainer;
-import org.axsl.fotree.fo.BlockDiscrete;
import org.axsl.fotree.fo.ListBlock;
import org.axsl.fotree.fo.Marker;
import org.axsl.fotree.fo.RegionBody;
@@ -219,13 +218,6 @@
}
@Override
- public NormalBlockArea4a makeNormalBlockArea(final BlockDiscrete blockDiscrete) {
- final NormalBlockArea4a nbArea = NormalBlockArea4a.makeNormalBlockArea(blockDiscrete, this);
- this.children.add(nbArea);
- return nbArea;
- }
-
- @Override
public BlockContainerRa makeBlockContainerArea(final BlockContainer blockContainer) {
final BlockContainerRa newBcArea
= BlockContainerRa.makeBlockContainerArea(blockContainer, this);
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/RegionOuterRa4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/RegionOuterRa4a.java 2022-02-18 22:43:38 UTC (rev 12606)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/RegionOuterRa4a.java 2022-02-21 21:36:25 UTC (rev 12607)
@@ -35,7 +35,6 @@
import org.axsl.area.RegionOuterRa;
import org.axsl.fotree.fo.Block;
import org.axsl.fotree.fo.BlockContainer;
-import org.axsl.fotree.fo.BlockDiscrete;
import org.axsl.fotree.fo.ListBlock;
import org.axsl.fotree.fo.Marker;
import org.axsl.fotree.fo.Region;
@@ -204,13 +203,6 @@
}
@Override
- public NormalBlockArea4a makeNormalBlockArea(final BlockDiscrete blockDiscrete) {
- final NormalBlockArea4a nbArea = NormalBlockArea4a.makeNormalBlockArea(blockDiscrete, this);
- this.children.add(nbArea);
- return nbArea;
- }
-
- @Override
public BlockContainerRa makeBlockContainerArea(final BlockContainer blockContainer) {
final BlockContainerRa newBcArea = BlockContainerRa.makeBlockContainerArea(blockContainer, this);
this.children.add(newBcArea);
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/TableCellRa.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/TableCellRa.java 2022-02-18 22:43:38 UTC (rev 12606)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/TableCellRa.java 2022-02-21 21:36:25 UTC (rev 12607)
@@ -33,7 +33,6 @@
import org.axsl.area.AreaTreeException;
import org.axsl.fotree.fo.Block;
import org.axsl.fotree.fo.BlockContainer;
-import org.axsl.fotree.fo.BlockDiscrete;
import org.axsl.fotree.fo.GraftingPoint;
import org.axsl.fotree.fo.ListBlock;
import org.axsl.fotree.fo.Marker;
@@ -408,13 +407,6 @@
}
@Override
- public NormalBlockArea4a makeNormalBlockArea(final BlockDiscrete blockDiscrete) {
- final NormalBlockArea4a nbArea = NormalBlockArea4a.makeNormalBlockArea(blockDiscrete, this);
- this.children.add(nbArea);
- return nbArea;
- }
-
- @Override
public BlockContainerRa makeBlockContainerArea(final BlockContainer blockContainer) {
final BlockContainerRa newBcArea
= BlockContainerRa.makeBlockContainerArea(blockContainer, this);
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/link/LinkFactory.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/link/LinkFactory.java 2022-02-18 22:43:38 UTC (rev 12606)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/link/LinkFactory.java 2022-02-21 21:36:25 UTC (rev 12607)
@@ -33,7 +33,6 @@
import org.axsl.fotree.fo.BidiOverride;
import org.axsl.fotree.fo.Block;
import org.axsl.fotree.fo.BlockContainer;
-import org.axsl.fotree.fo.BlockDiscrete;
import org.axsl.fotree.fo.Bookmark;
import org.axsl.fotree.fo.BookmarkTitle;
import org.axsl.fotree.fo.BookmarkTree;
@@ -118,11 +117,6 @@
}
@Override
- public NormalLink<BlockDiscrete> visit(final BlockDiscrete host) {
- return new NormalLink<BlockDiscrete>(host);
- }
-
- @Override
public NormalLink<Bookmark> visit(final Bookmark host) {
return new NormalLink<Bookmark>(host);
}
Modified: trunk/foray/foray-content/src/main/java/org/foray/content/ContentTree4a.java
===================================================================
--- trunk/foray/foray-content/src/main/java/org/foray/content/ContentTree4a.java 2022-02-18 22:43:38 UTC (rev 12606)
+++ trunk/foray/foray-content/src/main/java/org/foray/content/ContentTree4a.java 2022-02-21 21:36:25 UTC (rev 12607)
@@ -38,7 +38,6 @@
import org.axsl.fotree.Fo;
import org.axsl.fotree.fo.BasicLink;
import org.axsl.fotree.fo.Block;
-import org.axsl.fotree.fo.BlockDiscrete;
import org.axsl.fotree.fo.ExternalGraphic;
import org.axsl.fotree.fo.FoTextWords;
import org.axsl.fotree.fo.Footnote;
@@ -67,7 +66,7 @@
private List<Content4a> children = new ArrayList<Content4a>();
/**
- * Constructor that creates a content tree from the content of a {@link BlockDiscrete}.
+ * Constructor.
* @param nba The block whose content should be wrapped in a content tree.
*/
public ContentTree4a(final NormalBlockArea nba) {
@@ -94,10 +93,6 @@
* @param context The area-tree context for {@code fo} and descendants.
*/
private void processChild(final Fo fo, final Area context) {
- if (fo instanceof BlockDiscrete) {
- processChildren(fo, context);
- return;
- }
if (fo instanceof FoTextWords) {
final FoTextWords foTextWords = (FoTextWords) fo;
final TextTokensContent4a tokensContent = new TextTokensContent4a(foTextWords, null);
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoContainerComplex.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoContainerComplex.java 2022-02-18 22:43:38 UTC (rev 12606)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoContainerComplex.java 2022-02-21 21:36:25 UTC (rev 12607)
@@ -28,8 +28,6 @@
package org.foray.fotree;
-import org.foray.fotree.fo.obj.BlockDiscrete4a;
-
import org.axsl.fotree.FoTreeException;
import java.util.ArrayList;
@@ -54,9 +52,7 @@
*/
public abstract class FoContainerComplex extends FoObj {
- /**
- * The children of this object. Each child of a "complex container" should be either 1) A {@link BlockDiscrete4a}
- * instance, i.e. a container for text and inline objects, or 2) A block-level object. */
+ /** The children of this object. */
private List<FoObj> children = new ArrayList<FoObj>();
/**
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Block4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Block4a.java 2022-02-18 22:43:38 UTC (rev 12606)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Block4a.java 2022-02-21 21:36:25 UTC (rev 12607)
@@ -173,81 +173,6 @@
}
@Override
- public void addChild(final FoObj fobj) throws FoTreeException {
- /* TODO: The following code block should be removed when the BlockDiscrete logic is working properly. */
- if ("block".equals(getName())) {
- super.addChild(fobj);
- return;
- }
- if (fobj.isAlwaysBlockContent()) {
- getChildren().add(fobj);
- return;
- }
- if (fobj instanceof FoText4a) {
- final FoText4a text = (FoText4a) fobj;
- /* If we are still in a place where an fo:marker can be added (i.e. at the beginning of the block), and
- * this text is all whitespace, it is not really part of the BlockDiscrete content.
- * Place it directly into the block content so that fo:marker objects can be added if needed. */
- if (text.isAllWhiteSpace()
- && canAddMarkers()) {
- getChildren().add(fobj);
- } else {
- addBlockDiscreteContent(fobj);
- }
- return;
- }
- if (fobj.isAlwaysInlineContent()) {
- addBlockDiscreteContent(fobj);
- return;
- }
- if (fobj instanceof Marker4a) {
- if (canAddMarkers()) {
- getChildren().add(fobj);
- } else {
- throwExceptionContentModelViolation();
- }
- return;
- }
- if (fobj instanceof Footnote4a) {
- addBlockDiscreteContent(fobj);
- return;
- }
- if (fobj.isNeutralContainer()
- || fobj.isOutOfLineAnyContent()
- || fobj.isOutOfLineInlineContent()) {
- /* If it is capable of containing block-level elements, but does not, it can be a child. */
- if (! fobj.hasDescendantBlocks()) {
- addBlockDiscreteContent(fobj);
- } else {
- getChildren().add(fobj);
- }
- return;
- }
- throwException("Unable to handle this kind of mixed content.");
- }
-
- /**
- * Adds the object to a child instance of {@link BlockDiscrete4a} instead of directly as a child of this block,
- * first creating the {@link BlockDiscrete4a} if needed.
- * @param fobj The object to be added.
- * @throws FoTreeException For errors adding the child.
- */
- private void addBlockDiscreteContent(final FoObj fobj) throws FoTreeException {
- final FoObj lastChild = this.getLastChild();
- BlockDiscrete4a discrete = null;
- if (lastChild == null) {
- discrete = new BlockDiscrete4a(this);
- getChildren().add(discrete);
- } else if (lastChild instanceof BlockDiscrete4a) {
- discrete = (BlockDiscrete4a) lastChild;
- } else {
- discrete = new BlockDiscrete4a(this);
- getChildren().add(discrete);
- }
- discrete.addChild(fobj);
- }
-
- @Override
public KpUserAgent getParaContext() {
return this;
}
Deleted: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BlockDiscrete4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BlockDiscrete4a.java 2022-02-18 22:43:38 UTC (rev 12606)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BlockDiscrete4a.java 2022-02-21 21:36:25 UTC (rev 12607)
@@ -1,292 +0,0 @@
-/*
- * Copyright 2021 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.fotree.fo.obj;
-
-import org.foray.common.kp.KpLeafIterator4a;
-import org.foray.fotree.FoContainerComplex;
-import org.foray.fotree.FoContainerInline;
-import org.foray.fotree.FoObj;
-import org.foray.fotree.Namespace;
-import org.foray.fotree.PropertyList;
-
-import org.axsl.font.FontUse;
-import org.axsl.fotree.FoContext;
-import org.axsl.fotree.FoTreeException;
-import org.axsl.fotree.FoVisitor;
-import org.axsl.fotree.fo.BlockDiscrete;
-import org.axsl.kp.KpBranch;
-import org.axsl.kp.KpContext;
-import org.axsl.kp.KpLeaf;
-import org.axsl.kp.KpLeafIterator;
-import org.axsl.kp.KpNode;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * A container for only text and inline items.
- * This is a pass-thru pseudo-element that is always a child of a {@link FoContainerComplex} and that has no inline
- * (%block;) descendants.
- * (It can have out-of-line descendants, such as those that are children of fo:footnote or fo:float).
- * In other words, it is content that can be laid out as a discrete paragraph, uninterrupted by other blocks.
- */
-public class BlockDiscrete4a extends FoContainerInline implements BlockDiscrete {
-
- /** The parent of this node. */
- private Block4a parent;
-
- /** The children of this object. */
- private List<FoObj> children = new ArrayList<FoObj>();
-
- /**
- * Constructor.
- * @param parent The parent FoObj.
- */
- public BlockDiscrete4a(final Block4a parent) {
- super(parent);
- this.parent = parent;
- }
-
- @Override
- public <T> T acceptVisitor(final FoVisitor<T> visitor) {
- return visitor.visit(this);
- }
-
- @Override
- public boolean isValid() {
- return true;
- }
-
- @Override
- public FontUse getPrimaryFont(final FoContext context) {
- return this.parent.getPrimaryFont(context);
- }
-
- @Override
- public Block4a getParent() {
- return this.parent;
- }
-
- @Override
- public List<? extends FoObj> getChildren() {
- return this.children;
- }
-
- @Override
- protected void validateAncestry() throws FoTreeException {
- }
-
- @Override
- protected void validateProperties() throws FoTreeException {
- }
-
- @Override
- protected void setup() throws FoTreeException {
- }
-
- @Override
- protected void validateDescendants() throws FoTreeException {
- }
-
- @Override
- protected void end() throws FoTreeException {
- }
-
- @Override
- public void addChild(final FoObj fobj) throws FoTreeException {
- if (fobj.canBeInlineContent()
- || fobj.isPcdataContent()) {
- if (! fobj.hasDescendantBlocks()) {
- this.children.add(fobj);
- return;
- }
- }
- if (fobj instanceof Footnote4a
- || fobj instanceof Float4a) {
- this.children.add(fobj);
- return;
- }
- throw new IllegalStateException("Cannot add item to " + this.getClass().getName() + ", "
- + fobj.getContextMessage());
- }
-
- @Override
- public Namespace getNamespace() {
- return this.parent.getNamespace();
- }
-
- @Override
- public boolean isAlwaysBlockContent() {
- return true;
- }
-
- @Override
- public boolean isPcdataContent() {
- return false;
- }
-
- @Override
- public String getName() {
- return "block-discrete-(pseudo)";
- }
-
- @Override
- public PropertyList getPropertyList() {
- return this.parent.getPropertyList();
- }
-
- @Override
- public boolean isInFlow() {
- return true;
- }
-
- @Override
- public boolean canHaveMarkerChildren() {
- return false;
- }
-
- @Override
- public boolean canHavePcdataChildren() {
- return false;
- }
-
- @Override
- public boolean canHaveInlineChildren() {
- return false;
- }
-
- @Override
- public boolean canHaveBlockChildren() {
- return false;
- }
-
- @Override
- public boolean isPseudoObject() {
- return true;
- }
-
- @Override
- public int qtyKpNodes() {
- int count = 0;
- for (int index = 0; index < this.children.size(); index ++) {
- final FoObj child = this.children.get(index);
- if (child instanceof KpNode) {
- count ++;
- }
- }
- return count;
- }
-
- @Override
- public KpNode kpNodeAt(final int nodeIndex) {
- int count = 0;
- for (int index = 0; index < this.children.size(); index ++) {
- final FoObj child = this.children.get(index);
- if (child instanceof KpNode) {
- if (nodeIndex == count) {
- return (KpNode) child;
- }
- count ++;
- }
- }
- throw new IndexOutOfBoundsException();
- }
-
- @Override
- public int qtyKpLeaves() {
- int count = 0;
- for (int nodeIndex = 0; nodeIndex < qtyKpNodes(); nodeIndex ++) {
- final KpNode node = kpNodeAt(nodeIndex);
- final KpBranch branch = KpNode.Type.asBranch(node);
- if (branch == null) {
- count ++;
- } else {
- count += branch.qtyKpLeaves();
- }
- }
- return count;
- }
-
- @Override
- public KpLeaf kpLeafAt(final int leafIndex) {
- if (leafIndex < 0) {
- throw new IndexOutOfBoundsException();
- }
- int totalLength = 0;
- for (int nodeIndex = 0; nodeIndex < qtyKpNodes(); nodeIndex ++) {
- final KpNode node = kpNodeAt(nodeIndex);
- final KpBranch branch = KpNode.Type.asBranch(node);
- if (branch == null) {
- /* Node is a leaf. */
- if (leafIndex == totalLength) {
- return (KpLeaf) node;
- } else {
- totalLength ++;
- }
- } else {
- /* Node is a branch. */
- final int currentLength = branch.qtyKpLeaves();
- totalLength += currentLength;
- if (totalLength > leafIndex) {
- final int currentIndex = leafIndex - (totalLength - currentLength);
- return branch.kpLeafAt(currentIndex);
- }
- }
- }
- throw new IndexOutOfBoundsException();
- }
-
- @Override
- public KpLeafIterator leafIterator() {
- return new KpLeafIterator4a(this);
- }
-
- @Override
- public Type getKpNodeType() {
- return KpNode.Type.BRANCH;
- }
-
- @Override
- public int qtyKpLeavesStrict() {
- /* TODO: Support this. */
- throw new UnsupportedOperationException();
- }
-
- @Override
- public CharSequence getText() {
- /* TODO: Support this. */
- throw new UnsupportedOperationException();
- }
-
- @Override
- public KpContext getKpContext() {
- return null;
- }
-
-}
Modified: trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/BlockDiscretePnr.java
===================================================================
--- trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/BlockDiscretePnr.java 2022-02-18 22:43:38 UTC (rev 12606)
+++ trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/BlockDiscretePnr.java 2022-02-21 21:36:25 UTC (rev 12607)
@@ -28,50 +28,50 @@
package org.foray.pioneer;
-import org.foray.common.kp.KpLeafIterator4a;
-import org.foray.content.Content4a;
-import org.foray.content.ContentTree4a;
-
import org.axsl.area.AreaNode;
import org.axsl.area.AreaTreeException;
-import org.axsl.area.LineArea;
-import org.axsl.area.NormalBlockArea;
import org.axsl.area.factory.BlockLevelAreaFactory;
-import org.axsl.fotree.fo.BlockDiscrete;
-import org.axsl.kp.KpResult;
-import org.axsl.kp.KpUserAgent;
-import org.axsl.linebreak.LineBreaker;
+import org.axsl.fotree.Fo;
/**
- * Pioneer Layout for {@link BlockDiscrete}.
+ * Pioneer Layout for BlockDiscrete.
*/
public class BlockDiscretePnr extends FoObjPnr {
+ /* TODO: Remove this class after the logic has been moved to a more appropriate place. */
- /** The real FONode which this proxy represents. */
- private BlockDiscrete blockDiscrete;
+// /** The real FONode which this proxy represents. */
+// private BlockDiscrete blockDiscrete;
+//
+// /** The content tree for this block. */
+// private ContentTree4a contentTree;
+//
+// /** The results of line-breaking for {@link #node}. */
+// private KpResult result;
+//
+// /** Index to the next line in {@link #result} to be placed on a line. */
+// private int nextResultLine = 0;
- /** The content tree for this block. */
- private ContentTree4a contentTree;
-
- /** The results of line-breaking for {@link #node}. */
- private KpResult result;
-
- /** Index to the next line in {@link #result} to be placed on a line. */
- private int nextResultLine = 0;
-
/**
* Constructor.
* @param realFObj The FO Tree object which is being laid out.
* @param layout The ancestor layout system.
*/
- public BlockDiscretePnr(final BlockDiscrete realFObj, final PioneerLayoutStrategy layout) {
+ public BlockDiscretePnr(final Fo realFObj, final PioneerLayoutStrategy layout) {
super(realFObj, layout);
- this.blockDiscrete = realFObj;
}
+// public BlockDiscretePnr(final BlockDiscrete realFObj, final PioneerLayoutStrategy layout) {
+// super(realFObj, layout);
+// this.blockDiscrete = realFObj;
+// }
+//
+// @Override
+// public BlockDiscrete getFONode() {
+// return this.blockDiscrete;
+// }
@Override
- public BlockDiscrete getFONode() {
- return this.blockDiscrete;
+ public Fo getFONode() {
+ return null;
}
@Override
@@ -81,41 +81,41 @@
areaNode = areaNode.ancestorBlockLevelAreaFactory();
}
- final BlockLevelAreaFactory bcArea = (BlockLevelAreaFactory) areaNode;
- final NormalBlockArea normalBlockArea = bcArea.makeNormalBlockArea(this.blockDiscrete);
+// final BlockLevelAreaFactory bcArea = (BlockLevelAreaFactory) areaNode;
+// final NormalBlockArea normalBlockArea = bcArea.makeNormalBlockArea(this.blockDiscrete);
+//
+// if (this.result == null) {
+// final LineBreaker lb = getLayout().getLineBreaker();
+// final KpUserAgent paraContext = this.blockDiscrete.ancestorBlock(normalBlockArea).getParaContext();
+// this.contentTree = new ContentTree4a(normalBlockArea);
+// this.result = lb.breakIntoLines(contentTree, paraContext, normalBlockArea);
+// }
- if (this.result == null) {
- final LineBreaker lb = getLayout().getLineBreaker();
- final KpUserAgent paraContext = this.blockDiscrete.ancestorBlock(normalBlockArea).getParaContext();
- this.contentTree = new ContentTree4a(normalBlockArea);
- this.result = lb.breakIntoLines(contentTree, paraContext, normalBlockArea);
- }
-
/* Run a leaf iterator alongside the iteration of the line-break results, so that we can conveniently retrieve
* the branch indexes. */
- final KpLeafIterator4a iterator = new KpLeafIterator4a(contentTree);
- for (int lineIndex = this.nextResultLine; lineIndex < result.getQtyLines(); lineIndex ++) {
- final LineArea lineArea = normalBlockArea.makeLineArea(false);
- if (lineArea == null) {
- /* Unable to create another line on the current page. */
- this.nextResultLine = lineIndex;
- if (lineIndex == 0) {
- return Status.AREA_FULL_NONE;
- } else {
- return Status.AREA_FULL_SOME;
- }
- }
+// final KpLeafIterator4a iterator = new KpLeafIterator4a(contentTree);
+// for (int lineIndex = this.nextResultLine; lineIndex < result.getQtyLines(); lineIndex ++) {
+// final LineArea lineArea = normalBlockArea.makeLineArea(false);
+// if (lineArea == null) {
+// /* Unable to create another line on the current page. */
+// this.nextResultLine = lineIndex;
+// if (lineIndex == 0) {
+// return Status.AREA_FULL_NONE;
+// } else {
+// return Status.AREA_FULL_SOME;
+// }
+// }
+//
+// int leafIndex = lineIndex < 1 ? 0 : result.getBreakPosition(lineIndex - 1);
+// final int endLeafIndex = result.getBreakPosition(lineIndex);
+// while (leafIndex < endLeafIndex) {
+// iterator.advanceToLeaf(leafIndex);
+// final int contentIndex = iterator.branchIndexAt(0);
+// final Content4a content = this.contentTree.contentAt(contentIndex);
+// leafIndex = content.addToLine(lineArea, iterator, endLeafIndex);
+// }
+// }
- int leafIndex = lineIndex < 1 ? 0 : result.getBreakPosition(lineIndex - 1);
- final int endLeafIndex = result.getBreakPosition(lineIndex);
- while (leafIndex < endLeafIndex) {
- iterator.advanceToLeaf(leafIndex);
- final int contentIndex = iterator.branchIndexAt(0);
- final Content4a content = this.contentTree.contentAt(contentIndex);
- leafIndex = content.addToLine(lineArea, iterator, endLeafIndex);
- }
- }
-
return Status.OK;
}
Modified: trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/PioneerLayoutStrategy.java
===================================================================
--- trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/PioneerLayoutStrategy.java 2022-02-18 22:43:38 UTC (rev 12606)
+++ trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/PioneerLayoutStrategy.java 2022-02-21 21:36:25 UTC (rev 12607)
@@ -53,7 +53,6 @@
import org.axsl.fotree.fo.BidiOverride;
import org.axsl.fotree.fo.Block;
import org.axsl.fotree.fo.BlockContainer;
-import org.axsl.fotree.fo.BlockDiscrete;
import org.axsl.fotree.fo.Bookmark;
import org.axsl.fotree.fo.BookmarkTitle;
import org.axsl.fotree.fo.BookmarkTree;
@@ -429,11 +428,6 @@
}
@Override
- public BlockDiscretePnr visit(final BlockDiscrete node) {
- return new BlockDiscretePnr(node, this);
- }
-
- @Override
public BlockContainerPnr visit(final BlockContainer node) {
return new BlockContainerPnr(node, this);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-02-18 22:43:39
|
Revision: 12606
http://sourceforge.net/p/foray/code/12606
Author: victormote
Date: 2022-02-18 22:43:38 +0000 (Fri, 18 Feb 2022)
Log Message:
-----------
Fix error message.
Modified Paths:
--------------
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/BlockPnr.java
Modified: trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/BlockPnr.java
===================================================================
--- trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/BlockPnr.java 2022-02-18 21:10:43 UTC (rev 12605)
+++ trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/BlockPnr.java 2022-02-18 22:43:38 UTC (rev 12606)
@@ -86,7 +86,7 @@
public Status layout(final AreaNode areaNode) throws AreaTreeException {
if (! (areaNode instanceof BlockLevelAreaFactory)) {
throw new AreaTreeException("Area \"" + areaNode.getAreaName()
- + "\" cannot contain a NormalBlockArea.", null, this.block);
+ + "\" is not a " + BlockLevelAreaFactory.class.getName() + ".", null, this.block);
}
final BlockLevelAreaFactory bcArea = (BlockLevelAreaFactory) areaNode;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-02-18 21:10:46
|
Revision: 12605
http://sourceforge.net/p/foray/code/12605
Author: victormote
Date: 2022-02-18 21:10:43 +0000 (Fri, 18 Feb 2022)
Log Message:
-----------
Conform to aXSL changes: Add NormalBlockAreaGenerator interface.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaNode4a.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/BlockArea.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/LineArea4a.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalBlockArea4a.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/TextArea.java
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaNode4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaNode4a.java 2022-02-18 14:49:53 UTC (rev 12604)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaNode4a.java 2022-02-18 21:10:43 UTC (rev 12605)
@@ -36,11 +36,11 @@
import org.axsl.area.AreaTreeException;
import org.axsl.area.factory.BlockLevelAreaFactory;
import org.axsl.fotree.Fo;
-import org.axsl.fotree.fo.Block;
import org.axsl.fotree.fo.GraftingPoint;
import org.axsl.fotree.fo.Table;
import org.axsl.fotree.fo.prop.ColorPa;
import org.axsl.fotree.fo.prop.CommonHyphenationPa;
+import org.axsl.fotree.role.NormalBlockAreaGenerator;
import org.axsl.galley.AreaNodeG5;
import org.axsl.galley.Galley;
import org.axsl.orthography.Orthography;
@@ -734,15 +734,15 @@
@Override
public WhiteSpaceTreatment traitWhiteSpaceTreatment() {
final NormalBlockArea4a nearestBlockArea = this.nearestNormalBlockArea();
- final Block block = nearestBlockArea.traitGeneratedBy();
- return block.traitWhiteSpaceTreatment(nearestBlockArea);
+ final NormalBlockAreaGenerator generator = nearestBlockArea.traitGeneratedBy();
+ return generator.traitWhiteSpaceTreatment(nearestBlockArea);
}
@Override
public LinefeedTreatment traitLinefeedTreatment() {
final NormalBlockArea4a nearestBlockArea = this.nearestNormalBlockArea();
- final Block block = nearestBlockArea.traitGeneratedBy();
- return block.traitLinefeedTreatment(nearestBlockArea);
+ final NormalBlockAreaGenerator generator = nearestBlockArea.traitGeneratedBy();
+ return generator.traitLinefeedTreatment(nearestBlockArea);
}
@Override
@@ -749,15 +749,15 @@
public TextTransform traitTextTransform() {
/* TODO: This isn't quite right: text-transform is applicable to more areas than normal-block-area. */
final NormalBlockArea4a nearestBlockArea = this.nearestNormalBlockArea();
- final Block block = nearestBlockArea.traitGeneratedBy();
- return block.traitTextTransform(nearestBlockArea);
+ final NormalBlockAreaGenerator generator = nearestBlockArea.traitGeneratedBy();
+ return generator.traitTextTransform(nearestBlockArea);
}
@Override
public boolean traitWhiteSpaceCollapse() {
final NormalBlockArea4a nearestBlockArea = this.nearestNormalBlockArea();
- final Block block = nearestBlockArea.traitGeneratedBy();
- return block.traitWhiteSpaceCollapse(nearestBlockArea);
+ final NormalBlockAreaGenerator generator = nearestBlockArea.traitGeneratedBy();
+ return generator.traitWhiteSpaceCollapse(nearestBlockArea);
}
@Override
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/BlockArea.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/BlockArea.java 2022-02-18 14:49:53 UTC (rev 12604)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/BlockArea.java 2022-02-18 21:10:43 UTC (rev 12605)
@@ -30,7 +30,7 @@
import org.foray.area.link.Link;
-import org.axsl.fotree.fo.Block;
+import org.axsl.fotree.role.NormalBlockAreaGenerator;
import org.axsl.value.LineStackingStrategy;
/**
@@ -70,10 +70,10 @@
}
@Override
- public abstract Link<Block> getFoLink();
+ public abstract Link<NormalBlockAreaGenerator> getFoLink();
@Override
- public Block traitGeneratedBy() {
+ public NormalBlockAreaGenerator traitGeneratedBy() {
return getFoLink().getGenerator();
}
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/LineArea4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/LineArea4a.java 2022-02-18 14:49:53 UTC (rev 12604)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/LineArea4a.java 2022-02-18 21:10:43 UTC (rev 12605)
@@ -38,7 +38,6 @@
import org.axsl.fotree.FoContext;
import org.axsl.fotree.fo.BasicLink;
import org.axsl.fotree.fo.BidiOverride;
-import org.axsl.fotree.fo.Block;
import org.axsl.fotree.fo.ExternalGraphic;
import org.axsl.fotree.fo.FoTextCharacters;
import org.axsl.fotree.fo.FoTextWords;
@@ -54,6 +53,7 @@
import org.axsl.fotree.fo.PageNumberCitationLast;
import org.axsl.fotree.fo.RetrieveMarker;
import org.axsl.fotree.fo.ScalingValueCitation;
+import org.axsl.fotree.role.NormalBlockAreaGenerator;
import org.axsl.galley.GlyphAreaSequenceG5;
import org.axsl.galley.render.GalleyVisitor;
import org.axsl.galley.render.GalleyVisitorException;
@@ -856,7 +856,7 @@
* CENTER, JUSTIFY.
*/
public TextAlign traitTextAlign() {
- final Block generatedBy = traitGeneratedBy();
+ final NormalBlockAreaGenerator generatedBy = traitGeneratedBy();
TextAlign textAlign = generatedBy.traitTextAlign(this);
if (this.textAlignLastApplies()) {
final TextAlignLast textAlignLast = generatedBy.traitTextAlignLast(
@@ -1296,12 +1296,12 @@
}
@Override
- public Link<Block> getFoLink() {
+ public Link<NormalBlockAreaGenerator> getFoLink() {
return this.parent.getFoLink();
}
@Override
- public Block traitGeneratedBy() {
+ public NormalBlockAreaGenerator traitGeneratedBy() {
return this.getFoLink().getGenerator();
}
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalBlockArea4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalBlockArea4a.java 2022-02-18 14:49:53 UTC (rev 12604)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalBlockArea4a.java 2022-02-18 21:10:43 UTC (rev 12605)
@@ -42,6 +42,7 @@
import org.axsl.fotree.fo.Marker;
import org.axsl.fotree.fo.RetrieveMarker;
import org.axsl.fotree.fo.Table;
+import org.axsl.fotree.role.NormalBlockAreaGenerator;
import org.axsl.galley.render.GalleyVisitor;
import org.axsl.galley.render.GalleyVisitorException;
import org.axsl.graphic.Graphic;
@@ -60,7 +61,7 @@
public final class NormalBlockArea4a extends BlockArea implements NormalBlockArea {
/** The link to the FO tree. */
- private Link<Block> foLink;
+ private Link<NormalBlockAreaGenerator> foLink;
/** The parent of this node. */
private AreaNode4a parent;
@@ -86,9 +87,10 @@
* @param parentArea The parent area.
* @return The new instance.
*/
- static NormalBlockArea4a makeNormalBlockArea(final Block generatedBy, final AreaNode4a parentArea) {
+ static NormalBlockArea4a makeNormalBlockArea(final NormalBlockAreaGenerator generatedBy,
+ final AreaNode4a parentArea) {
final NormalBlockArea4a newBlockArea = new NormalBlockArea4a(parentArea);
- final Link<Block> linkage = newBlockArea.getLink(generatedBy);
+ final Link<NormalBlockAreaGenerator> linkage = newBlockArea.getLink(generatedBy);
newBlockArea.foLink = linkage;
newBlockArea.registerLink(generatedBy);
final int initialPD = newBlockArea.computeInitialPD();
@@ -105,7 +107,7 @@
*/
static NormalBlockArea4a makeNormalBlockArea(final BlockDiscrete generatedBy, final AreaNode4a parentArea) {
final NormalBlockArea4a newBlockArea = new NormalBlockArea4a(parentArea);
- final Link<Block> linkage = newBlockArea.getLink((Block) generatedBy);
+ final Link<NormalBlockAreaGenerator> linkage = newBlockArea.getLink((NormalBlockAreaGenerator) generatedBy);
newBlockArea.foLink = linkage;
newBlockArea.registerLink(generatedBy);
final int initialPD = newBlockArea.computeInitialPD();
@@ -271,7 +273,7 @@
}
@Override
- public Link<Block> getFoLink() {
+ public Link<NormalBlockAreaGenerator> getFoLink() {
return this.foLink;
}
@@ -322,7 +324,7 @@
}
@Override
- public Block traitGeneratedBy() {
+ public NormalBlockAreaGenerator traitGeneratedBy() {
return getFoLink().getGenerator();
}
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/TextArea.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/TextArea.java 2022-02-18 14:49:53 UTC (rev 12604)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/TextArea.java 2022-02-18 21:10:43 UTC (rev 12605)
@@ -35,9 +35,9 @@
import org.axsl.font.FontContext;
import org.axsl.font.FontUse;
import org.axsl.fotree.Fo;
-import org.axsl.fotree.fo.Block;
import org.axsl.fotree.fo.FoText;
import org.axsl.fotree.fo.FoTextCharacters;
+import org.axsl.fotree.role.NormalBlockAreaGenerator;
import org.axsl.galley.GlyphAreaSequenceG5;
import org.axsl.galley.render.GalleyVisitor;
import org.axsl.galley.render.GalleyVisitorException;
@@ -479,8 +479,8 @@
return character.traitHyphenationCharacter(this);
} else {
final NormalBlockArea4a blockArea = this.ancestorNormalBlockArea();
- final Block block = blockArea.traitGeneratedBy();
- return block.traitHyphenationCharacter(blockArea);
+ final NormalBlockAreaGenerator generator = blockArea.traitGeneratedBy();
+ return generator.traitHyphenationCharacter(blockArea);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-02-18 14:49:56
|
Revision: 12604
http://sourceforge.net/p/foray/code/12604
Author: victormote
Date: 2022-02-18 14:49:53 +0000 (Fri, 18 Feb 2022)
Log Message:
-----------
Improvements to word-based text processing.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalBlockArea4a.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/TextAreaWords.java
trunk/foray/foray-content/src/main/java/org/foray/content/ContentTree4a.java
trunk/foray/foray-content/src/main/java/org/foray/content/TextTokensContent4a.java
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalBlockArea4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalBlockArea4a.java 2022-02-17 22:02:59 UTC (rev 12603)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalBlockArea4a.java 2022-02-18 14:49:53 UTC (rev 12604)
@@ -292,7 +292,9 @@
@Override
public NormalBlockArea4a makeNormalBlockArea(final BlockDiscrete blockDiscrete) {
final Block containingBlock = blockDiscrete.getParent();
- return NormalBlockArea4a.makeNormalBlockArea(containingBlock, this);
+ final NormalBlockArea4a nbArea = NormalBlockArea4a.makeNormalBlockArea(containingBlock, this);
+ this.children.add(nbArea);
+ return nbArea;
}
@Override
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/TextAreaWords.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/TextAreaWords.java 2022-02-17 22:02:59 UTC (rev 12603)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/TextAreaWords.java 2022-02-18 14:49:53 UTC (rev 12604)
@@ -58,6 +58,12 @@
public TextAreaWords(final LineArea4a parentArea, final Link<FoTextWords> generatedBy,
final TextTokenFlowLocation startLocation, final TextTokenFlowLocation endLocation) {
super(parentArea);
+ if (startLocation == null) {
+ throw new IllegalArgumentException("startLocation cannot be null.");
+ }
+ if (endLocation == null) {
+ throw new IllegalArgumentException("endLocation cannot be null.");
+ }
this.foLink = generatedBy;
this.startLocation = startLocation;
this.endLocation = endLocation;
Modified: trunk/foray/foray-content/src/main/java/org/foray/content/ContentTree4a.java
===================================================================
--- trunk/foray/foray-content/src/main/java/org/foray/content/ContentTree4a.java 2022-02-17 22:02:59 UTC (rev 12603)
+++ trunk/foray/foray-content/src/main/java/org/foray/content/ContentTree4a.java 2022-02-18 14:49:53 UTC (rev 12604)
@@ -36,10 +36,19 @@
import org.axsl.content.Content;
import org.axsl.content.ContentTree;
import org.axsl.fotree.Fo;
+import org.axsl.fotree.fo.BasicLink;
+import org.axsl.fotree.fo.Block;
import org.axsl.fotree.fo.BlockDiscrete;
import org.axsl.fotree.fo.ExternalGraphic;
import org.axsl.fotree.fo.FoTextWords;
+import org.axsl.fotree.fo.Footnote;
+import org.axsl.fotree.fo.Inline;
import org.axsl.fotree.fo.InstreamForeignObject;
+import org.axsl.fotree.fo.Leader;
+import org.axsl.fotree.fo.Marker;
+import org.axsl.fotree.fo.PageNumber;
+import org.axsl.fotree.fo.RetrieveMarker;
+import org.axsl.fotree.fo.Wrapper;
import org.axsl.kp.KpBranch;
import org.axsl.kp.KpContext;
import org.axsl.kp.KpLeaf;
@@ -102,6 +111,26 @@
final InstreamForeignObject instreamForeign = (InstreamForeignObject) fo;
this.children.add(new ScaledContent(instreamForeign, context));
return;
+ } else if (fo instanceof Inline) {
+ return;
+ } else if (fo instanceof RetrieveMarker) {
+ return;
+ } else if (fo instanceof Block) {
+ return;
+ } else if (fo instanceof BasicLink) {
+ return;
+ } else if (fo instanceof Marker) {
+ return;
+ } else if (fo instanceof Footnote) {
+ return;
+ } else if (fo instanceof Leader) {
+ return;
+ } else if (fo instanceof Wrapper) {
+ return;
+ } else if (fo instanceof PageNumber) {
+ final PageNumber pageNumber = (PageNumber) fo;
+ this.children.add(new PageReferenceContent(pageNumber, context));
+ return;
}
throw new IllegalStateException("Don't know how to create content for: " + fo.getClass().getName());
}
Modified: trunk/foray/foray-content/src/main/java/org/foray/content/TextTokensContent4a.java
===================================================================
--- trunk/foray/foray-content/src/main/java/org/foray/content/TextTokensContent4a.java 2022-02-17 22:02:59 UTC (rev 12603)
+++ trunk/foray/foray-content/src/main/java/org/foray/content/TextTokensContent4a.java 2022-02-18 14:49:53 UTC (rev 12604)
@@ -29,6 +29,7 @@
package org.foray.content;
import org.foray.common.FontContext4a;
+import org.foray.common.WellKnownConstants;
import org.foray.common.kp.KpLeafIterator4a;
import org.axsl.area.LineArea;
@@ -173,7 +174,9 @@
} else {
/* We are now sitting on a different content element. That means that all of the previous
* content item belongs on this line. */
- lineArea.makeGlyphAreaSequence(this.content, start, null, false);
+ final TextTokenFlowLocation end =
+ foTextTokenFlow.markLocation(tokenIndex, WellKnownConstants.MAX_7_BIT_UNSIGNED_VALUE, 0);
+ lineArea.makeGlyphAreaSequence(this.content, start, end, false);
return iterator.nextIndex();
}
}
@@ -185,7 +188,9 @@
return iterator.nextIndex();
}
/* The iterator is out of content. All of this content item goes on this line. */
- lineArea.makeGlyphAreaSequence(this.content, start, null, false);
+ final TextTokenFlowLocation end =
+ foTextTokenFlow.markLocation(tokenIndex, WellKnownConstants.MAX_7_BIT_UNSIGNED_VALUE, 0);
+ lineArea.makeGlyphAreaSequence(this.content, start, end, false);
return iterator.nextIndex();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-02-17 22:03:02
|
Revision: 12603
http://sourceforge.net/p/foray/code/12603
Author: victormote
Date: 2022-02-17 22:02:59 +0000 (Thu, 17 Feb 2022)
Log Message:
-----------
Rename package, for consistency.
Added Paths:
-----------
trunk/foray/foray-common/src/test/java/org/foray/common/kp/
trunk/foray/foray-common/src/test/java/org/foray/common/kp/ParaBranch4aIteratorTests.java
trunk/foray/foray-common/src/test/java/org/foray/common/kp/ParaBranch4aTests.java
Removed Paths:
-------------
trunk/foray/foray-common/src/test/java/org/foray/common/kp/ParaBranch4aIteratorTests.java
trunk/foray/foray-common/src/test/java/org/foray/common/kp/ParaBranch4aTests.java
trunk/foray/foray-common/src/test/java/org/foray/common/para/
Deleted: trunk/foray/foray-common/src/test/java/org/foray/common/kp/ParaBranch4aIteratorTests.java
===================================================================
--- trunk/foray/foray-common/src/test/java/org/foray/common/para/ParaBranch4aIteratorTests.java 2022-02-16 18:02:04 UTC (rev 12596)
+++ trunk/foray/foray-common/src/test/java/org/foray/common/kp/ParaBranch4aIteratorTests.java 2022-02-17 22:02:59 UTC (rev 12603)
@@ -1,192 +0,0 @@
-/*
- * Copyright 2021 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.para;
-
-import org.junit.Assert;
-import org.junit.Test;
-
-import java.util.NoSuchElementException;
-
-/**
- * Tests of {@link ParaBranch4aIterator}.
- */
-public class ParaBranch4aIteratorTests {
-
- /**
- * Makes assertions about the state of the iterator.
- * @param iterator The iterator about which the assertions are made.
- * @param expectedHasNext The expected value for hasNext().
- * @param expectedHasPrevious The expected value for hasPrevious().
- * @param expectedNextIndex The expected value for nextIndex().
- * @param expectedPreviousIndex The expected value for previousIndex().
- * @param expectedDepth The expected value for depth().
- */
- private void iteratorAssertions(final ParaBranch4aIterator iterator, final boolean expectedHasNext,
- final boolean expectedHasPrevious, final int expectedNextIndex, final int expectedPreviousIndex,
- final int expectedDepth) {
- Assert.assertEquals(expectedHasNext, iterator.hasNext());
- Assert.assertEquals(expectedHasPrevious, iterator.hasPrevious());
- Assert.assertEquals(expectedNextIndex, iterator.nextIndex());
- Assert.assertEquals(expectedPreviousIndex, iterator.previousIndex());
- Assert.assertEquals(expectedDepth, iterator.depth());
- }
-
- /**
- * Test iterating both forward and backward.
- */
- @Test
- public void test_001() {
- final ParaBranch4a para = ParaBranch4aTests.createTestPara();
- final ParaBranch4aIterator out = new ParaBranch4aIterator(para);
- iteratorAssertions(out, true, false, 0, -1, 2);
-
- /* Iterate forward. */
- Assert.assertEquals("B", out.next().getText());
- iteratorAssertions(out, true, true, 1, 0, 2);
- Assert.assertEquals("e", out.next().getText());
- iteratorAssertions(out, true, true, 2, 1, 1);
- Assert.assertEquals(" ", out.next().getText());
- iteratorAssertions(out, true, true, 3, 2, 1);
- Assert.assertEquals("not", out.next().getText());
- iteratorAssertions(out, true, true, 4, 3, 1);
- Assert.assertEquals(" ", out.next().getText());
- iteratorAssertions(out, true, true, 5, 4, 1);
- Assert.assertEquals("afraid", out.next().getText());
- iteratorAssertions(out, true, true, 6, 5, 1);
- Assert.assertEquals(" ", out.next().getText());
- iteratorAssertions(out, true, true, 7, 6, 1);
- Assert.assertEquals("of", out.next().getText());
- iteratorAssertions(out, true, true, 8, 7, 1);
- Assert.assertEquals(" ", out.next().getText());
- iteratorAssertions(out, true, true, 9, 8, 2);
- Assert.assertEquals("great", out.next().getText());
- iteratorAssertions(out, true, true, 10, 9, 2);
- Assert.assertEquals("-", out.next().getText());
- iteratorAssertions(out, true, true, 11, 10, 2);
- Assert.assertEquals("ness", out.next().getText());
- iteratorAssertions(out, true, true, 12, 11, 1);
- Assert.assertEquals(".", out.next().getText());
- iteratorAssertions(out, true, true, 13, 12, 1);
-
- /* Now iterate backward for awhile. */
- Assert.assertEquals(".", out.previous().getText());
- iteratorAssertions(out, true, true, 12, 11, 1);
- Assert.assertEquals("ness", out.previous().getText());
- iteratorAssertions(out, true, true, 11, 10, 2);
- Assert.assertEquals("-", out.previous().getText());
- iteratorAssertions(out, true, true, 10, 9, 2);
- Assert.assertEquals("great", out.previous().getText());
- iteratorAssertions(out, true, true, 9, 8, 2);
-
- /* Reverse direction to forward again. */
- Assert.assertEquals("great", out.next().getText());
- iteratorAssertions(out, true, true, 10, 9, 2);
- Assert.assertEquals("-", out.next().getText());
- iteratorAssertions(out, true, true, 11, 10, 2);
-
- /* Reverse direction to backward again. Read back to the beginning. */
- Assert.assertEquals("-", out.previous().getText());
- iteratorAssertions(out, true, true, 10, 9, 2);
- Assert.assertEquals("great", out.previous().getText());
- iteratorAssertions(out, true, true, 9, 8, 2);
- Assert.assertEquals(" ", out.previous().getText());
- iteratorAssertions(out, true, true, 8, 7, 1);
- Assert.assertEquals("of", out.previous().getText());
- iteratorAssertions(out, true, true, 7, 6, 1);
- Assert.assertEquals(" ", out.previous().getText());
- iteratorAssertions(out, true, true, 6, 5, 1);
- Assert.assertEquals("afraid", out.previous().getText());
- iteratorAssertions(out, true, true, 5, 4, 1);
- Assert.assertEquals(" ", out.previous().getText());
- iteratorAssertions(out, true, true, 4, 3, 1);
- Assert.assertEquals("not", out.previous().getText());
- iteratorAssertions(out, true, true, 3, 2, 1);
- Assert.assertEquals(" ", out.previous().getText());
- iteratorAssertions(out, true, true, 2, 1, 1);
- Assert.assertEquals("e", out.previous().getText());
- iteratorAssertions(out, true, true, 1, 0, 2);
- Assert.assertEquals("B", out.previous().getText());
- iteratorAssertions(out, true, false, 0, -1, 2);
-
- /* We just retrieved the first node using previous(). The cursor is sitting before index 0. Another previous()
- * should throw an exception. */
- try {
- out.previous();
- Assert.fail("Exception expected here.");
- } catch (final NoSuchElementException e) {
- /* This is the expected case. */
- Assert.assertEquals("There is no \"previous\" leaf.", e.getMessage());
- }
- }
-
- /**
- * Test trying to iterate backward when the iterator is first created.
- */
- @Test
- public void test_002() {
- final ParaBranch4a para = ParaBranch4aTests.createTestPara();
- final ParaBranch4aIterator out = new ParaBranch4aIterator(para);
- iteratorAssertions(out, true, false, 0, -1, 2);
-
- try {
- out.previous();
- Assert.fail("Exception expected here.");
- } catch (final NoSuchElementException e) {
- /* This is the expected case. */
- Assert.assertEquals("There is no \"previous\" leaf.", e.getMessage());
- }
- }
-
- /**
- * Test trying to iterate forward past the end of the branch.
- */
- @Test
- public void test_003() {
- final ParaBranch4a para = ParaBranch4aTests.createTestPara();
- final ParaBranch4aIterator out = new ParaBranch4aIterator(para);
- iteratorAssertions(out, true, false, 0, -1, 2);
-
- /* Iterate to the end of the branch. */
- for (int leafIndex = 0; leafIndex < para.qtyParaLeaves(); leafIndex ++) {
- out.next();
- }
-
- /* Make sure we are where we think we are. */
- iteratorAssertions(out, false, true, 50, 49, 1);
-
- try {
- out.next();
- Assert.fail("Exception expected here.");
- } catch (final NoSuchElementException e) {
- /* This is the expected case. */
- Assert.assertEquals("There is no \"next\" leaf.", e.getMessage());
- }
- }
-
-}
Copied: trunk/foray/foray-common/src/test/java/org/foray/common/kp/ParaBranch4aIteratorTests.java (from rev 12602, trunk/foray/foray-common/src/test/java/org/foray/common/para/ParaBranch4aIteratorTests.java)
===================================================================
--- trunk/foray/foray-common/src/test/java/org/foray/common/kp/ParaBranch4aIteratorTests.java (rev 0)
+++ trunk/foray/foray-common/src/test/java/org/foray/common/kp/ParaBranch4aIteratorTests.java 2022-02-17 22:02:59 UTC (rev 12603)
@@ -0,0 +1,192 @@
+/*
+ * Copyright 2021 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.kp;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.util.NoSuchElementException;
+
+/**
+ * Tests of {@link KpLeafIterator4a}.
+ */
+public class ParaBranch4aIteratorTests {
+
+ /**
+ * Makes assertions about the state of the iterator.
+ * @param iterator The iterator about which the assertions are made.
+ * @param expectedHasNext The expected value for hasNext().
+ * @param expectedHasPrevious The expected value for hasPrevious().
+ * @param expectedNextIndex The expected value for nextIndex().
+ * @param expectedPreviousIndex The expected value for previousIndex().
+ * @param expectedDepth The expected value for depth().
+ */
+ private void iteratorAssertions(final KpLeafIterator4a iterator, final boolean expectedHasNext,
+ final boolean expectedHasPrevious, final int expectedNextIndex, final int expectedPreviousIndex,
+ final int expectedDepth) {
+ Assert.assertEquals(expectedHasNext, iterator.hasNext());
+ Assert.assertEquals(expectedHasPrevious, iterator.hasPrevious());
+ Assert.assertEquals(expectedNextIndex, iterator.nextIndex());
+ Assert.assertEquals(expectedPreviousIndex, iterator.previousIndex());
+ Assert.assertEquals(expectedDepth, iterator.depth());
+ }
+
+ /**
+ * Test iterating both forward and backward.
+ */
+ @Test
+ public void test_001() {
+ final KpBranch4a para = ParaBranch4aTests.createTestPara();
+ final KpLeafIterator4a out = new KpLeafIterator4a(para);
+ iteratorAssertions(out, true, false, 0, -1, 1);
+
+ /* Iterate forward. */
+ Assert.assertEquals("B", out.next().getText());
+ iteratorAssertions(out, true, true, 1, 0, 2);
+ Assert.assertEquals("e", out.next().getText());
+ iteratorAssertions(out, true, true, 2, 1, 2);
+ Assert.assertEquals(" ", out.next().getText());
+ iteratorAssertions(out, true, true, 3, 2, 1);
+ Assert.assertEquals("not", out.next().getText());
+ iteratorAssertions(out, true, true, 4, 3, 1);
+ Assert.assertEquals(" ", out.next().getText());
+ iteratorAssertions(out, true, true, 5, 4, 1);
+ Assert.assertEquals("afraid", out.next().getText());
+ iteratorAssertions(out, true, true, 6, 5, 1);
+ Assert.assertEquals(" ", out.next().getText());
+ iteratorAssertions(out, true, true, 7, 6, 1);
+ Assert.assertEquals("of", out.next().getText());
+ iteratorAssertions(out, true, true, 8, 7, 1);
+ Assert.assertEquals(" ", out.next().getText());
+ iteratorAssertions(out, true, true, 9, 8, 1);
+ Assert.assertEquals("great", out.next().getText());
+ iteratorAssertions(out, true, true, 10, 9, 2);
+ Assert.assertEquals("-", out.next().getText());
+ iteratorAssertions(out, true, true, 11, 10, 2);
+ Assert.assertEquals("ness", out.next().getText());
+ iteratorAssertions(out, true, true, 12, 11, 2);
+ Assert.assertEquals(".", out.next().getText());
+ iteratorAssertions(out, true, true, 13, 12, 1);
+
+ /* Now iterate backward for awhile. */
+ Assert.assertEquals(".", out.previous().getText());
+ iteratorAssertions(out, true, true, 12, 11, 1);
+ Assert.assertEquals("ness", out.previous().getText());
+ iteratorAssertions(out, true, true, 11, 10, 2);
+ Assert.assertEquals("-", out.previous().getText());
+ iteratorAssertions(out, true, true, 10, 9, 2);
+ Assert.assertEquals("great", out.previous().getText());
+ iteratorAssertions(out, true, true, 9, 8, 2);
+
+ /* Reverse direction to forward again. */
+ Assert.assertEquals("great", out.next().getText());
+ iteratorAssertions(out, true, true, 10, 9, 2);
+ Assert.assertEquals("-", out.next().getText());
+ iteratorAssertions(out, true, true, 11, 10, 2);
+
+ /* Reverse direction to backward again. Read back to the beginning. */
+ Assert.assertEquals("-", out.previous().getText());
+ iteratorAssertions(out, true, true, 10, 9, 2);
+ Assert.assertEquals("great", out.previous().getText());
+ iteratorAssertions(out, true, true, 9, 8, 2);
+ Assert.assertEquals(" ", out.previous().getText());
+ iteratorAssertions(out, true, true, 8, 7, 1);
+ Assert.assertEquals("of", out.previous().getText());
+ iteratorAssertions(out, true, true, 7, 6, 1);
+ Assert.assertEquals(" ", out.previous().getText());
+ iteratorAssertions(out, true, true, 6, 5, 1);
+ Assert.assertEquals("afraid", out.previous().getText());
+ iteratorAssertions(out, true, true, 5, 4, 1);
+ Assert.assertEquals(" ", out.previous().getText());
+ iteratorAssertions(out, true, true, 4, 3, 1);
+ Assert.assertEquals("not", out.previous().getText());
+ iteratorAssertions(out, true, true, 3, 2, 1);
+ Assert.assertEquals(" ", out.previous().getText());
+ iteratorAssertions(out, true, true, 2, 1, 1);
+ Assert.assertEquals("e", out.previous().getText());
+ iteratorAssertions(out, true, true, 1, 0, 2);
+ Assert.assertEquals("B", out.previous().getText());
+ iteratorAssertions(out, true, false, 0, -1, 2);
+
+ /* We just retrieved the first node using previous(). The cursor is sitting before index 0. Another previous()
+ * should throw an exception. */
+ try {
+ out.previous();
+ Assert.fail("Exception expected here.");
+ } catch (final NoSuchElementException e) {
+ /* This is the expected case. */
+ Assert.assertEquals("There is no \"previous\" leaf.", e.getMessage());
+ }
+ }
+
+ /**
+ * Test trying to iterate backward when the iterator is first created.
+ */
+ @Test
+ public void test_002() {
+ final KpBranch4a para = ParaBranch4aTests.createTestPara();
+ final KpLeafIterator4a out = new KpLeafIterator4a(para);
+ iteratorAssertions(out, true, false, 0, -1, 1);
+
+ try {
+ out.previous();
+ Assert.fail("Exception expected here.");
+ } catch (final NoSuchElementException e) {
+ /* This is the expected case. */
+ Assert.assertEquals("There is no \"previous\" leaf.", e.getMessage());
+ }
+ }
+
+ /**
+ * Test trying to iterate forward past the end of the branch.
+ */
+ @Test
+ public void test_003() {
+ final KpBranch4a para = ParaBranch4aTests.createTestPara();
+ final KpLeafIterator4a out = new KpLeafIterator4a(para);
+ iteratorAssertions(out, true, false, 0, -1, 1);
+
+ /* Iterate to the end of the branch. */
+ for (int leafIndex = 0; leafIndex < para.qtyKpLeaves(); leafIndex ++) {
+ out.next();
+ }
+
+ /* Make sure we are where we think we are. */
+ iteratorAssertions(out, false, true, 50, 49, 2);
+
+ try {
+ out.next();
+ Assert.fail("Exception expected here.");
+ } catch (final NoSuchElementException e) {
+ /* This is the expected case. */
+ Assert.assertEquals("There is no \"next\" leaf.", e.getMessage());
+ }
+ }
+
+}
Deleted: trunk/foray/foray-common/src/test/java/org/foray/common/kp/ParaBranch4aTests.java
===================================================================
--- trunk/foray/foray-common/src/test/java/org/foray/common/para/ParaBranch4aTests.java 2022-02-16 18:02:04 UTC (rev 12596)
+++ trunk/foray/foray-common/src/test/java/org/foray/common/kp/ParaBranch4aTests.java 2022-02-17 22:02:59 UTC (rev 12603)
@@ -1,186 +0,0 @@
-/*
- * Copyright 2021 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.para;
-
-import org.axsl.kp.KpPenalty;
-
-import org.junit.Assert;
-import org.junit.Test;
-
-/**
- * Tests of {@Link ParaBranch4a}.
- */
-public class ParaBranch4aTests {
-
- /**
- * Creates a paragraph suitable for testing.
- * @return A test paragraph.
- */
- public static ParaBranch4a createTestPara() {
- /*
- * Be not afraid of greatness. Some are born great, some achieve greatness, and some have greatness thrust upon
- * them.
- * -- William Shakespeare, "Twelfth Night," Act II, Scene 5.
- */
-
- final KpPenalty discretionaryHyphen = new ParaPenaltyChars("-", 0, false);
-
- final ParaBranch4a out = new ParaBranch4a(null);
- final ParaBranch4a nodeGreatness = new ParaBranch4a(null);
- nodeGreatness.addNode(new ParaBoxChars("great"));
-
- nodeGreatness.addNode(discretionaryHyphen);
- nodeGreatness.addNode(new ParaBoxChars("ness"));
-
- /* Putting "Be" in a branch is unnecessary, but we wish to test a branch as the first node. */
- final ParaBranch4a nodeBe = new ParaBranch4a(null);
- nodeBe.addNode(new ParaBoxChars("B"));
- nodeBe.addNode(new ParaBoxChars("e"));
- out.addNode(nodeBe); // Node 0, Leaf 0 - 1
- out.addNode(ParaGlueChars.SPACE); // Node 1, Leaf 2
- out.addNode(new ParaBoxChars("not")); // Node 2, Leaf 3
- out.addNode(ParaGlueChars.SPACE); // Node 3, Leaf 4
- out.addNode(new ParaBoxChars("afraid")); // Node 4, Leaf 5
- out.addNode(ParaGlueChars.SPACE); // Node 5, Leaf 6
- out.addNode(new ParaBoxChars("of")); // Node 6, Leaf 7
- out.addNode(ParaGlueChars.SPACE); // Node 7, Leaf 8
- out.addNode(nodeGreatness); // Node 8, Leaf 9 - 11
- out.addNode(new ParaBoxChars(".")); // Node 9, Leaf 12
- out.addNode(ParaGlueChars.SPACE); // Node 10, Leaf 13
- out.addNode(new ParaBoxChars("Some")); // Node 11, Leaf 14
- out.addNode(ParaGlueChars.SPACE); // Node 12, Leaf 15
- out.addNode(new ParaBoxChars("are")); // Node 13, Leaf 16
- out.addNode(ParaGlueChars.SPACE); // Node 14, Leaf 17
- out.addNode(new ParaBoxChars("born")); // Node 15, Leaf 18
- out.addNode(ParaGlueChars.SPACE); // Node 16, Leaf 19
- out.addNode(new ParaBoxChars("great,")); // Node 17, Leaf 20
- out.addNode(ParaGlueChars.SPACE); // Node 18, Leaf 21
- out.addNode(new ParaBoxChars("some")); // Node 19, Leaf 22
- out.addNode(ParaGlueChars.SPACE); // Node 20, Leaf 23
- out.addNode(new ParaBoxChars("achieve")); // Node 21, Leaf 24
- out.addNode(ParaGlueChars.SPACE); // Node 22, Leaf 25
- out.addNode(nodeGreatness); // Node 23, Leaf 26 - 28
- out.addNode(new ParaBoxChars(",")); // Node 24, Leaf 29
- out.addNode(ParaGlueChars.SPACE); // Node 25, Leaf 30
- out.addNode(new ParaBoxChars("and")); // Node 26, Leaf 31
- out.addNode(ParaGlueChars.SPACE); // Node 27, Leaf 32
- out.addNode(new ParaBoxChars("some")); // Node 28, Leaf 33
- out.addNode(ParaGlueChars.SPACE); // Node 29, Leaf 34
- out.addNode(new ParaBoxChars("have")); // Node 30, Leaf 35
- out.addNode(ParaGlueChars.SPACE); // Node 31, Leaf 36
- out.addNode(nodeGreatness); // Node 32, Leaf 37 - 39
- out.addNode(ParaGlueChars.SPACE); // Node 33, Leaf 40
- out.addNode(new ParaBoxChars("thrust")); // Node 34, Leaf 41
- out.addNode(ParaGlueChars.SPACE); // Node 35, Leaf 42
- out.addNode(new ParaBoxChars("upon")); // Node 36, Leaf 43
- out.addNode(ParaGlueChars.SPACE); // Node 37, Leaf 44
-
- /* Putting "them." in a branch is unnecessary, but we with to test a branch as the last node. */
- final ParaBranch4a nodeThem = new ParaBranch4a(null);
- nodeThem.addNode(new ParaBoxChars("t"));
- nodeThem.addNode(new ParaBoxChars("h"));
- nodeThem.addNode(new ParaBoxChars("e"));
- nodeThem.addNode(new ParaBoxChars("m"));
- nodeThem.addNode(new ParaBoxChars("."));
- out.addNode(nodeThem); // Node 38, Leaf 45 - 49
- return out;
- }
-
- /**
- * Test of {@link ParaBranch4a#paraLeafAt(int)}.
- */
- @Test
- public void paraLeafAtTest_001() {
- final ParaBranch4a out = createTestPara();
-
- /* Test the /node/ count. */
- Assert.assertEquals(39, out.qtyParaNodes());
-
- /* Test the /nodes/ at each end, and one in the middle. */
- Assert.assertEquals("Be", out.paraNodeAt(0).getText());
- Assert.assertEquals("them.", out.paraNodeAt(38).getText());
- Assert.assertEquals("born", out.paraNodeAt(15).getText());
-
- /* Most nodes are exactly one leaf. 3 lines each add an additional 2 leaves each, adding 6 leaves. */
- Assert.assertEquals(50, out.qtyParaLeaves());
-
- /* Test the /leaves/ at each end. */
- Assert.assertEquals("B", out.paraLeafAt(0).getText());
- Assert.assertEquals("e", out.paraLeafAt(1).getText());
- Assert.assertEquals(" ", out.paraLeafAt(2).getText());
- Assert.assertEquals("not", out.paraLeafAt(3).getText());
- Assert.assertEquals(" ", out.paraLeafAt(4).getText());
- Assert.assertEquals("afraid", out.paraLeafAt(5).getText());
- Assert.assertEquals(" ", out.paraLeafAt(6).getText());
- Assert.assertEquals("of", out.paraLeafAt(7).getText());
- Assert.assertEquals(" ", out.paraLeafAt(8).getText());
- Assert.assertEquals("great", out.paraLeafAt(9).getText());
- Assert.assertEquals("-", out.paraLeafAt(10).getText());
- Assert.assertEquals("ness", out.paraLeafAt(11).getText());
- Assert.assertEquals(".", out.paraLeafAt(12).getText());
- Assert.assertEquals(" ", out.paraLeafAt(13).getText());
- Assert.assertEquals("Some", out.paraLeafAt(14).getText());
- Assert.assertEquals(" ", out.paraLeafAt(15).getText());
- Assert.assertEquals("are", out.paraLeafAt(16).getText());
- Assert.assertEquals(" ", out.paraLeafAt(17).getText());
- Assert.assertEquals("born", out.paraLeafAt(18).getText());
- Assert.assertEquals(" ", out.paraLeafAt(19).getText());
- Assert.assertEquals("great,", out.paraLeafAt(20).getText());
- Assert.assertEquals(" ", out.paraLeafAt(21).getText());
- Assert.assertEquals("some", out.paraLeafAt(22).getText());
- Assert.assertEquals(" ", out.paraLeafAt(23).getText());
- Assert.assertEquals("achieve", out.paraLeafAt(24).getText());
- Assert.assertEquals(" ", out.paraLeafAt(25).getText());
- Assert.assertEquals("great", out.paraLeafAt(26).getText());
- Assert.assertEquals("-", out.paraLeafAt(27).getText());
- Assert.assertEquals("ness", out.paraLeafAt(28).getText());
- Assert.assertEquals(",", out.paraLeafAt(29).getText());
- Assert.assertEquals(" ", out.paraLeafAt(30).getText());
- Assert.assertEquals("and", out.paraLeafAt(31).getText());
- Assert.assertEquals(" ", out.paraLeafAt(32).getText());
- Assert.assertEquals("some", out.paraLeafAt(33).getText());
- Assert.assertEquals(" ", out.paraLeafAt(34).getText());
- Assert.assertEquals("have", out.paraLeafAt(35).getText());
- Assert.assertEquals(" ", out.paraLeafAt(36).getText());
- Assert.assertEquals("great", out.paraLeafAt(37).getText());
- Assert.assertEquals("-", out.paraLeafAt(38).getText());
- Assert.assertEquals("ness", out.paraLeafAt(39).getText());
- Assert.assertEquals(" ", out.paraLeafAt(40).getText());
- Assert.assertEquals("thrust", out.paraLeafAt(41).getText());
- Assert.assertEquals(" ", out.paraLeafAt(42).getText());
- Assert.assertEquals("upon", out.paraLeafAt(43).getText());
- Assert.assertEquals(" ", out.paraLeafAt(44).getText());
- Assert.assertEquals("t", out.paraLeafAt(45).getText());
- Assert.assertEquals("h", out.paraLeafAt(46).getText());
- Assert.assertEquals("e", out.paraLeafAt(47).getText());
- Assert.assertEquals("m", out.paraLeafAt(48).getText());
- Assert.assertEquals(".", out.paraLeafAt(49).getText());
- }
-
-}
Copied: trunk/foray/foray-common/src/test/java/org/foray/common/kp/ParaBranch4aTests.java (from rev 12602, trunk/foray/foray-common/src/test/java/org/foray/common/para/ParaBranch4aTests.java)
===================================================================
--- trunk/foray/foray-common/src/test/java/org/foray/common/kp/ParaBranch4aTests.java (rev 0)
+++ trunk/foray/foray-common/src/test/java/org/foray/common/kp/ParaBranch4aTests.java 2022-02-17 22:02:59 UTC (rev 12603)
@@ -0,0 +1,186 @@
+/*
+ * Copyright 2021 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.kp;
+
+import org.axsl.kp.KpPenalty;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Tests of {@Link ParaBranch4a}.
+ */
+public class ParaBranch4aTests {
+
+ /**
+ * Creates a paragraph suitable for testing.
+ * @return A test paragraph.
+ */
+ public static KpBranch4a createTestPara() {
+ /*
+ * Be not afraid of greatness. Some are born great, some achieve greatness, and some have greatness thrust upon
+ * them.
+ * -- William Shakespeare, "Twelfth Night," Act II, Scene 5.
+ */
+
+ final KpPenalty discretionaryHyphen = new KpPenaltyChars4a("-", 0, false);
+
+ final KpBranch4a out = new KpBranch4a(null);
+ final KpBranch4a nodeGreatness = new KpBranch4a(null);
+ nodeGreatness.addNode(new KpBoxChars4a("great"));
+
+ nodeGreatness.addNode(discretionaryHyphen);
+ nodeGreatness.addNode(new KpBoxChars4a("ness"));
+
+ /* Putting "Be" in a branch is unnecessary, but we wish to test a branch as the first node. */
+ final KpBranch4a nodeBe = new KpBranch4a(null);
+ nodeBe.addNode(new KpBoxChars4a("B"));
+ nodeBe.addNode(new KpBoxChars4a("e"));
+ out.addNode(nodeBe); // Node 0, Leaf 0 - 1
+ out.addNode(KpGlueChars4a.SPACE); // Node 1, Leaf 2
+ out.addNode(new KpBoxChars4a("not")); // Node 2, Leaf 3
+ out.addNode(KpGlueChars4a.SPACE); // Node 3, Leaf 4
+ out.addNode(new KpBoxChars4a("afraid")); // Node 4, Leaf 5
+ out.addNode(KpGlueChars4a.SPACE); // Node 5, Leaf 6
+ out.addNode(new KpBoxChars4a("of")); // Node 6, Leaf 7
+ out.addNode(KpGlueChars4a.SPACE); // Node 7, Leaf 8
+ out.addNode(nodeGreatness); // Node 8, Leaf 9 - 11
+ out.addNode(new KpBoxChars4a(".")); // Node 9, Leaf 12
+ out.addNode(KpGlueChars4a.SPACE); // Node 10, Leaf 13
+ out.addNode(new KpBoxChars4a("Some")); // Node 11, Leaf 14
+ out.addNode(KpGlueChars4a.SPACE); // Node 12, Leaf 15
+ out.addNode(new KpBoxChars4a("are")); // Node 13, Leaf 16
+ out.addNode(KpGlueChars4a.SPACE); // Node 14, Leaf 17
+ out.addNode(new KpBoxChars4a("born")); // Node 15, Leaf 18
+ out.addNode(KpGlueChars4a.SPACE); // Node 16, Leaf 19
+ out.addNode(new KpBoxChars4a("great,")); // Node 17, Leaf 20
+ out.addNode(KpGlueChars4a.SPACE); // Node 18, Leaf 21
+ out.addNode(new KpBoxChars4a("some")); // Node 19, Leaf 22
+ out.addNode(KpGlueChars4a.SPACE); // Node 20, Leaf 23
+ out.addNode(new KpBoxChars4a("achieve")); // Node 21, Leaf 24
+ out.addNode(KpGlueChars4a.SPACE); // Node 22, Leaf 25
+ out.addNode(nodeGreatness); // Node 23, Leaf 26 - 28
+ out.addNode(new KpBoxChars4a(",")); // Node 24, Leaf 29
+ out.addNode(KpGlueChars4a.SPACE); // Node 25, Leaf 30
+ out.addNode(new KpBoxChars4a("and")); // Node 26, Leaf 31
+ out.addNode(KpGlueChars4a.SPACE); // Node 27, Leaf 32
+ out.addNode(new KpBoxChars4a("some")); // Node 28, Leaf 33
+ out.addNode(KpGlueChars4a.SPACE); // Node 29, Leaf 34
+ out.addNode(new KpBoxChars4a("have")); // Node 30, Leaf 35
+ out.addNode(KpGlueChars4a.SPACE); // Node 31, Leaf 36
+ out.addNode(nodeGreatness); // Node 32, Leaf 37 - 39
+ out.addNode(KpGlueChars4a.SPACE); // Node 33, Leaf 40
+ out.addNode(new KpBoxChars4a("thrust")); // Node 34, Leaf 41
+ out.addNode(KpGlueChars4a.SPACE); // Node 35, Leaf 42
+ out.addNode(new KpBoxChars4a("upon")); // Node 36, Leaf 43
+ out.addNode(KpGlueChars4a.SPACE); // Node 37, Leaf 44
+
+ /* Putting "them." in a branch is unnecessary, but we with to test a branch as the last node. */
+ final KpBranch4a nodeThem = new KpBranch4a(null);
+ nodeThem.addNode(new KpBoxChars4a("t"));
+ nodeThem.addNode(new KpBoxChars4a("h"));
+ nodeThem.addNode(new KpBoxChars4a("e"));
+ nodeThem.addNode(new KpBoxChars4a("m"));
+ nodeThem.addNode(new KpBoxChars4a("."));
+ out.addNode(nodeThem); // Node 38, Leaf 45 - 49
+ return out;
+ }
+
+ /**
+ * Test of {@link KpBranch4a#paraLeafAt(int)}.
+ */
+ @Test
+ public void paraLeafAtTest_001() {
+ final KpBranch4a out = createTestPara();
+
+ /* Test the /node/ count. */
+ Assert.assertEquals(39, out.qtyKpNodes());
+
+ /* Test the /nodes/ at each end, and one in the middle. */
+ Assert.assertEquals("Be", out.kpNodeAt(0).getText());
+ Assert.assertEquals("them.", out.kpNodeAt(38).getText());
+ Assert.assertEquals("born", out.kpNodeAt(15).getText());
+
+ /* Most nodes are exactly one leaf. 3 lines each add an additional 2 leaves each, adding 6 leaves. */
+ Assert.assertEquals(50, out.qtyKpLeaves());
+
+ /* Test the /leaves/ at each end. */
+ Assert.assertEquals("B", out.kpLeafAt(0).getText());
+ Assert.assertEquals("e", out.kpLeafAt(1).getText());
+ Assert.assertEquals(" ", out.kpLeafAt(2).getText());
+ Assert.assertEquals("not", out.kpLeafAt(3).getText());
+ Assert.assertEquals(" ", out.kpLeafAt(4).getText());
+ Assert.assertEquals("afraid", out.kpLeafAt(5).getText());
+ Assert.assertEquals(" ", out.kpLeafAt(6).getText());
+ Assert.assertEquals("of", out.kpLeafAt(7).getText());
+ Assert.assertEquals(" ", out.kpLeafAt(8).getText());
+ Assert.assertEquals("great", out.kpLeafAt(9).getText());
+ Assert.assertEquals("-", out.kpLeafAt(10).getText());
+ Assert.assertEquals("ness", out.kpLeafAt(11).getText());
+ Assert.assertEquals(".", out.kpLeafAt(12).getText());
+ Assert.assertEquals(" ", out.kpLeafAt(13).getText());
+ Assert.assertEquals("Some", out.kpLeafAt(14).getText());
+ Assert.assertEquals(" ", out.kpLeafAt(15).getText());
+ Assert.assertEquals("are", out.kpLeafAt(16).getText());
+ Assert.assertEquals(" ", out.kpLeafAt(17).getText());
+ Assert.assertEquals("born", out.kpLeafAt(18).getText());
+ Assert.assertEquals(" ", out.kpLeafAt(19).getText());
+ Assert.assertEquals("great,", out.kpLeafAt(20).getText());
+ Assert.assertEquals(" ", out.kpLeafAt(21).getText());
+ Assert.assertEquals("some", out.kpLeafAt(22).getText());
+ Assert.assertEquals(" ", out.kpLeafAt(23).getText());
+ Assert.assertEquals("achieve", out.kpLeafAt(24).getText());
+ Assert.assertEquals(" ", out.kpLeafAt(25).getText());
+ Assert.assertEquals("great", out.kpLeafAt(26).getText());
+ Assert.assertEquals("-", out.kpLeafAt(27).getText());
+ Assert.assertEquals("ness", out.kpLeafAt(28).getText());
+ Assert.assertEquals(",", out.kpLeafAt(29).getText());
+ Assert.assertEquals(" ", out.kpLeafAt(30).getText());
+ Assert.assertEquals("and", out.kpLeafAt(31).getText());
+ Assert.assertEquals(" ", out.kpLeafAt(32).getText());
+ Assert.assertEquals("some", out.kpLeafAt(33).getText());
+ Assert.assertEquals(" ", out.kpLeafAt(34).getText());
+ Assert.assertEquals("have", out.kpLeafAt(35).getText());
+ Assert.assertEquals(" ", out.kpLeafAt(36).getText());
+ Assert.assertEquals("great", out.kpLeafAt(37).getText());
+ Assert.assertEquals("-", out.kpLeafAt(38).getText());
+ Assert.assertEquals("ness", out.kpLeafAt(39).getText());
+ Assert.assertEquals(" ", out.kpLeafAt(40).getText());
+ Assert.assertEquals("thrust", out.kpLeafAt(41).getText());
+ Assert.assertEquals(" ", out.kpLeafAt(42).getText());
+ Assert.assertEquals("upon", out.kpLeafAt(43).getText());
+ Assert.assertEquals(" ", out.kpLeafAt(44).getText());
+ Assert.assertEquals("t", out.kpLeafAt(45).getText());
+ Assert.assertEquals("h", out.kpLeafAt(46).getText());
+ Assert.assertEquals("e", out.kpLeafAt(47).getText());
+ Assert.assertEquals("m", out.kpLeafAt(48).getText());
+ Assert.assertEquals(".", out.kpLeafAt(49).getText());
+ }
+
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-02-17 21:51:18
|
Revision: 12602
http://sourceforge.net/p/foray/code/12602
Author: victormote
Date: 2022-02-17 21:51:15 +0000 (Thu, 17 Feb 2022)
Log Message:
-----------
Conform to aXSL change: Rename method, for consistency.
Modified Paths:
--------------
trunk/foray/foray-common/src/main/java/org/foray/common/kp/KpBranch4a.java
trunk/foray/foray-common/src/main/java/org/foray/common/kp/KpLeaf4a.java
trunk/foray/foray-common/src/main/java/org/foray/common/kp/KpLeafIterator4a.java
trunk/foray/foray-common/src/test/java/org/foray/common/para/ParaBranch4aIteratorTests.java
trunk/foray/foray-common/src/test/java/org/foray/common/para/ParaBranch4aTests.java
trunk/foray/foray-content/src/main/java/org/foray/content/ContentTree4a.java
trunk/foray/foray-content/src/main/java/org/foray/content/IndivisibleContent4a.java
trunk/foray/foray-content/src/main/java/org/foray/content/TextTokensContent4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BlockDiscrete4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoTextWords4a.java
trunk/foray/foray-linebreak/src/main/java/org/foray/linebreak/FirstFitLb.java
trunk/foray/foray-linebreak/src/test/java/org/foray/linebreak/LineBreaker4aTests.java
trunk/foray/foray-linebreak/src/test/java/org/foray/linebreak/util/DumpLayout.java
trunk/foray/foray-linebreak/src/test/java/org/foray/linebreak/util/DumpParaBranch.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/DiscretionaryHyphenMutating4a.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Punctuation4a.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/SegmentDictionaryWord.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/StringWord.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/StringWordSegmentLatin1.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/StringWordSegmentUtf16.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/TokenFlow4a.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Whitespace4a.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/CapitalizedWord.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/DecoratedWord.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/ExactWord.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/LatinPast1Word.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/LatinPlural1Word.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/LatinPlural2Word.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/LatinPossessive1Word.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/LatinPossessive2Word.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/UppercaseWord.java
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/kp/KpBranch4a.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/kp/KpBranch4a.java 2022-02-17 21:27:02 UTC (rev 12601)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/kp/KpBranch4a.java 2022-02-17 21:51:15 UTC (rev 12602)
@@ -72,7 +72,7 @@
}
@Override
- public int qtyParaLeaves() {
+ public int qtyKpLeaves() {
int returnValue = 0;
for (int nodeIndex = 0; nodeIndex < qtyKpNodes(); nodeIndex ++) {
final KpNode node = kpNodeAt(nodeIndex);
@@ -82,7 +82,7 @@
returnValue ++;
} else {
/* Child node is a branch. */
- returnValue += childBranch.qtyParaLeaves();
+ returnValue += childBranch.qtyKpLeaves();
}
}
return returnValue;
@@ -95,7 +95,7 @@
* @return The leaf of {@code branch} at index {@code leafIndex}.
* @see KpBranch#kpLeafAt(int)
*/
- public static KpLeaf paraLeafAt(final KpBranch branch, final int leafIndex) {
+ public static KpLeaf kpLeafAt(final KpBranch branch, final int leafIndex) {
int runningLeafIndex = 0;
for (int nodeIndex = 0; nodeIndex < branch.qtyKpNodes(); nodeIndex ++) {
final KpNode node = branch.kpNodeAt(nodeIndex);
@@ -110,7 +110,7 @@
}
}
- final int additionalLeaves = childBranch == null ? 1 : childBranch.qtyParaLeaves();
+ final int additionalLeaves = childBranch == null ? 1 : childBranch.qtyKpLeaves();
final int newRunningLeafIndex = runningLeafIndex + additionalLeaves;
if (newRunningLeafIndex > leafIndex) {
@@ -126,7 +126,7 @@
@Override
public KpLeaf kpLeafAt(final int leafIndex) {
- return paraLeafAt(this, leafIndex);
+ return kpLeafAt(this, leafIndex);
}
@Override
@@ -167,7 +167,7 @@
@Override
public CharSequence getText() {
final StringBuilder builder = new StringBuilder();
- for (int leafIndex = 0; leafIndex < qtyParaLeaves(); leafIndex ++) {
+ for (int leafIndex = 0; leafIndex < qtyKpLeaves(); leafIndex ++) {
final KpLeaf leaf = kpLeafAt(leafIndex);
builder.append(leaf.getText());
}
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/kp/KpLeaf4a.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/kp/KpLeaf4a.java 2022-02-17 21:27:02 UTC (rev 12601)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/kp/KpLeaf4a.java 2022-02-17 21:51:15 UTC (rev 12602)
@@ -47,7 +47,7 @@
}
@Override
- public int qtyParaLeaves() {
+ public int qtyKpLeaves() {
return 1;
}
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/kp/KpLeafIterator4a.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/kp/KpLeafIterator4a.java 2022-02-17 21:27:02 UTC (rev 12601)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/kp/KpLeafIterator4a.java 2022-02-17 21:51:15 UTC (rev 12602)
@@ -122,7 +122,7 @@
* @param branch The branch to be iterated.
*/
public KpLeafIterator4a(final KpBranch branch) {
- this.qtyLeaves = branch.qtyParaLeaves();
+ this.qtyLeaves = branch.qtyKpLeaves();
this.branchStack.push(branch);
branchIndexes.push(-1);
Modified: trunk/foray/foray-common/src/test/java/org/foray/common/para/ParaBranch4aIteratorTests.java
===================================================================
--- trunk/foray/foray-common/src/test/java/org/foray/common/para/ParaBranch4aIteratorTests.java 2022-02-17 21:27:02 UTC (rev 12601)
+++ trunk/foray/foray-common/src/test/java/org/foray/common/para/ParaBranch4aIteratorTests.java 2022-02-17 21:51:15 UTC (rev 12602)
@@ -176,7 +176,7 @@
iteratorAssertions(out, true, false, 0, -1, 1);
/* Iterate to the end of the branch. */
- for (int leafIndex = 0; leafIndex < para.qtyParaLeaves(); leafIndex ++) {
+ for (int leafIndex = 0; leafIndex < para.qtyKpLeaves(); leafIndex ++) {
out.next();
}
Modified: trunk/foray/foray-common/src/test/java/org/foray/common/para/ParaBranch4aTests.java
===================================================================
--- trunk/foray/foray-common/src/test/java/org/foray/common/para/ParaBranch4aTests.java 2022-02-17 21:27:02 UTC (rev 12601)
+++ trunk/foray/foray-common/src/test/java/org/foray/common/para/ParaBranch4aTests.java 2022-02-17 21:51:15 UTC (rev 12602)
@@ -133,7 +133,7 @@
Assert.assertEquals("born", out.kpNodeAt(15).getText());
/* Most nodes are exactly one leaf. 3 lines each add an additional 2 leaves each, adding 6 leaves. */
- Assert.assertEquals(50, out.qtyParaLeaves());
+ Assert.assertEquals(50, out.qtyKpLeaves());
/* Test the /leaves/ at each end. */
Assert.assertEquals("B", out.kpLeafAt(0).getText());
Modified: trunk/foray/foray-content/src/main/java/org/foray/content/ContentTree4a.java
===================================================================
--- trunk/foray/foray-content/src/main/java/org/foray/content/ContentTree4a.java 2022-02-17 21:27:02 UTC (rev 12601)
+++ trunk/foray/foray-content/src/main/java/org/foray/content/ContentTree4a.java 2022-02-17 21:51:15 UTC (rev 12602)
@@ -140,13 +140,13 @@
}
@Override
- public int qtyParaLeaves() {
+ public int qtyKpLeaves() {
int count = 0;
for (int index = 0; index < this.children.size(); index ++) {
final Content content = this.children.get(index);
if (content instanceof KpNode) {
final KpNode node = (KpNode) content;
- count += node.qtyParaLeaves();
+ count += node.qtyKpLeaves();
}
}
return count;
@@ -159,7 +159,7 @@
final Content content = this.children.get(index);
if (content instanceof KpNode) {
final KpNode node = (KpNode) content;
- leafCount += node.qtyParaLeaves();
+ leafCount += node.qtyKpLeaves();
if (leafCount >= leafIndex) {
if (node instanceof KpLeaf) {
return (KpLeaf) node;
@@ -170,7 +170,7 @@
}
}
}
- throw new MarkedIndexOutOfBoundsException(leafIndex, qtyParaLeaves());
+ throw new MarkedIndexOutOfBoundsException(leafIndex, qtyKpLeaves());
}
@Override
Modified: trunk/foray/foray-content/src/main/java/org/foray/content/IndivisibleContent4a.java
===================================================================
--- trunk/foray/foray-content/src/main/java/org/foray/content/IndivisibleContent4a.java 2022-02-17 21:27:02 UTC (rev 12601)
+++ trunk/foray/foray-content/src/main/java/org/foray/content/IndivisibleContent4a.java 2022-02-17 21:51:15 UTC (rev 12602)
@@ -81,7 +81,7 @@
}
@Override
- public int qtyParaLeaves() {
+ public int qtyKpLeaves() {
return 0;
}
Modified: trunk/foray/foray-content/src/main/java/org/foray/content/TextTokensContent4a.java
===================================================================
--- trunk/foray/foray-content/src/main/java/org/foray/content/TextTokensContent4a.java 2022-02-17 21:27:02 UTC (rev 12601)
+++ trunk/foray/foray-content/src/main/java/org/foray/content/TextTokensContent4a.java 2022-02-17 21:51:15 UTC (rev 12602)
@@ -90,9 +90,9 @@
}
@Override
- public int qtyParaLeaves() {
+ public int qtyKpLeaves() {
/* Pass-through. */
- return getTokenFlow().qtyParaLeaves();
+ return getTokenFlow().qtyKpLeaves();
}
@Override
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BlockDiscrete4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BlockDiscrete4a.java 2022-02-17 21:27:02 UTC (rev 12601)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BlockDiscrete4a.java 2022-02-17 21:51:15 UTC (rev 12602)
@@ -219,7 +219,7 @@
}
@Override
- public int qtyParaLeaves() {
+ public int qtyKpLeaves() {
int count = 0;
for (int nodeIndex = 0; nodeIndex < qtyKpNodes(); nodeIndex ++) {
final KpNode node = kpNodeAt(nodeIndex);
@@ -227,7 +227,7 @@
if (branch == null) {
count ++;
} else {
- count += branch.qtyParaLeaves();
+ count += branch.qtyKpLeaves();
}
}
return count;
@@ -251,7 +251,7 @@
}
} else {
/* Node is a branch. */
- final int currentLength = branch.qtyParaLeaves();
+ final int currentLength = branch.qtyKpLeaves();
totalLength += currentLength;
if (totalLength > leafIndex) {
final int currentIndex = leafIndex - (totalLength - currentLength);
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoTextWords4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoTextWords4a.java 2022-02-17 21:27:02 UTC (rev 12601)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoTextWords4a.java 2022-02-17 21:51:15 UTC (rev 12602)
@@ -135,8 +135,8 @@
}
@Override
- public int qtyParaLeaves() {
- return this.tokenFlow.qtyParaLeaves();
+ public int qtyKpLeaves() {
+ return this.tokenFlow.qtyKpLeaves();
}
@Override
Modified: trunk/foray/foray-linebreak/src/main/java/org/foray/linebreak/FirstFitLb.java
===================================================================
--- trunk/foray/foray-linebreak/src/main/java/org/foray/linebreak/FirstFitLb.java 2022-02-17 21:27:02 UTC (rev 12601)
+++ trunk/foray/foray-linebreak/src/main/java/org/foray/linebreak/FirstFitLb.java 2022-02-17 21:51:15 UTC (rev 12602)
@@ -281,7 +281,7 @@
* (b) is glue, (c) is non-glue, and (d) is glue, then (a) is the end of the previous word, and (b) and (c)
* together are the current word, and (d) is the beginning of the next word. */
- if (paragraph.qtyParaLeaves() < 1) {
+ if (paragraph.qtyKpLeaves() < 1) {
return LineBreakResult4a.EMPTY_RESULT;
}
@@ -330,12 +330,12 @@
/* We tested above to ensure that there is at least one leaf node. Make sure there is at least one line in the
* result. */
if (state.breakpoints.length() < 1) {
- state.breakpoints.append(paragraph.qtyParaLeaves());
+ state.breakpoints.append(paragraph.qtyKpLeaves());
}
/* Do we need to add another line to catch the remaining content? */
- if (paragraph.qtyParaLeaves() > state.breakpoints.lastElement()) {
- state.breakpoints.append(paragraph.qtyParaLeaves());
+ if (paragraph.qtyKpLeaves() > state.breakpoints.lastElement()) {
+ state.breakpoints.append(paragraph.qtyKpLeaves());
}
while (state.lineLengths.length() > state.breakpoints.length()) {
Modified: trunk/foray/foray-linebreak/src/test/java/org/foray/linebreak/LineBreaker4aTests.java
===================================================================
--- trunk/foray/foray-linebreak/src/test/java/org/foray/linebreak/LineBreaker4aTests.java 2022-02-17 21:27:02 UTC (rev 12601)
+++ trunk/foray/foray-linebreak/src/test/java/org/foray/linebreak/LineBreaker4aTests.java 2022-02-17 21:51:15 UTC (rev 12602)
@@ -356,7 +356,7 @@
* 34
* ====
*/
- Assert.assertEquals(276, para.qtyParaLeaves());
+ Assert.assertEquals(276, para.qtyKpLeaves());
/* Check the count of leaves using a strict Knuth-Plass notion of leaves, i.e. where each character in the word
* is a box. See Table 1 where the leaves are listed from 1 through 601. */
Modified: trunk/foray/foray-linebreak/src/test/java/org/foray/linebreak/util/DumpLayout.java
===================================================================
--- trunk/foray/foray-linebreak/src/test/java/org/foray/linebreak/util/DumpLayout.java 2022-02-17 21:27:02 UTC (rev 12601)
+++ trunk/foray/foray-linebreak/src/test/java/org/foray/linebreak/util/DumpLayout.java 2022-02-17 21:51:15 UTC (rev 12602)
@@ -56,7 +56,7 @@
this.output = System.out;
final StringBuilder builder = new StringBuilder();
final int nextBreakIndex = 0;
- for (int leafIndex = 0; leafIndex < branch.qtyParaLeaves(); leafIndex ++) {
+ for (int leafIndex = 0; leafIndex < branch.qtyKpLeaves(); leafIndex ++) {
if (nextBreakIndex < layout.length) {
final int nextBreakLeaf = layout[nextBreakIndex];
if (leafIndex == nextBreakLeaf) {
Modified: trunk/foray/foray-linebreak/src/test/java/org/foray/linebreak/util/DumpParaBranch.java
===================================================================
--- trunk/foray/foray-linebreak/src/test/java/org/foray/linebreak/util/DumpParaBranch.java 2022-02-17 21:27:02 UTC (rev 12601)
+++ trunk/foray/foray-linebreak/src/test/java/org/foray/linebreak/util/DumpParaBranch.java 2022-02-17 21:51:15 UTC (rev 12602)
@@ -63,7 +63,7 @@
for (int nodeIndex = 0; nodeIndex < branch.qtyKpNodes(); nodeIndex ++) {
final KpNode node = branch.kpNodeAt(nodeIndex);
final KpBranch childBranch = KpNode.Type.asBranch(node);
- final int qtyLeaves = childBranch == null ? 1 : childBranch.qtyParaLeaves();
+ final int qtyLeaves = childBranch == null ? 1 : childBranch.qtyKpLeaves();
final int qtyKpLeaves = node.qtyKpLeavesStrict();
final String line = String.format(FORMAT, nodeIndex, startLeafIndex, qtyLeaves, startKpLeafIndex,
qtyKpLeaves, node);
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/DiscretionaryHyphenMutating4a.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/DiscretionaryHyphenMutating4a.java 2022-02-17 21:27:02 UTC (rev 12601)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/DiscretionaryHyphenMutating4a.java 2022-02-17 21:51:15 UTC (rev 12602)
@@ -189,7 +189,7 @@
}
@Override
- public int qtyParaLeaves() {
+ public int qtyKpLeaves() {
return 1;
}
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Punctuation4a.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Punctuation4a.java 2022-02-17 21:27:02 UTC (rev 12601)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Punctuation4a.java 2022-02-17 21:51:15 UTC (rev 12602)
@@ -228,7 +228,7 @@
}
@Override
- public int qtyParaLeaves() {
+ public int qtyKpLeaves() {
return 1;
}
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/SegmentDictionaryWord.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/SegmentDictionaryWord.java 2022-02-17 21:27:02 UTC (rev 12601)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/SegmentDictionaryWord.java 2022-02-17 21:51:15 UTC (rev 12602)
@@ -110,7 +110,7 @@
}
@Override
- public int qtyParaLeaves() {
+ public int qtyKpLeaves() {
return qtyWordComponents();
}
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/StringWord.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/StringWord.java 2022-02-17 21:27:02 UTC (rev 12601)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/StringWord.java 2022-02-17 21:51:15 UTC (rev 12602)
@@ -124,7 +124,7 @@
}
@Override
- public int qtyParaLeaves() {
+ public int qtyKpLeaves() {
/* Each segment is 2 nodes, one for the segment, one for the discretionary hyphen that follows it, except that
* the last segment is not followed by a discretionary hyphen. */
return (2 * this.segments.length) - 1;
@@ -133,7 +133,7 @@
@Override
public KpLeaf kpLeafAt(final int leafIndex) {
if (leafIndex < 0
- || leafIndex >= qtyParaLeaves()) {
+ || leafIndex >= qtyKpLeaves()) {
throw new IndexOutOfBoundsException("Index out of bounds: " + leafIndex);
}
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/StringWordSegmentLatin1.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/StringWordSegmentLatin1.java 2022-02-17 21:27:02 UTC (rev 12601)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/StringWordSegmentLatin1.java 2022-02-17 21:51:15 UTC (rev 12602)
@@ -87,7 +87,7 @@
}
@Override
- public int qtyParaLeaves() {
+ public int qtyKpLeaves() {
return 1;
}
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/StringWordSegmentUtf16.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/StringWordSegmentUtf16.java 2022-02-17 21:27:02 UTC (rev 12601)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/StringWordSegmentUtf16.java 2022-02-17 21:51:15 UTC (rev 12602)
@@ -87,7 +87,7 @@
}
@Override
- public int qtyParaLeaves() {
+ public int qtyKpLeaves() {
return 1;
}
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/TokenFlow4a.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/TokenFlow4a.java 2022-02-17 21:27:02 UTC (rev 12601)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/TokenFlow4a.java 2022-02-17 21:51:15 UTC (rev 12602)
@@ -168,7 +168,7 @@
@Override
public KpLeaf kpLeafAt(final int leafIndex) {
- return KpBranch4a.paraLeafAt(this, leafIndex);
+ return KpBranch4a.kpLeafAt(this, leafIndex);
}
@Override
@@ -187,11 +187,11 @@
}
@Override
- public int qtyParaLeaves() {
+ public int qtyKpLeaves() {
int count = 0;
for (int index = 0; index < this.tokens.size(); index ++) {
final KpNode paraNode = (KpNode) this.tokens.get(index);
- count += paraNode.qtyParaLeaves();
+ count += paraNode.qtyKpLeaves();
}
return count;
}
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Whitespace4a.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Whitespace4a.java 2022-02-17 21:27:02 UTC (rev 12601)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Whitespace4a.java 2022-02-17 21:51:15 UTC (rev 12602)
@@ -169,7 +169,7 @@
}
@Override
- public int qtyParaLeaves() {
+ public int qtyKpLeaves() {
return 1;
}
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/CapitalizedWord.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/CapitalizedWord.java 2022-02-17 21:27:02 UTC (rev 12601)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/CapitalizedWord.java 2022-02-17 21:51:15 UTC (rev 12602)
@@ -102,9 +102,9 @@
}
@Override
- public int qtyParaLeaves() {
+ public int qtyKpLeaves() {
/* Capitalizing the word does not change the number of leaf descendants. */
- return this.getWrappedWord().qtyParaLeaves();
+ return this.getWrappedWord().qtyKpLeaves();
}
@Override
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/DecoratedWord.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/DecoratedWord.java 2022-02-17 21:27:02 UTC (rev 12601)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/DecoratedWord.java 2022-02-17 21:51:15 UTC (rev 12602)
@@ -79,8 +79,8 @@
}
@Override
- public int qtyParaLeaves() {
- return getWrappedWord().qtyParaLeaves();
+ public int qtyKpLeaves() {
+ return getWrappedWord().qtyKpLeaves();
}
@Override
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/ExactWord.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/ExactWord.java 2022-02-17 21:27:02 UTC (rev 12601)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/ExactWord.java 2022-02-17 21:51:15 UTC (rev 12602)
@@ -84,9 +84,9 @@
}
@Override
- public int qtyParaLeaves() {
+ public int qtyKpLeaves() {
/* Changing the case of chars in the word does not change the number of leaf descendants. */
- return this.getWrappedWord().qtyParaLeaves();
+ return this.getWrappedWord().qtyKpLeaves();
}
@Override
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/LatinPast1Word.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/LatinPast1Word.java 2022-02-17 21:27:02 UTC (rev 12601)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/LatinPast1Word.java 2022-02-17 21:51:15 UTC (rev 12602)
@@ -59,17 +59,17 @@
}
@Override
- public int qtyParaLeaves() {
+ public int qtyKpLeaves() {
/* This wrapper should add one leaf descendant to the size of the wrapped word. */
- return this.getWrappedWord().qtyParaLeaves() + 1;
+ return this.getWrappedWord().qtyKpLeaves() + 1;
}
@Override
public KpLeaf kpLeafAt(final int index) {
- if (index < getWrappedWord().qtyParaLeaves()) {
+ if (index < getWrappedWord().qtyKpLeaves()) {
return getWrappedWord().kpLeafAt(index);
}
- if (index == getWrappedWord().qtyParaLeaves()) {
+ if (index == getWrappedWord().qtyKpLeaves()) {
return SUFFIX;
}
throw new IndexOutOfBoundsException("Index out of bounds: " + index);
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/LatinPlural1Word.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/LatinPlural1Word.java 2022-02-17 21:27:02 UTC (rev 12601)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/LatinPlural1Word.java 2022-02-17 21:51:15 UTC (rev 12602)
@@ -92,9 +92,9 @@
}
@Override
- public int qtyParaLeaves() {
+ public int qtyKpLeaves() {
/* We think this wrapper should not change the number of leaf descendants. */
- return getWrappedWord().qtyParaLeaves();
+ return getWrappedWord().qtyKpLeaves();
}
@Override
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/LatinPlural2Word.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/LatinPlural2Word.java 2022-02-17 21:27:02 UTC (rev 12601)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/LatinPlural2Word.java 2022-02-17 21:51:15 UTC (rev 12602)
@@ -95,9 +95,9 @@
}
@Override
- public int qtyParaLeaves() {
+ public int qtyKpLeaves() {
/* We think this wrapper should not change the number of leaf descendants. */
- return getWrappedWord().qtyParaLeaves();
+ return getWrappedWord().qtyKpLeaves();
}
@Override
@@ -107,7 +107,7 @@
@Override
public int qtyKpLeavesStrict() {
- return getWrappedWord().qtyParaLeaves() + LatinPlural2Word.Segment.SIZE_DIFFERENCE;
+ return getWrappedWord().qtyKpLeaves() + LatinPlural2Word.Segment.SIZE_DIFFERENCE;
}
@Override
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/LatinPossessive1Word.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/LatinPossessive1Word.java 2022-02-17 21:27:02 UTC (rev 12601)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/LatinPossessive1Word.java 2022-02-17 21:51:15 UTC (rev 12602)
@@ -93,9 +93,9 @@
}
@Override
- public int qtyParaLeaves() {
+ public int qtyKpLeaves() {
/* We think this wrapper should not change the number of leaf descendants. */
- return getWrappedWord().qtyParaLeaves();
+ return getWrappedWord().qtyKpLeaves();
}
@Override
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/LatinPossessive2Word.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/LatinPossessive2Word.java 2022-02-17 21:27:02 UTC (rev 12601)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/LatinPossessive2Word.java 2022-02-17 21:51:15 UTC (rev 12602)
@@ -93,9 +93,9 @@
}
@Override
- public int qtyParaLeaves() {
+ public int qtyKpLeaves() {
/* We think this wrapper should not change the number of leaf descendants. */
- return this.getWrappedWord().qtyParaLeaves();
+ return this.getWrappedWord().qtyKpLeaves();
}
@Override
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/UppercaseWord.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/UppercaseWord.java 2022-02-17 21:27:02 UTC (rev 12601)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/UppercaseWord.java 2022-02-17 21:51:15 UTC (rev 12602)
@@ -93,9 +93,9 @@
}
@Override
- public int qtyParaLeaves() {
+ public int qtyKpLeaves() {
/* Converting the word to uppercase does not change the number of leaf descendants. */
- return getWrappedWord().qtyParaLeaves();
+ return getWrappedWord().qtyKpLeaves();
}
@Override
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-02-17 21:27:05
|
Revision: 12601
http://sourceforge.net/p/foray/code/12601
Author: victormote
Date: 2022-02-17 21:27:02 +0000 (Thu, 17 Feb 2022)
Log Message:
-----------
Conform to aXSL changes: Rename methods, for consistency.
Modified Paths:
--------------
trunk/foray/foray-common/src/main/java/org/foray/common/kp/KpBox4a.java
trunk/foray/foray-common/src/main/java/org/foray/common/kp/KpBoxChars4a.java
trunk/foray/foray-common/src/main/java/org/foray/common/kp/KpBranch4a.java
trunk/foray/foray-common/src/main/java/org/foray/common/kp/KpGlue4a.java
trunk/foray/foray-common/src/main/java/org/foray/common/kp/KpGlueChars4a.java
trunk/foray/foray-common/src/main/java/org/foray/common/kp/KpLeaf4a.java
trunk/foray/foray-common/src/main/java/org/foray/common/kp/KpLeafIterator4a.java
trunk/foray/foray-common/src/main/java/org/foray/common/kp/KpPenalty4a.java
trunk/foray/foray-common/src/main/java/org/foray/common/kp/KpPenaltyChars4a.java
trunk/foray/foray-common/src/test/java/org/foray/common/para/ParaBranch4aTests.java
trunk/foray/foray-content/src/main/java/org/foray/content/ContentTree4a.java
trunk/foray/foray-content/src/main/java/org/foray/content/IndivisibleContent4a.java
trunk/foray/foray-content/src/main/java/org/foray/content/TextTokensContent4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BlockDiscrete4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoTextWords4a.java
trunk/foray/foray-linebreak/src/main/java/org/foray/linebreak/FirstFitLb.java
trunk/foray/foray-linebreak/src/main/java/org/foray/linebreak/ParaContentIterator.java
trunk/foray/foray-linebreak/src/main/java/org/foray/linebreak/TotalFitLb.java
trunk/foray/foray-linebreak/src/test/java/org/foray/linebreak/LineBreaker4aTests.java
trunk/foray/foray-linebreak/src/test/java/org/foray/linebreak/util/DumpLayout.java
trunk/foray/foray-linebreak/src/test/java/org/foray/linebreak/util/DumpParaBranch.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/DiscretionaryHyphen4a.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/DiscretionaryHyphenMutating4a.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Punctuation4a.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/SegmentDictionaryWord.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/StringWord.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/StringWordSegmentLatin1.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/StringWordSegmentUtf16.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/TokenFlow4a.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Whitespace4a.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Word4a.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/WordSegment4a.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/CapitalizedWord.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/DecoratedWord.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/ExactWord.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/LatinPast1Word.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/LatinPlural1Word.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/LatinPlural2Word.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/LatinPossessive1Word.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/LatinPossessive2Word.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/UppercaseWord.java
trunk/foray/foray-orthography/src/test/java/org/foray/orthography/SegmentDictionaryWordTests.java
trunk/foray/foray-orthography/src/test/java/org/foray/orthography/StringWordTests.java
trunk/foray/foray-orthography/src/test/java/org/foray/orthography/WordWrapperTests.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/BlockDiscretePnr.java
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/kp/KpBox4a.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/kp/KpBox4a.java 2022-02-17 19:10:22 UTC (rev 12600)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/kp/KpBox4a.java 2022-02-17 21:27:02 UTC (rev 12601)
@@ -55,7 +55,7 @@
}
@Override
- public KpLeaf.Type getParaLeafType() {
+ public KpLeaf.Type getKpLeafType() {
return KpLeaf.Type.BOX;
}
@@ -80,7 +80,7 @@
}
@Override
- public int qtyKpLeaves() {
+ public int qtyKpLeavesStrict() {
return 1;
}
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/kp/KpBoxChars4a.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/kp/KpBoxChars4a.java 2022-02-17 19:10:22 UTC (rev 12600)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/kp/KpBoxChars4a.java 2022-02-17 21:27:02 UTC (rev 12601)
@@ -55,7 +55,7 @@
}
@Override
- public KpLeaf.Type getParaLeafType() {
+ public KpLeaf.Type getKpLeafType() {
return KpLeaf.Type.BOX;
}
@@ -80,7 +80,7 @@
}
@Override
- public int qtyKpLeaves() {
+ public int qtyKpLeavesStrict() {
return this.chars.length();
}
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/kp/KpBranch4a.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/kp/KpBranch4a.java 2022-02-17 19:10:22 UTC (rev 12600)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/kp/KpBranch4a.java 2022-02-17 21:27:02 UTC (rev 12601)
@@ -57,17 +57,17 @@
}
@Override
- public Type getParaNodeType() {
+ public Type getKpNodeType() {
return KpNode.Type.BRANCH;
}
@Override
- public int qtyParaNodes() {
+ public int qtyKpNodes() {
return this.nodes.size();
}
@Override
- public KpNode paraNodeAt(final int nodeIndex) {
+ public KpNode kpNodeAt(final int nodeIndex) {
return this.nodes.get(nodeIndex);
}
@@ -74,8 +74,8 @@
@Override
public int qtyParaLeaves() {
int returnValue = 0;
- for (int nodeIndex = 0; nodeIndex < qtyParaNodes(); nodeIndex ++) {
- final KpNode node = paraNodeAt(nodeIndex);
+ for (int nodeIndex = 0; nodeIndex < qtyKpNodes(); nodeIndex ++) {
+ final KpNode node = kpNodeAt(nodeIndex);
final KpBranch childBranch = KpNode.Type.asBranch(node);
if (childBranch == null) {
/* Child node is a leaf. */
@@ -93,12 +93,12 @@
* @param branch The branch whose leaf nodes are being searched.
* @param leafIndex The index to the leaf of {@code branch} to be returned.
* @return The leaf of {@code branch} at index {@code leafIndex}.
- * @see KpBranch#paraLeafAt(int)
+ * @see KpBranch#kpLeafAt(int)
*/
public static KpLeaf paraLeafAt(final KpBranch branch, final int leafIndex) {
int runningLeafIndex = 0;
- for (int nodeIndex = 0; nodeIndex < branch.qtyParaNodes(); nodeIndex ++) {
- final KpNode node = branch.paraNodeAt(nodeIndex);
+ for (int nodeIndex = 0; nodeIndex < branch.qtyKpNodes(); nodeIndex ++) {
+ final KpNode node = branch.kpNodeAt(nodeIndex);
final KpBranch childBranch = KpNode.Type.asBranch(node);
if (runningLeafIndex == leafIndex) {
@@ -106,7 +106,7 @@
if (leaf != null) {
return leaf;
} else {
- return childBranch.paraLeafAt(0);
+ return childBranch.kpLeafAt(0);
}
}
@@ -116,7 +116,7 @@
if (newRunningLeafIndex > leafIndex) {
/* The leafIndex is a descendant of this node. */
final int relativeLeafIndex = leafIndex - runningLeafIndex;
- return childBranch.paraLeafAt(relativeLeafIndex);
+ return childBranch.kpLeafAt(relativeLeafIndex);
}
runningLeafIndex = newRunningLeafIndex;
@@ -125,23 +125,23 @@
}
@Override
- public KpLeaf paraLeafAt(final int leafIndex) {
+ public KpLeaf kpLeafAt(final int leafIndex) {
return paraLeafAt(this, leafIndex);
}
@Override
- public int qtyKpLeaves() {
+ public int qtyKpLeavesStrict() {
int returnValue = 0;
- for (int nodeIndex = 0; nodeIndex < qtyParaNodes(); nodeIndex ++) {
- final KpNode node = paraNodeAt(nodeIndex);
+ for (int nodeIndex = 0; nodeIndex < qtyKpNodes(); nodeIndex ++) {
+ final KpNode node = kpNodeAt(nodeIndex);
final KpBranch childBranch = KpNode.Type.asBranch(node);
if (childBranch == null) {
/* Child node is a leaf. */
final KpLeaf leaf = (KpLeaf) node;
- returnValue += leaf.qtyKpLeaves();
+ returnValue += leaf.qtyKpLeavesStrict();
} else {
/* Child node is a branch. */
- returnValue += childBranch.qtyKpLeaves();
+ returnValue += childBranch.qtyKpLeavesStrict();
}
}
return returnValue;
@@ -168,7 +168,7 @@
public CharSequence getText() {
final StringBuilder builder = new StringBuilder();
for (int leafIndex = 0; leafIndex < qtyParaLeaves(); leafIndex ++) {
- final KpLeaf leaf = paraLeafAt(leafIndex);
+ final KpLeaf leaf = kpLeafAt(leafIndex);
builder.append(leaf.getText());
}
return builder.toString();
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/kp/KpGlue4a.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/kp/KpGlue4a.java 2022-02-17 19:10:22 UTC (rev 12600)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/kp/KpGlue4a.java 2022-02-17 21:27:02 UTC (rev 12601)
@@ -68,7 +68,7 @@
}
@Override
- public KpLeaf.Type getParaLeafType() {
+ public KpLeaf.Type getKpLeafType() {
return KpLeaf.Type.GLUE;
}
@@ -93,7 +93,7 @@
}
@Override
- public int qtyKpLeaves() {
+ public int qtyKpLeavesStrict() {
return 1;
}
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/kp/KpGlueChars4a.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/kp/KpGlueChars4a.java 2022-02-17 19:10:22 UTC (rev 12600)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/kp/KpGlueChars4a.java 2022-02-17 21:27:02 UTC (rev 12601)
@@ -62,7 +62,7 @@
}
@Override
- public KpLeaf.Type getParaLeafType() {
+ public KpLeaf.Type getKpLeafType() {
return KpLeaf.Type.GLUE;
}
@@ -87,7 +87,7 @@
}
@Override
- public int qtyKpLeaves() {
+ public int qtyKpLeavesStrict() {
return this.chars.length();
}
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/kp/KpLeaf4a.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/kp/KpLeaf4a.java 2022-02-17 19:10:22 UTC (rev 12600)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/kp/KpLeaf4a.java 2022-02-17 21:27:02 UTC (rev 12601)
@@ -37,12 +37,12 @@
public abstract class KpLeaf4a implements KpLeaf {
@Override
- public KpNode.Type getParaNodeType() {
+ public KpNode.Type getKpNodeType() {
return KpNode.Type.LEAF;
}
@Override
- public int qtyParaNodes() {
+ public int qtyKpNodes() {
return 0;
}
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/kp/KpLeafIterator4a.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/kp/KpLeafIterator4a.java 2022-02-17 19:10:22 UTC (rev 12600)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/kp/KpLeafIterator4a.java 2022-02-17 21:27:02 UTC (rev 12601)
@@ -146,13 +146,13 @@
int index = 0;
while (index < this.branchIndexes.length() - 1) {
final int branchIndex = this.branchIndexes.intAt(index);
- branch = (KpBranch) branch.paraNodeAt(branchIndex);
+ branch = (KpBranch) branch.kpNodeAt(branchIndex);
index ++;
}
/* Variable "index" should now be pointed at the top of the stack, which should be the index to the leaf node
* that we want. */
final int branchIndex = this.branchIndexes.intAt(index);
- return branch.paraNodeAt(branchIndex);
+ return branch.kpNodeAt(branchIndex);
}
@Override
@@ -214,7 +214,7 @@
*/
public boolean isCursorPastEnd() {
return this.branchIndexes.length() == 1
- && this.branchIndexes.peek() >= this.branchStack.peek().qtyParaNodes();
+ && this.branchIndexes.peek() >= this.branchStack.peek().qtyKpNodes();
}
/**
@@ -229,12 +229,12 @@
KpBranch currentBranch = this.branchStack.peek();
int nextIndex = this.branchIndexes.peek();
- while (nextIndex >= currentBranch.qtyParaNodes()) {
+ while (nextIndex >= currentBranch.qtyKpNodes()) {
if (this.branchStack.size() == 1) {
/* We are at the bottom of the stack. Do NOT pop the bottom element, but do mark its index and
* bail out. This is a valid state for the cursor, not any error condition. */
this.branchIndexes.pop();
- this.branchIndexes.push(currentBranch.qtyParaNodes());
+ this.branchIndexes.push(currentBranch.qtyKpNodes());
return;
} else {
this.branchStack.pop();
@@ -247,7 +247,7 @@
/* The cursor is sitting at a valid node. */
final KpNode node = this.nodeAtCursor();
- if (node.getParaNodeType() == KpNode.Type.LEAF) {
+ if (node.getKpNodeType() == KpNode.Type.LEAF) {
/* The node is a leaf node. The cursor is where we want it. */
return;
}
@@ -286,7 +286,7 @@
/* The cursor is sitting at a valid node. */
final KpNode node = this.nodeAtCursor();
- if (node.getParaNodeType() == KpNode.Type.LEAF) {
+ if (node.getKpNodeType() == KpNode.Type.LEAF) {
/* The node is a leaf node. The cursor is where we want it. */
return;
}
@@ -295,7 +295,7 @@
* leaf node. */
final KpBranch branch = (KpBranch) node;
this.branchStack.push(branch);
- this.branchIndexes.push(branch.qtyParaNodes());
+ this.branchIndexes.push(branch.qtyKpNodes());
cursorPreviousLeaf();
}
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/kp/KpPenalty4a.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/kp/KpPenalty4a.java 2022-02-17 19:10:22 UTC (rev 12600)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/kp/KpPenalty4a.java 2022-02-17 21:27:02 UTC (rev 12601)
@@ -78,7 +78,7 @@
}
@Override
- public KpLeaf.Type getParaLeafType() {
+ public KpLeaf.Type getKpLeafType() {
return KpLeaf.Type.PENALTY;
}
@@ -118,7 +118,7 @@
}
@Override
- public int qtyKpLeaves() {
+ public int qtyKpLeavesStrict() {
return 1;
}
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/kp/KpPenaltyChars4a.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/kp/KpPenaltyChars4a.java 2022-02-17 19:10:22 UTC (rev 12600)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/kp/KpPenaltyChars4a.java 2022-02-17 21:27:02 UTC (rev 12601)
@@ -64,7 +64,7 @@
}
@Override
- public KpLeaf.Type getParaLeafType() {
+ public KpLeaf.Type getKpLeafType() {
return KpLeaf.Type.PENALTY;
}
@@ -104,7 +104,7 @@
}
@Override
- public int qtyKpLeaves() {
+ public int qtyKpLeavesStrict() {
return this.chars.length();
}
Modified: trunk/foray/foray-common/src/test/java/org/foray/common/para/ParaBranch4aTests.java
===================================================================
--- trunk/foray/foray-common/src/test/java/org/foray/common/para/ParaBranch4aTests.java 2022-02-17 19:10:22 UTC (rev 12600)
+++ trunk/foray/foray-common/src/test/java/org/foray/common/para/ParaBranch4aTests.java 2022-02-17 21:27:02 UTC (rev 12601)
@@ -125,67 +125,67 @@
final KpBranch4a out = createTestPara();
/* Test the /node/ count. */
- Assert.assertEquals(39, out.qtyParaNodes());
+ Assert.assertEquals(39, out.qtyKpNodes());
/* Test the /nodes/ at each end, and one in the middle. */
- Assert.assertEquals("Be", out.paraNodeAt(0).getText());
- Assert.assertEquals("them.", out.paraNodeAt(38).getText());
- Assert.assertEquals("born", out.paraNodeAt(15).getText());
+ Assert.assertEquals("Be", out.kpNodeAt(0).getText());
+ Assert.assertEquals("them.", out.kpNodeAt(38).getText());
+ Assert.assertEquals("born", out.kpNodeAt(15).getText());
/* Most nodes are exactly one leaf. 3 lines each add an additional 2 leaves each, adding 6 leaves. */
Assert.assertEquals(50, out.qtyParaLeaves());
/* Test the /leaves/ at each end. */
- Assert.assertEquals("B", out.paraLeafAt(0).getText());
- Assert.assertEquals("e", out.paraLeafAt(1).getText());
- Assert.assertEquals(" ", out.paraLeafAt(2).getText());
- Assert.assertEquals("not", out.paraLeafAt(3).getText());
- Assert.assertEquals(" ", out.paraLeafAt(4).getText());
- Assert.assertEquals("afraid", out.paraLeafAt(5).getText());
- Assert.assertEquals(" ", out.paraLeafAt(6).getText());
- Assert.assertEquals("of", out.paraLeafAt(7).getText());
- Assert.assertEquals(" ", out.paraLeafAt(8).getText());
- Assert.assertEquals("great", out.paraLeafAt(9).getText());
- Assert.assertEquals("-", out.paraLeafAt(10).getText());
- Assert.assertEquals("ness", out.paraLeafAt(11).getText());
- Assert.assertEquals(".", out.paraLeafAt(12).getText());
- Assert.assertEquals(" ", out.paraLeafAt(13).getText());
- Assert.assertEquals("Some", out.paraLeafAt(14).getText());
- Assert.assertEquals(" ", out.paraLeafAt(15).getText());
- Assert.assertEquals("are", out.paraLeafAt(16).getText());
- Assert.assertEquals(" ", out.paraLeafAt(17).getText());
- Assert.assertEquals("born", out.paraLeafAt(18).getText());
- Assert.assertEquals(" ", out.paraLeafAt(19).getText());
- Assert.assertEquals("great,", out.paraLeafAt(20).getText());
- Assert.assertEquals(" ", out.paraLeafAt(21).getText());
- Assert.assertEquals("some", out.paraLeafAt(22).getText());
- Assert.assertEquals(" ", out.paraLeafAt(23).getText());
- Assert.assertEquals("achieve", out.paraLeafAt(24).getText());
- Assert.assertEquals(" ", out.paraLeafAt(25).getText());
- Assert.assertEquals("great", out.paraLeafAt(26).getText());
- Assert.assertEquals("-", out.paraLeafAt(27).getText());
- Assert.assertEquals("ness", out.paraLeafAt(28).getText());
- Assert.assertEquals(",", out.paraLeafAt(29).getText());
- Assert.assertEquals(" ", out.paraLeafAt(30).getText());
- Assert.assertEquals("and", out.paraLeafAt(31).getText());
- Assert.assertEquals(" ", out.paraLeafAt(32).getText());
- Assert.assertEquals("some", out.paraLeafAt(33).getText());
- Assert.assertEquals(" ", out.paraLeafAt(34).getText());
- Assert.assertEquals("have", out.paraLeafAt(35).getText());
- Assert.assertEquals(" ", out.paraLeafAt(36).getText());
- Assert.assertEquals("great", out.paraLeafAt(37).getText());
- Assert.assertEquals("-", out.paraLeafAt(38).getText());
- Assert.assertEquals("ness", out.paraLeafAt(39).getText());
- Assert.assertEquals(" ", out.paraLeafAt(40).getText());
- Assert.assertEquals("thrust", out.paraLeafAt(41).getText());
- Assert.assertEquals(" ", out.paraLeafAt(42).getText());
- Assert.assertEquals("upon", out.paraLeafAt(43).getText());
- Assert.assertEquals(" ", out.paraLeafAt(44).getText());
- Assert.assertEquals("t", out.paraLeafAt(45).getText());
- Assert.assertEquals("h", out.paraLeafAt(46).getText());
- Assert.assertEquals("e", out.paraLeafAt(47).getText());
- Assert.assertEquals("m", out.paraLeafAt(48).getText());
- Assert.assertEquals(".", out.paraLeafAt(49).getText());
+ Assert.assertEquals("B", out.kpLeafAt(0).getText());
+ Assert.assertEquals("e", out.kpLeafAt(1).getText());
+ Assert.assertEquals(" ", out.kpLeafAt(2).getText());
+ Assert.assertEquals("not", out.kpLeafAt(3).getText());
+ Assert.assertEquals(" ", out.kpLeafAt(4).getText());
+ Assert.assertEquals("afraid", out.kpLeafAt(5).getText());
+ Assert.assertEquals(" ", out.kpLeafAt(6).getText());
+ Assert.assertEquals("of", out.kpLeafAt(7).getText());
+ Assert.assertEquals(" ", out.kpLeafAt(8).getText());
+ Assert.assertEquals("great", out.kpLeafAt(9).getText());
+ Assert.assertEquals("-", out.kpLeafAt(10).getText());
+ Assert.assertEquals("ness", out.kpLeafAt(11).getText());
+ Assert.assertEquals(".", out.kpLeafAt(12).getText());
+ Assert.assertEquals(" ", out.kpLeafAt(13).getText());
+ Assert.assertEquals("Some", out.kpLeafAt(14).getText());
+ Assert.assertEquals(" ", out.kpLeafAt(15).getText());
+ Assert.assertEquals("are", out.kpLeafAt(16).getText());
+ Assert.assertEquals(" ", out.kpLeafAt(17).getText());
+ Assert.assertEquals("born", out.kpLeafAt(18).getText());
+ Assert.assertEquals(" ", out.kpLeafAt(19).getText());
+ Assert.assertEquals("great,", out.kpLeafAt(20).getText());
+ Assert.assertEquals(" ", out.kpLeafAt(21).getText());
+ Assert.assertEquals("some", out.kpLeafAt(22).getText());
+ Assert.assertEquals(" ", out.kpLeafAt(23).getText());
+ Assert.assertEquals("achieve", out.kpLeafAt(24).getText());
+ Assert.assertEquals(" ", out.kpLeafAt(25).getText());
+ Assert.assertEquals("great", out.kpLeafAt(26).getText());
+ Assert.assertEquals("-", out.kpLeafAt(27).getText());
+ Assert.assertEquals("ness", out.kpLeafAt(28).getText());
+ Assert.assertEquals(",", out.kpLeafAt(29).getText());
+ Assert.assertEquals(" ", out.kpLeafAt(30).getText());
+ Assert.assertEquals("and", out.kpLeafAt(31).getText());
+ Assert.assertEquals(" ", out.kpLeafAt(32).getText());
+ Assert.assertEquals("some", out.kpLeafAt(33).getText());
+ Assert.assertEquals(" ", out.kpLeafAt(34).getText());
+ Assert.assertEquals("have", out.kpLeafAt(35).getText());
+ Assert.assertEquals(" ", out.kpLeafAt(36).getText());
+ Assert.assertEquals("great", out.kpLeafAt(37).getText());
+ Assert.assertEquals("-", out.kpLeafAt(38).getText());
+ Assert.assertEquals("ness", out.kpLeafAt(39).getText());
+ Assert.assertEquals(" ", out.kpLeafAt(40).getText());
+ Assert.assertEquals("thrust", out.kpLeafAt(41).getText());
+ Assert.assertEquals(" ", out.kpLeafAt(42).getText());
+ Assert.assertEquals("upon", out.kpLeafAt(43).getText());
+ Assert.assertEquals(" ", out.kpLeafAt(44).getText());
+ Assert.assertEquals("t", out.kpLeafAt(45).getText());
+ Assert.assertEquals("h", out.kpLeafAt(46).getText());
+ Assert.assertEquals("e", out.kpLeafAt(47).getText());
+ Assert.assertEquals("m", out.kpLeafAt(48).getText());
+ Assert.assertEquals(".", out.kpLeafAt(49).getText());
}
}
Modified: trunk/foray/foray-content/src/main/java/org/foray/content/ContentTree4a.java
===================================================================
--- trunk/foray/foray-content/src/main/java/org/foray/content/ContentTree4a.java 2022-02-17 19:10:22 UTC (rev 12600)
+++ trunk/foray/foray-content/src/main/java/org/foray/content/ContentTree4a.java 2022-02-17 21:27:02 UTC (rev 12601)
@@ -107,12 +107,12 @@
}
@Override
- public Type getParaNodeType() {
+ public Type getKpNodeType() {
return Type.BRANCH;
}
@Override
- public int qtyParaNodes() {
+ public int qtyKpNodes() {
int count = 0;
for (int index = 0; index < this.children.size(); index ++) {
final Content content = this.children.get(index);
@@ -124,7 +124,7 @@
}
@Override
- public KpNode paraNodeAt(final int nodeIndex) {
+ public KpNode kpNodeAt(final int nodeIndex) {
int count = 0;
for (int index = 0; index < this.children.size(); index ++) {
final Content content = this.children.get(index);
@@ -136,7 +136,7 @@
count ++;
}
}
- throw new MarkedIndexOutOfBoundsException(nodeIndex, qtyParaNodes());
+ throw new MarkedIndexOutOfBoundsException(nodeIndex, qtyKpNodes());
}
@Override
@@ -153,7 +153,7 @@
}
@Override
- public KpLeaf paraLeafAt(final int leafIndex) {
+ public KpLeaf kpLeafAt(final int leafIndex) {
int leafCount = 0;
for (int index = 0; index < this.children.size(); index ++) {
final Content content = this.children.get(index);
@@ -166,7 +166,7 @@
}
final KpBranch branch = (KpBranch) node;
final int localIndex = leafCount - leafIndex;
- return branch.paraLeafAt(localIndex);
+ return branch.kpLeafAt(localIndex);
}
}
}
@@ -174,13 +174,13 @@
}
@Override
- public int qtyKpLeaves() {
+ public int qtyKpLeavesStrict() {
int count = 0;
for (int index = 0; index < this.children.size(); index ++) {
final Content content = this.children.get(index);
if (content instanceof KpNode) {
final KpNode node = (KpNode) content;
- count += node.qtyKpLeaves();
+ count += node.qtyKpLeavesStrict();
}
}
return count;
Modified: trunk/foray/foray-content/src/main/java/org/foray/content/IndivisibleContent4a.java
===================================================================
--- trunk/foray/foray-content/src/main/java/org/foray/content/IndivisibleContent4a.java 2022-02-17 19:10:22 UTC (rev 12600)
+++ trunk/foray/foray-content/src/main/java/org/foray/content/IndivisibleContent4a.java 2022-02-17 21:27:02 UTC (rev 12601)
@@ -47,7 +47,7 @@
}
@Override
- public Type getParaLeafType() {
+ public Type getKpLeafType() {
return KpLeaf.Type.BOX;
}
@@ -71,12 +71,12 @@
}
@Override
- public org.axsl.kp.KpNode.Type getParaNodeType() {
+ public org.axsl.kp.KpNode.Type getKpNodeType() {
return org.axsl.kp.KpNode.Type.LEAF;
}
@Override
- public int qtyParaNodes() {
+ public int qtyKpNodes() {
return 0;
}
@@ -86,7 +86,7 @@
}
@Override
- public int qtyKpLeaves() {
+ public int qtyKpLeavesStrict() {
return 0;
}
Modified: trunk/foray/foray-content/src/main/java/org/foray/content/TextTokensContent4a.java
===================================================================
--- trunk/foray/foray-content/src/main/java/org/foray/content/TextTokensContent4a.java 2022-02-17 19:10:22 UTC (rev 12600)
+++ trunk/foray/foray-content/src/main/java/org/foray/content/TextTokensContent4a.java 2022-02-17 21:27:02 UTC (rev 12601)
@@ -73,20 +73,20 @@
}
@Override
- public Type getParaNodeType() {
+ public Type getKpNodeType() {
return KpNode.Type.BRANCH;
}
@Override
- public int qtyParaNodes() {
+ public int qtyKpNodes() {
/* Pass-through. */
- return getTokenFlow().qtyParaNodes();
+ return getTokenFlow().qtyKpNodes();
}
@Override
- public KpNode paraNodeAt(final int nodeIndex) {
+ public KpNode kpNodeAt(final int nodeIndex) {
/* Pass-through. */
- return getTokenFlow().paraNodeAt(nodeIndex);
+ return getTokenFlow().kpNodeAt(nodeIndex);
}
@Override
@@ -96,9 +96,9 @@
}
@Override
- public KpLeaf paraLeafAt(final int leafIndex) {
+ public KpLeaf kpLeafAt(final int leafIndex) {
/* Pass-through. */
- return getTokenFlow().paraLeafAt(leafIndex);
+ return getTokenFlow().kpLeafAt(leafIndex);
}
@Override
@@ -109,9 +109,9 @@
}
@Override
- public int qtyKpLeaves() {
+ public int qtyKpLeavesStrict() {
/* Pass-through. */
- return getTokenFlow().qtyKpLeaves();
+ return getTokenFlow().qtyKpLeavesStrict();
}
@Override
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BlockDiscrete4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BlockDiscrete4a.java 2022-02-17 19:10:22 UTC (rev 12600)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BlockDiscrete4a.java 2022-02-17 21:27:02 UTC (rev 12601)
@@ -192,7 +192,7 @@
}
@Override
- public int qtyParaNodes() {
+ public int qtyKpNodes() {
int count = 0;
for (int index = 0; index < this.children.size(); index ++) {
final FoObj child = this.children.get(index);
@@ -204,7 +204,7 @@
}
@Override
- public KpNode paraNodeAt(final int nodeIndex) {
+ public KpNode kpNodeAt(final int nodeIndex) {
int count = 0;
for (int index = 0; index < this.children.size(); index ++) {
final FoObj child = this.children.get(index);
@@ -221,8 +221,8 @@
@Override
public int qtyParaLeaves() {
int count = 0;
- for (int nodeIndex = 0; nodeIndex < qtyParaNodes(); nodeIndex ++) {
- final KpNode node = paraNodeAt(nodeIndex);
+ for (int nodeIndex = 0; nodeIndex < qtyKpNodes(); nodeIndex ++) {
+ final KpNode node = kpNodeAt(nodeIndex);
final KpBranch branch = KpNode.Type.asBranch(node);
if (branch == null) {
count ++;
@@ -234,13 +234,13 @@
}
@Override
- public KpLeaf paraLeafAt(final int leafIndex) {
+ public KpLeaf kpLeafAt(final int leafIndex) {
if (leafIndex < 0) {
throw new IndexOutOfBoundsException();
}
int totalLength = 0;
- for (int nodeIndex = 0; nodeIndex < qtyParaNodes(); nodeIndex ++) {
- final KpNode node = paraNodeAt(nodeIndex);
+ for (int nodeIndex = 0; nodeIndex < qtyKpNodes(); nodeIndex ++) {
+ final KpNode node = kpNodeAt(nodeIndex);
final KpBranch branch = KpNode.Type.asBranch(node);
if (branch == null) {
/* Node is a leaf. */
@@ -255,7 +255,7 @@
totalLength += currentLength;
if (totalLength > leafIndex) {
final int currentIndex = leafIndex - (totalLength - currentLength);
- return branch.paraLeafAt(currentIndex);
+ return branch.kpLeafAt(currentIndex);
}
}
}
@@ -268,12 +268,12 @@
}
@Override
- public Type getParaNodeType() {
+ public Type getKpNodeType() {
return KpNode.Type.BRANCH;
}
@Override
- public int qtyKpLeaves() {
+ public int qtyKpLeavesStrict() {
/* TODO: Support this. */
throw new UnsupportedOperationException();
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoTextWords4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoTextWords4a.java 2022-02-17 19:10:22 UTC (rev 12600)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoTextWords4a.java 2022-02-17 21:27:02 UTC (rev 12601)
@@ -100,7 +100,7 @@
public CharSequence getRawText() {
final StringBuilder builder = new StringBuilder();
for (int nodeIndex = 0; nodeIndex < this.tokenFlow.qtyTokens(); nodeIndex ++) {
- final KpNode node = this.tokenFlow.paraNodeAt(nodeIndex);
+ final KpNode node = this.tokenFlow.kpNodeAt(nodeIndex);
builder.append(node.getText());
}
return builder.toString();
@@ -117,17 +117,17 @@
}
@Override
- public Type getParaNodeType() {
+ public Type getKpNodeType() {
return Type.BRANCH;
}
@Override
- public int qtyParaNodes() {
+ public int qtyKpNodes() {
return 1;
}
@Override
- public KpNode paraNodeAt(final int nodeIndex) {
+ public KpNode kpNodeAt(final int nodeIndex) {
if (nodeIndex == 0) {
return this.tokenFlow;
}
@@ -140,13 +140,13 @@
}
@Override
- public KpLeaf paraLeafAt(final int leafIndex) {
- return this.tokenFlow.paraLeafAt(leafIndex);
+ public KpLeaf kpLeafAt(final int leafIndex) {
+ return this.tokenFlow.kpLeafAt(leafIndex);
}
@Override
- public int qtyKpLeaves() {
- return this.tokenFlow.qtyKpLeaves();
+ public int qtyKpLeavesStrict() {
+ return this.tokenFlow.qtyKpLeavesStrict();
}
@Override
Modified: trunk/foray/foray-linebreak/src/main/java/org/foray/linebreak/FirstFitLb.java
===================================================================
--- trunk/foray/foray-linebreak/src/main/java/org/foray/linebreak/FirstFitLb.java 2022-02-17 19:10:22 UTC (rev 12600)
+++ trunk/foray/foray-linebreak/src/main/java/org/foray/linebreak/FirstFitLb.java 2022-02-17 21:27:02 UTC (rev 12601)
@@ -142,7 +142,7 @@
private void addProvisionalNonGlue(final KpLeaf leaf) {
provisionalNonGlue.add(leaf);
/* Do not include the width of penalty items. */
- if (leaf.getParaLeafType() == KpLeaf.Type.BOX) {
+ if (leaf.getKpLeafType() == KpLeaf.Type.BOX) {
final int leafWidth = leaf.getIdealWidth(this.leafIterator.getNearestContext());
provisionalNonGlueIdealWidth += leafWidth;
}
Modified: trunk/foray/foray-linebreak/src/main/java/org/foray/linebreak/ParaContentIterator.java
===================================================================
--- trunk/foray/foray-linebreak/src/main/java/org/foray/linebreak/ParaContentIterator.java 2022-02-17 19:10:22 UTC (rev 12600)
+++ trunk/foray/foray-linebreak/src/main/java/org/foray/linebreak/ParaContentIterator.java 2022-02-17 21:27:02 UTC (rev 12601)
@@ -68,9 +68,9 @@
this.nodeStack.push(paraContent);
/* Push the first child of the root node, if any, on the stack. This is the first item to be returned.
* Push its index onto the currentPath. */
- if (paraContent.qtyParaNodes() > 0) {
+ if (paraContent.qtyKpNodes() > 0) {
currentPath.push(0);
- this.nodeStack.push(paraContent.paraNodeAt(0));
+ this.nodeStack.push(paraContent.kpNodeAt(0));
}
}
@@ -91,9 +91,9 @@
/* Set up the next item (if any) here. */
if (returnParaBranch != null
- && returnParaBranch.qtyParaNodes() > 0) {
+ && returnParaBranch.qtyKpNodes() > 0) {
/* The return value has children. Put the first one on the stack. */
- this.nodeStack.push(returnParaBranch.paraNodeAt(0));
+ this.nodeStack.push(returnParaBranch.kpNodeAt(0));
this.currentPath.push(0);
} else {
KpNode nextNode = null;
@@ -112,8 +112,8 @@
final int nextIndex = this.currentPath.peek() + 1;
this.currentPath.pop();
if (topParaBranch != null
- && nextIndex < topParaBranch.qtyParaNodes()) {
- nextNode = topParaBranch.paraNodeAt(nextIndex);
+ && nextIndex < topParaBranch.qtyKpNodes()) {
+ nextNode = topParaBranch.kpNodeAt(nextIndex);
this.nodeStack.push(nextNode);
this.currentPath.push(nextIndex);
}
Modified: trunk/foray/foray-linebreak/src/main/java/org/foray/linebreak/TotalFitLb.java
===================================================================
--- trunk/foray/foray-linebreak/src/main/java/org/foray/linebreak/TotalFitLb.java 2022-02-17 19:10:22 UTC (rev 12600)
+++ trunk/foray/foray-linebreak/src/main/java/org/foray/linebreak/TotalFitLb.java 2022-02-17 21:27:02 UTC (rev 12601)
@@ -120,8 +120,8 @@
/* Flatten the tree structure. */
final IntArrayBuilder currentPath = new IntArrayBuilder();
- for (int index = 0; index < this.paragraph.qtyParaNodes(); index ++) {
- final KpNode node = this.paragraph.paraNodeAt(index);
+ for (int index = 0; index < this.paragraph.qtyKpNodes(); index ++) {
+ final KpNode node = this.paragraph.kpNodeAt(index);
currentPath.push(index);
flatten(node, currentPath, kpContext);
currentPath.pop();
@@ -152,7 +152,7 @@
* @param paraConfig The paragraph layout configuration.
*/
private void flatten(final KpNode node, final IntArrayBuilder currentPath, final KpContext paraConfig) {
- switch (node.getParaNodeType()) {
+ switch (node.getKpNodeType()) {
case LEAF: {
final KpLeaf leaf = (KpLeaf) node;
final int index = this.contentNodes.size();
@@ -164,8 +164,8 @@
case BRANCH: {
final KpBranch branch = (KpBranch) node;
this.branchStack.push(branch);
- for (int index = 0; index < branch.qtyParaNodes(); index ++) {
- final KpNode childNode = branch.paraNodeAt(index);
+ for (int index = 0; index < branch.qtyKpNodes(); index ++) {
+ final KpNode childNode = branch.kpNodeAt(index);
currentPath.push(index);
flatten(childNode, currentPath, paraConfig);
currentPath.pop();
@@ -174,7 +174,7 @@
break;
}
default: {
- throw new IllegalArgumentException("Unexpected paragraph node type: " + node.getParaNodeType());
+ throw new IllegalArgumentException("Unexpected paragraph node type: " + node.getKpNodeType());
}
}
}
@@ -185,7 +185,7 @@
*/
private void processNode(final LbNodeWrapper leafWrapper) {
final KpLeaf leaf = leafWrapper.getContent();
- final KpLeaf.Type leafType = leaf.getParaLeafType();
+ final KpLeaf.Type leafType = leaf.getKpLeafType();
switch(leafType) {
case BOX: {
final KpBox box = (KpBox) leaf;
@@ -196,7 +196,7 @@
final KpGlue glue = (KpGlue) leaf;
final KpLeaf previousNode = leafWrapper.getPreviousNode(this.contentNodes).getContent();
if (previousNode != null
- && previousNode.getParaLeafType() == KpLeaf.Type.BOX) {
+ && previousNode.getKpLeafType() == KpLeaf.Type.BOX) {
mainLoop(leafWrapper);
}
this.cumulativeWidth += glue.getIdealWidth(leafWrapper.getConfig());
@@ -282,7 +282,7 @@
computeTotalWidthAfterB:
for (int index = b.getIndex(); index < this.contentNodes.size(); index ++) {
- switch (leaf.getParaLeafType()) {
+ switch (leaf.getKpLeafType()) {
case BOX: {
break computeTotalWidthAfterB;
}
Modified: trunk/foray/foray-linebreak/src/test/java/org/foray/linebreak/LineBreaker4aTests.java
===================================================================
--- trunk/foray/foray-linebreak/src/test/java/org/foray/linebreak/LineBreaker4aTests.java 2022-02-17 19:10:22 UTC (rev 12600)
+++ trunk/foray/foray-linebreak/src/test/java/org/foray/linebreak/LineBreaker4aTests.java 2022-02-17 21:27:02 UTC (rev 12601)
@@ -342,7 +342,7 @@
/* There are 242 lines of code creating the paragraph.
* Each of them adds exactly one node. */
- Assert.assertEquals(242, para.qtyParaNodes());
+ Assert.assertEquals(242, para.qtyKpNodes());
/* Of the words added, 13 are two-syllable, and 2 are three-syllable.
* If "n" is the number of syllables in a word, the total number of nodes in each word is ((2 * n) - 1).
@@ -360,7 +360,7 @@
/* Check the count of leaves using a strict Knuth-Plass notion of leaves, i.e. where each character in the word
* is a box. See Table 1 where the leaves are listed from 1 through 601. */
- Assert.assertEquals(601, para.qtyKpLeaves());
+ Assert.assertEquals(601, para.qtyKpLeavesStrict());
return para;
}
Modified: trunk/foray/foray-linebreak/src/test/java/org/foray/linebreak/util/DumpLayout.java
===================================================================
--- trunk/foray/foray-linebreak/src/test/java/org/foray/linebreak/util/DumpLayout.java 2022-02-17 19:10:22 UTC (rev 12600)
+++ trunk/foray/foray-linebreak/src/test/java/org/foray/linebreak/util/DumpLayout.java 2022-02-17 21:27:02 UTC (rev 12601)
@@ -64,7 +64,7 @@
StringUtils.clear(builder);
}
}
- final KpLeaf leaf = branch.paraLeafAt(leafIndex);
+ final KpLeaf leaf = branch.kpLeafAt(leafIndex);
builder.append(leaf.getText());
}
if (builder.length() > 0) {
Modified: trunk/foray/foray-linebreak/src/test/java/org/foray/linebreak/util/DumpParaBranch.java
===================================================================
--- trunk/foray/foray-linebreak/src/test/java/org/foray/linebreak/util/DumpParaBranch.java 2022-02-17 19:10:22 UTC (rev 12600)
+++ trunk/foray/foray-linebreak/src/test/java/org/foray/linebreak/util/DumpParaBranch.java 2022-02-17 21:27:02 UTC (rev 12601)
@@ -60,11 +60,11 @@
this.output.println("------ ------ ------ ------ ------ --------------------------------------");
int startLeafIndex = 0;
int startKpLeafIndex = 0;
- for (int nodeIndex = 0; nodeIndex < branch.qtyParaNodes(); nodeIndex ++) {
- final KpNode node = branch.paraNodeAt(nodeIndex);
+ for (int nodeIndex = 0; nodeIndex < branch.qtyKpNodes(); nodeIndex ++) {
+ final KpNode node = branch.kpNodeAt(nodeIndex);
final KpBranch childBranch = KpNode.Type.asBranch(node);
final int qtyLeaves = childBranch == null ? 1 : childBranch.qtyParaLeaves();
- final int qtyKpLeaves = node.qtyKpLeaves();
+ final int qtyKpLeaves = node.qtyKpLeavesStrict();
final String line = String.format(FORMAT, nodeIndex, startLeafIndex, qtyLeaves, startKpLeafIndex,
qtyKpLeaves, node);
this.output.println(line);
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/DiscretionaryHyphen4a.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/DiscretionaryHyphen4a.java 2022-02-17 19:10:22 UTC (rev 12600)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/DiscretionaryHyphen4a.java 2022-02-17 21:27:02 UTC (rev 12601)
@@ -133,7 +133,7 @@
}
@Override
- public Type getParaLeafType() {
+ public Type getKpLeafType() {
return KpLeaf.Type.PENALTY;
}
@@ -143,7 +143,7 @@
}
@Override
- public int qtyKpLeaves() {
+ public int qtyKpLeavesStrict() {
return 1;
}
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/DiscretionaryHyphenMutating4a.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/DiscretionaryHyphenMutating4a.java 2022-02-17 19:10:22 UTC (rev 12600)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/DiscretionaryHyphenMutating4a.java 2022-02-17 21:27:02 UTC (rev 12601)
@@ -169,12 +169,12 @@
}
@Override
- public Type getParaLeafType() {
+ public Type getKpLeafType() {
return KpLeaf.Type.PENALTY;
}
@Override
- public KpNode.Type getParaNodeType() {
+ public KpNode.Type getKpNodeType() {
return KpNode.Type.LEAF;
}
@@ -184,7 +184,7 @@
}
@Override
- public int qtyParaNodes() {
+ public int qtyKpNodes() {
return 0;
}
@@ -194,7 +194,7 @@
}
@Override
- public int qtyKpLeaves() {
+ public int qtyKpLeavesStrict() {
return 1;
}
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Punctuation4a.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Punctuation4a.java 2022-02-17 19:10:22 UTC (rev 12600)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Punctuation4a.java 2022-02-17 21:27:02 UTC (rev 12601)
@@ -178,12 +178,12 @@
}
@Override
- public KpNode.Type getParaNodeType() {
+ public KpNode.Type getKpNodeType() {
return KpNode.Type.LEAF;
}
@Override
- public KpLeaf.Type getParaLeafType() {
+ public KpLeaf.Type getKpLeafType() {
return KpLeaf.Type.BOX;
}
@@ -223,7 +223,7 @@
}
@Override
- public int qtyParaNodes() {
+ public int qtyKpNodes() {
return 0;
}
@@ -233,7 +233,7 @@
}
@Override
- public int qtyKpLeaves() {
+ public int qtyKpLeavesStrict() {
return this.content.length();
}
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/SegmentDictionaryWord.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/SegmentDictionaryWord.java 2022-02-17 19:10:22 UTC (rev 12600)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/SegmentDictionaryWord.java 2022-02-17 21:27:02 UTC (rev 12601)
@@ -115,12 +115,12 @@
}
@Override
- public FoWordComponent paraLeafAt(final int index) {
+ public FoWordComponent kpLeafAt(final int index) {
return wordComponentAt(index);
}
@Override
- public int qtyKpLeaves() {
+ public int qtyKpLeavesStrict() {
/* First, count the discretionary hyphens. */
int leafCount = this.segments.length - 1;
/* Add the number of chars in each segment. */
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/StringWord.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/StringWord.java 2022-02-17 19:10:22 UTC (rev 12600)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/StringWord.java 2022-02-17 21:27:02 UTC (rev 12601)
@@ -131,7 +131,7 @@
}
@Override
- public KpLeaf paraLeafAt(final int leafIndex) {
+ public KpLeaf kpLeafAt(final int leafIndex) {
if (leafIndex < 0
|| leafIndex >= qtyParaLeaves()) {
throw new IndexOutOfBoundsException("Index out of bounds: " + leafIndex);
@@ -147,7 +147,7 @@
}
@Override
- public int qtyKpLeaves() {
+ public int qtyKpLeavesStrict() {
/* First, count the discretionary hyphens. */
int leafCount = this.segments.length - 1;
/* Add the number of chars in each segment. */
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/StringWordSegmentLatin1.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/StringWordSegmentLatin1.java 2022-02-17 19:10:22 UTC (rev 12600)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/StringWordSegmentLatin1.java 2022-02-17 21:27:02 UTC (rev 12601)
@@ -62,12 +62,12 @@
}
@Override
- public KpNode.Type getParaNodeType() {
+ public KpNode.Type getKpNodeType() {
return KpNode.Type.LEAF;
}
@Override
- public Type getParaLeafType() {
+ public Type getKpLeafType() {
return KpLeaf.Type.BOX;
}
@@ -82,7 +82,7 @@
}
@Override
- public int qtyParaNodes() {
+ public int qtyKpNodes() {
return 0;
}
@@ -92,7 +92,7 @@
}
@Override
- public int qtyKpLeaves() {
+ public int qtyKpLeavesStrict() {
return length();
}
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/StringWordSegmentUtf16.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/StringWordSegmentUtf16.java 2022-02-17 19:10:22 UTC (rev 12600)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/StringWordSegmentUtf16.java 2022-02-17 21:27:02 UTC (rev 12601)
@@ -62,12 +62,12 @@
}
@Override
- public KpNode.Type getParaNodeType() {
+ public KpNode.Type getKpNodeType() {
return KpNode.Type.LEAF;
}
@Override
- public Type getParaLeafType() {
+ public Type getKpLeafType() {
return KpLeaf.Type.BOX;
}
@@ -82,7 +82,7 @@
}
@Override
- public int qtyParaNodes() {
+ public int qtyKpNodes() {
return 0;
}
@@ -92,7 +92,7 @@
}
@Override
- public int qtyKpLeaves() {
+ public int qtyKpLeavesStrict() {
return length();
}
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/TokenFlow4a.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/TokenFlow4a.java 2022-02-17 19:10:22 UTC (rev 12600)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/TokenFlow4a.java 2022-02-17 21:27:02 UTC (rev 12601)
@@ -162,12 +162,12 @@
}
@Override
- public KpNode paraNodeAt(final int nodeIndex) {
+ public KpNode kpNodeAt(final int nodeIndex) {
return this.tokens.get(nodeIndex);
}
@Override
- public KpLeaf paraLeafAt(final int leafIndex) {
+ public KpLeaf kpLeafAt(final int leafIndex) {
return KpBranch4a.paraLeafAt(this, leafIndex);
}
@@ -177,12 +177,12 @@
}
@Override
- public Type getParaNodeType() {
+ public Type getKpNodeType() {
return Type.BRANCH;
}
@Override
- public int qtyParaNodes() {
+ public int qtyKpNodes() {
return this.tokens.size();
}
@@ -197,7 +197,7 @@
}
@Override
- public int qtyKpLeaves() {
+ public int qtyKpLeavesStrict() {
throw new UnsupportedOperationException();
}
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Whitespace4a.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Whitespace4a.java 2022-02-17 19:10:22 UTC (rev 12600)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Whitespace4a.java 2022-02-17 21:27:02 UTC (rev 12601)
@@ -114,7 +114,7 @@
}
@Override
- public KpNode.Type getParaNodeType() {
+ public KpNode.Type getKpNodeType() {
return KpNode.Type.LEAF;
}
@@ -129,7 +129,7 @@
}
@Override
- public KpLeaf.Type getParaLeafType() {
+ public KpLeaf.Type getKpLeafType() {
return KpLeaf.Type.GLUE;
}
@@ -164,7 +164,7 @@
}
@Override
- public int qtyParaNodes() {
+ public int qtyKpNodes() {
return 0;
}
@@ -174,7 +174,7 @@
}
@Override
- public int qtyKpLeaves() {
+ public int qtyKpLeavesStrict() {
return this.content.length();
}
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Word4a.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Word4a.java 2022-02-17 19:10:22 UTC (rev 12600)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Word4a.java 2022-02-17 21:27:02 UTC (rev 12601)
@@ -198,17 +198,17 @@
}
@Override
- public Type getParaNodeType() {
+ public Type getKpNodeType() {
return KpNode.Type.BRANCH;
}
@Override
- public int qtyParaNodes() {
+ public int qtyKpNodes() {
return this.qtyWordComponents();
}
@Override
- public KpNode paraNodeAt(final int index) {
+ public KpNode kpNodeAt(final int index) {
return this.wordComponentAt(index);
}
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/WordSegment4a.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/WordSegment4a.java 2022-02-17 19:10:22 UTC (rev 12600)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/WordSegment4a.java 2022-02-17 21:27:02 UTC (rev 12601)
@@ -48,7 +48,7 @@
private static final long serialVersionUID = -9006099460669286001L;
@Override
- public Type getParaLeafType() {
+ public Type getKpLeafType() {
return KpLeaf.Type.BOX;
}
@@ -81,7 +81,7 @@
}
@Override
- public int qtyKpLeaves() {
+ public int qtyKpLeavesStrict() {
return length();
}
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/CapitalizedWord.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/CapitalizedWord.java 2022-02-17 19:10:22 UTC (rev 12600)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/CapitalizedWord.java 2022-02-17 21:27:02 UTC (rev 12601)
@@ -108,13 +108,13 @@
}
@Override
- public KpLeaf paraLeafAt(final int index) {
- return this.getWrappedWord().paraLeafAt(index);
+ public KpLeaf kpLeafAt(final int index) {
+ return this.getWrappedWord().kpLeafAt(index);
}
@Override
- public int qtyKpLeaves() {
- return getWrappedWord().qtyKpLeaves();
+ public int qtyKpLeavesStrict() {
+ return getWrappedWord().qtyKpLeavesStrict();
}
@Override
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/DecoratedWord.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/DecoratedWord.java 2022-02-17 19:10:22 UTC (rev 12600)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/DecoratedWord.java 2022-02-17 21:27:02 UTC (rev 12601)
@@ -84,8 +84,8 @@
}
@Override
- public KpNode paraNodeAt(final int index) {
- return getWrappedWord().paraNodeAt(index);
+ public KpNode kpNodeAt(final int index) {
+ return getWrappedWord().kpNodeAt(index);
}
@Override
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/ExactWord.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/ExactWord.java 2022-02-17 19:10:22 UTC (rev 12600)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/ExactWord.java 2022-02-17 21:27:02 UTC (rev 12601)
@@ -90,13 +90,13 @@
}
@Override
- public KpLeaf paraLeafAt(final int index) {
- return this.getWrappedWord().paraLeafAt(index);
+ public KpLeaf kpLeafAt(final int index) {
+ return this.getWrappedWord().kpLeafAt(index);
}
@Override
- public int qtyKpLeaves() {
- return getWrappedWord().qtyKpLeaves();
+ public int qtyKpLeavesStrict() {
+ return getWrappedWord().qtyKpLeavesStrict();
}
@Override
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/LatinPast1Word.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/LatinPast1Word.java 2022-02-17 19:10:22 UTC (rev 12600)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/LatinPast1Word.java 2022-02-17 21:27:02 UTC (rev 12601)
@@ -65,9 +65,9 @@
}
@Override
- public KpLeaf paraLeafAt(final int index) {
+ public KpLeaf kpLeafAt(final int index) {
if (index < getWrappedWord().qtyParaLeaves()) {
- return getWrappedWord().paraLeafAt(index);
+ return getWrappedWord().kpLeafAt(index);
}
if (index == getWrappedWord().qtyParaLeaves()) {
return SUFFIX;
@@ -76,8 +76,8 @@
}
@Override
- public int qtyKpLeaves() {
- return getWrappedWord().qtyKpLeaves() + LatinPast1Word.SUFFIX.length();
+ public int qtyKpLeavesStrict() {
+ return getWrappedWord().qtyKpLeavesStrict() + LatinPast1Word.SUFFIX.length();
}
}
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/LatinPlural1Word.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/LatinPlural1Word.java 2022-02-17 19:10:22 UTC (rev 12600)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/LatinPlural1Word.java 2022-02-17 21:27:02 UTC (rev 12601)
@@ -98,13 +98,13 @@
}
@Override
- public KpLeaf paraLeafAt(final int index) {
- return getWrappedWord().paraLeafAt(index);
+ public KpLeaf kpLeafAt(final int index) {
+ return getWrappedWord().kpLeafAt(index);
}
@Override
- public int qtyKpLeaves() {
- return getWrappedWord().qtyKpLeaves() + LatinPlural1Word.Segment.SIZE_DIFFERENCE;
+ public int qtyKpLeavesStrict() {
+ return getWrappedWord().qtyKpLeavesStrict() + LatinPlural1Word.Segment.SIZE_DIFFERENCE;
}
@Override
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/LatinPlural2Word.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/LatinPlural2Word.java 2022-02-17 19:10:22 UTC (rev 12600)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/wrapper/LatinPlural2Word.java 2022-02-17 21:27:02 UTC (rev 12601)
@@ -101,12 +101,12 @@
}
@Override
- public KpLeaf paraLeafAt(final int index) {
- return getWrappedWord().paraLeafAt(index);
+ public KpLeaf kpLeafAt(final int index) {
+ return getWrappedWord().kpLeafAt(index);
}
...
[truncated message content] |