foray-commit Mailing List for FOray (Page 29)
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
|
Dec
|
|
From: <vic...@us...> - 2023-08-25 11:53:39
|
Revision: 13175
http://sourceforge.net/p/foray/code/13175
Author: victormote
Date: 2023-08-25 11:53:36 +0000 (Fri, 25 Aug 2023)
Log Message:
-----------
Add some consistency warnings for dictionary configuration and parsing.
Modified Paths:
--------------
trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-ZZZ-archaic.dict.xml
trunk/foray/foray-orthography/src/main/data/orthographies/foray-orthography-config.xml
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/DictionaryResource.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/OrthographyServer4a.java
Modified: trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-ZZZ-archaic.dict.xml
===================================================================
--- trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-ZZZ-archaic.dict.xml 2023-08-25 11:25:47 UTC (rev 13174)
+++ trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-ZZZ-archaic.dict.xml 2023-08-25 11:53:36 UTC (rev 13175)
@@ -5,7 +5,7 @@
"http://www.axsl.org/dtds/0.1/en/axsl-dictionary.dtd">
<axsl-dictionary
- id="org.foray.eng.Latn.ZZZ.1920" overrides="org.foray.eng.Latn.ZZZ"
+ id="org.foray.eng.Latn.USA.1920" overrides="org.foray.eng.Latn.USA"
language="eng" script="Latn" epoch="1920"
hard-hyphen-char="=" soft-hyphen-char="-">
Modified: trunk/foray/foray-orthography/src/main/data/orthographies/foray-orthography-config.xml
===================================================================
--- trunk/foray/foray-orthography/src/main/data/orthographies/foray-orthography-config.xml 2023-08-25 11:25:47 UTC (rev 13174)
+++ trunk/foray/foray-orthography/src/main/data/orthographies/foray-orthography-config.xml 2023-08-25 11:53:36 UTC (rev 13175)
@@ -254,7 +254,7 @@
</unparsed-dictionary>
</dictionary-resource>
- <dictionary-resource id="org.foray.eng.Latn.ZZZ.1920">
+ <dictionary-resource id="org.foray.eng.Latn.USA.1920">
<unparsed-dictionary>
<dictionary-element>
<resource-location type="url">file:///C:/vic/foray/trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-ZZZ-archaic.dict.xml</resource-location>
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/DictionaryResource.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/DictionaryResource.java 2023-08-25 11:25:47 UTC (rev 13174)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/DictionaryResource.java 2023-08-25 11:53:36 UTC (rev 13175)
@@ -97,6 +97,9 @@
/** The elements to be parsed to create the dictionary. This can be null or empty. */
private List<WordListElement> unparsedWordList = new ArrayList<WordListElement>();
+ /** The logger. */
+ private Logger logger = LoggerFactory.getLogger(DictionaryResource.class);
+
/**
* Constructor.
* @param id The id of this resource.
@@ -158,6 +161,9 @@
}
}
+ if (! getId().equals(dictionary.getId())) {
+ this.logger.warn("Id mismatch: DictionaryResource: {}, Dictionary: {}", getId(), dictionary.getId());
+ }
return dictionary;
}
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/OrthographyServer4a.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/OrthographyServer4a.java 2023-08-25 11:25:47 UTC (rev 13174)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/OrthographyServer4a.java 2023-08-25 11:53:36 UTC (rev 13175)
@@ -356,9 +356,6 @@
* @param resource The dictionary resource being registered.
*/
public void registerDictionary(final String id, final DictionaryResource resource) {
- if (! id.equals(resource.getId())) {
- this.logger.warn("Id mismatch: External: {}, Internal: {}", id, resource.getId());
- }
if (this.dictionaryMap.get(id) != null) {
throw new IllegalArgumentException("DictionaryResource already exist for id: " + id);
}
@@ -377,7 +374,12 @@
@Override
public SegmentDictionary getDictionary(final String dictionaryId) {
final DictionaryResource resource = this.dictionaryMap.get(dictionaryId);
- return resource == null ? null : resource.getResource();
+ if (resource == null) {
+ this.logger.warn("Dictionary not found: {}", dictionaryId);
+ return null;
+ } else {
+ return resource.getResource();
+ }
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2023-08-25 11:25:50
|
Revision: 13174
http://sourceforge.net/p/foray/code/13174
Author: victormote
Date: 2023-08-25 11:25:47 +0000 (Fri, 25 Aug 2023)
Log Message:
-----------
1. Log dictionary file being parsed. 2. Add missing dictionary resources to orthography config.
Modified Paths:
--------------
trunk/foray/foray-orthography/src/main/data/orthographies/foray-orthography-config.xml
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/DictionaryResource.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/OrthographyServer4a.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/SpellChecker.java
Modified: trunk/foray/foray-orthography/src/main/data/orthographies/foray-orthography-config.xml
===================================================================
--- trunk/foray/foray-orthography/src/main/data/orthographies/foray-orthography-config.xml 2023-08-25 10:46:01 UTC (rev 13173)
+++ trunk/foray/foray-orthography/src/main/data/orthographies/foray-orthography-config.xml 2023-08-25 11:25:47 UTC (rev 13174)
@@ -238,6 +238,22 @@
</unparsed-dictionary>
</dictionary-resource>
+ <dictionary-resource id="org.foray.eng.Latn.GBR">
+ <unparsed-dictionary>
+ <dictionary-element>
+ <resource-location type="url">file:///C:/vic/foray/trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-GBR.dict.xml</resource-location>
+ </dictionary-element>
+ </unparsed-dictionary>
+ </dictionary-resource>
+
+ <dictionary-resource id="org.foray.eng.Latn.USA">
+ <unparsed-dictionary>
+ <dictionary-element>
+ <resource-location type="url">file:///C:/vic/foray/trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-USA.dict.xml</resource-location>
+ </dictionary-element>
+ </unparsed-dictionary>
+ </dictionary-resource>
+
<dictionary-resource id="org.foray.eng.Latn.ZZZ.1920">
<unparsed-dictionary>
<dictionary-element>
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/DictionaryResource.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/DictionaryResource.java 2023-08-25 10:46:01 UTC (rev 13173)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/DictionaryResource.java 2023-08-25 11:25:47 UTC (rev 13174)
@@ -135,7 +135,7 @@
return null;
}
- logger.debug("Parsing {}", rawResource.toExternalForm());
+ logger.info("Parsing registered Dictionary: {}", rawResource.toExternalForm());
final DictionaryParser parser = new DictionaryParser();
parser.setLogDictionaryProblems(true);
SegmentDictionary dictionary = null;
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/OrthographyServer4a.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/OrthographyServer4a.java 2023-08-25 10:46:01 UTC (rev 13173)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/OrthographyServer4a.java 2023-08-25 11:25:47 UTC (rev 13174)
@@ -356,6 +356,9 @@
* @param resource The dictionary resource being registered.
*/
public void registerDictionary(final String id, final DictionaryResource resource) {
+ if (! id.equals(resource.getId())) {
+ this.logger.warn("Id mismatch: External: {}, Internal: {}", id, resource.getId());
+ }
if (this.dictionaryMap.get(id) != null) {
throw new IllegalArgumentException("DictionaryResource already exist for id: " + id);
}
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 2023-08-25 10:46:01 UTC (rev 13173)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/SpellChecker.java 2023-08-25 11:25:47 UTC (rev 13174)
@@ -192,6 +192,9 @@
/** The entity resolver for locating resources. */
private EntityResolver entityResolver;
+ /** The logger. */
+ private Logger logger = LoggerFactory.getLogger(SpellChecker.class);
+
/**
* Constructor.
* @param output The output stream to which the spelling errors should be written.
@@ -215,6 +218,7 @@
if (adhocDictionaryPaths != null) {
for (URL adhocDictionaryPath : adhocDictionaryPaths) {
final DictionaryParser dictParser = new DictionaryParser();
+ this.logger.info("Parsing Ad-hoc Dictionary: " + adhocDictionaryPath.toExternalForm());
dictParser.setLogDictionaryProblems(true);
final InputSource source = new InputSource(adhocDictionaryPath.toExternalForm());
final List<SegmentDictionary> dictionaries = dictParser.parse(source);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2023-08-25 10:46:04
|
Revision: 13173
http://sourceforge.net/p/foray/code/13173
Author: victormote
Date: 2023-08-25 10:46:01 +0000 (Fri, 25 Aug 2023)
Log Message:
-----------
1. Conform to aXSL change: Use OrthographyServer to help resolve parent dictionaries. 2. Use parent dictionaries to reduce dependence on ad-hoc dictionaries.
Modified Paths:
--------------
trunk/foray/foray-orthography/src/main/data/orthographies/foray-orthography-config.xml
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Orthography4a.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/OrthographyServer4a.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/SegmentDictionary.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/SimpleDictionary.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/OrthographyParser.java
Modified: trunk/foray/foray-orthography/src/main/data/orthographies/foray-orthography-config.xml
===================================================================
--- trunk/foray/foray-orthography/src/main/data/orthographies/foray-orthography-config.xml 2023-08-24 21:42:19 UTC (rev 13172)
+++ trunk/foray/foray-orthography/src/main/data/orthographies/foray-orthography-config.xml 2023-08-25 10:46:01 UTC (rev 13173)
@@ -238,6 +238,14 @@
</unparsed-dictionary>
</dictionary-resource>
+ <dictionary-resource id="org.foray.eng.Latn.ZZZ.1920">
+ <unparsed-dictionary>
+ <dictionary-element>
+ <resource-location type="url">file:///C:/vic/foray/trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-ZZZ-archaic.dict.xml</resource-location>
+ </dictionary-element>
+ </unparsed-dictionary>
+ </dictionary-resource>
+
<dictionary-resource id="dictionary-italian">
<unparsed-dictionary>
<dictionary-element>
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Orthography4a.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Orthography4a.java 2023-08-24 21:42:19 UTC (rev 13172)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Orthography4a.java 2023-08-25 10:46:01 UTC (rev 13173)
@@ -281,18 +281,27 @@
/* 1. Check exact matches in adhoc dictionaries. */
if (adhocDictionaries != null) {
for (int index = 0; index < adhocDictionaries.size(); index ++) {
- final Dictionary adhocDictionary = adhocDictionaries.get(index);
- if (adhocDictionary.getWord(wordChars, 0) != null) {
- return true;
+ Dictionary adhocDictionary = adhocDictionaries.get(index);
+ /* Check the referenced dictionary and each of its ancestor dictionaries. */
+ while (adhocDictionary != null) {
+ if (adhocDictionary.getWord(wordChars, 0) == null) {
+ adhocDictionary = adhocDictionary.getParentDictionary(this.server);
+ } else {
+ return true;
+ }
}
}
}
/* 2. Check exact matches in standard dictionaries for the orthography. */
- final Dictionary orthoDictionary = getDictionary();
- if (orthoDictionary != null
- && orthoDictionary.getWord(wordChars, 0) != null) {
- return true;
+ Dictionary orthoDictionary = getDictionary();
+ /* Check the referenced dictionary and each of its ancestor dictionaries. */
+ while (orthoDictionary != null) {
+ if (orthoDictionary.getWord(wordChars, 0) == null) {
+ orthoDictionary = orthoDictionary.getParentDictionary(this.server);
+ } else {
+ return true;
+ }
}
/* 3. Check the match rules. */
@@ -316,17 +325,28 @@
/* 5. Check derivative matches in adhoc dictionaries. */
if (adhocDictionaries != null) {
for (int dictIndex = 0; dictIndex < adhocDictionaries.size(); dictIndex ++) {
- final Dictionary adhocDictionary = adhocDictionaries.get(dictIndex);
- if (isDerivativeFound(wordChars, adhocDictionary)) {
- return true;
+ Dictionary adhocDictionary = adhocDictionaries.get(dictIndex);
+ /* Check the referenced dictionary and each of its ancestor dictionaries. */
+ while (adhocDictionary != null) {
+ if (isDerivativeFound(wordChars, adhocDictionary)) {
+ return true;
+ } else {
+ adhocDictionary = adhocDictionary.getParentDictionary(this.server);
+
+ }
}
}
}
/* 6. Check derivative matches in standard dictionaries for the orthography. */
- if (orthoDictionary != null) {
+ orthoDictionary = getDictionary();
+ /* Check the referenced dictionary and each of its ancestor dictionaries. */
+ while (orthoDictionary != null) {
if (isDerivativeFound(wordChars, orthoDictionary)) {
return true;
+ } else {
+ orthoDictionary = orthoDictionary.getParentDictionary(this.server);
+
}
}
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/OrthographyServer4a.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/OrthographyServer4a.java 2023-08-24 21:42:19 UTC (rev 13172)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/OrthographyServer4a.java 2023-08-25 10:46:01 UTC (rev 13173)
@@ -81,7 +81,9 @@
/** Map of writing systems and their orthographies. */
private Map<WritingSystem, Orthography4a> orthographyMap = new HashMap<WritingSystem, Orthography4a>();
-// private Map<String, Orthography4a>
+ /** Map whose key is a dictionary ID, and whose value is the matching dictionary resource. */
+ private Map<String, DictionaryResource> dictionaryMap = new HashMap<String, DictionaryResource>();
+
/** The map of match rule lists, keyed by id. */
private Map<String, List<Pattern>> matchRuleLists = new HashMap<String, List<Pattern>>();
@@ -291,6 +293,14 @@
*/
public void registerOrthography(final WritingSystem writingSystem, final Orthography4a orthography) {
this.orthographyMap.put(writingSystem, orthography);
+ final DictionaryResource resource = orthography.getDictionaryResource();
+ /* TODO: If the new resources is the same as the existing one, ignore. Otherwise, log a warning and ignore the
+ * new resource. */
+// if (this.dictionaryMap.get(resource.getId()) != null) {
+// throw new IllegalStateException(String.format(
+// "Dictionary already registered for ID: %1s", resource.getId()));
+// }
+ this.dictionaryMap.put(resource.getId(), resource);
}
@Override
@@ -340,4 +350,31 @@
return this.derivativeRuleLists.get(id);
}
+ /**
+ * Registers a dictionary.
+ * @param id The id of the dictionary to be registered.
+ * @param resource The dictionary resource being registered.
+ */
+ public void registerDictionary(final String id, final DictionaryResource resource) {
+ if (this.dictionaryMap.get(id) != null) {
+ throw new IllegalArgumentException("DictionaryResource already exist for id: " + id);
+ }
+ this.dictionaryMap.put(id, resource);
+ }
+
+ /**
+ * Returns the dictionary resource for a given Id.
+ * @param id The id of the dictionary to be returned.
+ * @return The dictionary resource for {@code id}.
+ */
+ public DictionaryResource getDictionaryResource(final String id) {
+ return this.dictionaryMap.get(id);
+ }
+
+ @Override
+ public SegmentDictionary getDictionary(final String dictionaryId) {
+ final DictionaryResource resource = this.dictionaryMap.get(dictionaryId);
+ return resource == null ? null : resource.getResource();
+ }
+
}
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/SegmentDictionary.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/SegmentDictionary.java 2023-08-24 21:42:19 UTC (rev 13172)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/SegmentDictionary.java 2023-08-25 10:46:01 UTC (rev 13173)
@@ -30,6 +30,7 @@
import org.foray.common.data.TernaryTreeMap;
+import org.axsl.orthography.OrthographyServer;
import org.axsl.orthography.Word.PartOfSpeech;
import org.axsl.orthography.Word.PosQualifier;
import org.axsl.orthography.optional.Dictionary;
@@ -49,7 +50,7 @@
/** Constant needed for serialization. */
private static final long serialVersionUID = -8752423281137349847L;
- /** The uniqe id for this dictionary. */
+ /** The unique id for this dictionary. */
private String id;
/** The unique id of the dictionary that this dictionary overrides. */
@@ -180,6 +181,7 @@
return ambWord.getAlternative(index);
}
}
+
return null;
}
@@ -281,4 +283,12 @@
return false;
}
+ @Override
+ public Dictionary getParentDictionary(final OrthographyServer server) {
+ if (this.overrides == null) {
+ return null;
+ }
+ return server.getDictionary(this.overrides);
+ }
+
}
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/SimpleDictionary.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/SimpleDictionary.java 2023-08-24 21:42:19 UTC (rev 13172)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/SimpleDictionary.java 2023-08-25 10:46:01 UTC (rev 13173)
@@ -28,6 +28,7 @@
package org.foray.orthography;
+import org.axsl.orthography.OrthographyServer;
import org.axsl.orthography.Word;
import org.axsl.orthography.Word.PartOfSpeech;
import org.axsl.orthography.Word.PosQualifier;
@@ -114,4 +115,9 @@
return false;
}
+ @Override
+ public Dictionary getParentDictionary(final OrthographyServer server) {
+ return null;
+ }
+
}
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 2023-08-24 21:42:19 UTC (rev 13172)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/OrthographyParser.java 2023-08-25 10:46:01 UTC (rev 13173)
@@ -123,9 +123,6 @@
/** Stateful variable tracking the current orthography configuration. */
private transient Orthography4a currentOrthographyConfig;
-// /** The map of match rule lists, keyed by id. */
-// private Map<String, List<Pattern>> matchRuleLists = new HashMap<String, List<Pattern>>();
-
/** The map of parsed {@link ExplicitTokens} instances, keyed by id. */
private Map<String, ExplicitTokens> explicitTokensMap = new HashMap<String, ExplicitTokens>();
@@ -133,9 +130,6 @@
private Map<String, List<WordWrapperFactory<?>>> derivativeLists =
new HashMap<String, List<WordWrapperFactory<?>>>();
- /** The map of dictionary instances, keyed by id. */
- private Map<String, DictionaryResource> dictionaries = new HashMap<String, DictionaryResource>();
-
/** The map of hyphenation pattern tree instances, keyed by id. */
private Map<String, HyphenationPatternsResource> hyphenationPatterns =
new HashMap<String, HyphenationPatternsResource>();
@@ -243,7 +237,7 @@
}
case "dictionary": {
final String reference = attributes.getValue("reference");
- final DictionaryResource resource = this.dictionaries.get(reference);
+ final DictionaryResource resource = this.hyphenationServer.getDictionaryResource(reference);
if (resource == null) {
errorMessage("dictionary-resource not found: {}", reference);
} else {
@@ -294,7 +288,6 @@
case "dictionary-resource": {
final String id = attributes.getValue("id");
this.currentDictionaryResource = new DictionaryResource(id);
- this.dictionaries.put(id, this.currentDictionaryResource);
return;
}
case "hyphenation-patterns-resource": {
@@ -557,6 +550,7 @@
return;
}
case "dictionary-resource": {
+ this.hyphenationServer.registerDictionary(currentDictionaryResource.getId(), currentDictionaryResource);
this.currentDictionaryResource = null;
return;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2023-08-24 21:42:21
|
Revision: 13172
http://sourceforge.net/p/foray/code/13172
Author: victormote
Date: 2023-08-24 21:42:19 +0000 (Thu, 24 Aug 2023)
Log Message:
-----------
Conform to aXSL change: Add method positively rejecting a given word as being valid for an orthography.
Modified Paths:
--------------
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/SegmentDictionary.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/SimpleDictionary.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/SpellChecker.java
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/SegmentDictionary.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/SegmentDictionary.java 2023-08-24 20:38:59 UTC (rev 13171)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/SegmentDictionary.java 2023-08-24 21:42:19 UTC (rev 13172)
@@ -275,4 +275,10 @@
return this.overrides;
}
+ @Override
+ public boolean isExcludedWord(final CharSequence wordChars) {
+ /* TODO Implement this. */
+ return false;
+ }
+
}
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/SimpleDictionary.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/SimpleDictionary.java 2023-08-24 20:38:59 UTC (rev 13171)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/SimpleDictionary.java 2023-08-24 21:42:19 UTC (rev 13172)
@@ -108,4 +108,10 @@
return false;
}
+ @Override
+ public boolean isExcludedWord(final CharSequence wordChars) {
+ /* TODO Implement this. */
+ return false;
+ }
+
}
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 2023-08-24 20:38:59 UTC (rev 13171)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/SpellChecker.java 2023-08-24 21:42:19 UTC (rev 13172)
@@ -183,8 +183,8 @@
textElementMap.put("OmittedWord", "Aaaaaaaaaa");
}
- /** The list of dictionaries that are currently active, i.e. that match the current orthography. */
- private List<Dictionary> currentDictionaries = new ArrayList<Dictionary>();
+ /** The list of ad-hoc dictionaries, usually parsed from the command-line. */
+ private List<Dictionary> adhocDictionaries = new ArrayList<Dictionary>();
/** The counter for "Not found" words. */
private int notFoundCounter = 0;
@@ -218,7 +218,7 @@
dictParser.setLogDictionaryProblems(true);
final InputSource source = new InputSource(adhocDictionaryPath.toExternalForm());
final List<SegmentDictionary> dictionaries = dictParser.parse(source);
- this.currentDictionaries.addAll(dictionaries);
+ this.adhocDictionaries.addAll(dictionaries);
}
}
@@ -397,7 +397,7 @@
return;
}
- if (orthography.isRecognizedWord(word, 0, word.length(), null, this.currentDictionaries)) {
+ if (orthography.isRecognizedWord(word, 0, word.length(), null, this.adhocDictionaries)) {
return;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2023-08-24 20:39:06
|
Revision: 13171
http://sourceforge.net/p/foray/code/13171
Author: victormote
Date: 2023-08-24 20:38:59 +0000 (Thu, 24 Aug 2023)
Log Message:
-----------
Parse and store new dictionary attributes.
Modified Paths:
--------------
trunk/foray/foray-orthography/src/main/data/orthographies/foray-orthography-config.xml
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/OrthographyServer4a.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/SegmentDictionary.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/DictionaryParserText.java
trunk/foray/foray-orthography/src/test/java/org/foray/orthography/SegmentDictionaryTests.java
trunk/foray/foray-orthography/src/test/java/org/foray/orthography/SegmentDictionaryWordTests.java
Modified: trunk/foray/foray-orthography/src/main/data/orthographies/foray-orthography-config.xml
===================================================================
--- trunk/foray/foray-orthography/src/main/data/orthographies/foray-orthography-config.xml 2023-08-24 20:38:26 UTC (rev 13170)
+++ trunk/foray/foray-orthography/src/main/data/orthographies/foray-orthography-config.xml 2023-08-24 20:38:59 UTC (rev 13171)
@@ -224,7 +224,7 @@
<derivative-factory class="org.foray.orthography.wrapper.LatinPossessive2WordFactory"/>
</derivative-factory-list>
- <dictionary-resource id="dictionary-eng-moby">
+ <dictionary-resource id="org.foray.eng.Latn.ZZZ">
<parsed-resource>
<resource-location type="classpath">/resources/org/foray/dictionaries/en-moby.jbso</resource-location>
</parsed-resource>
@@ -296,7 +296,7 @@
<explicit-tokens reference="eng-Latn-explicit-tokens"/>
<match-rules reference="eng-Latn-match-rules"/>
<derivative-rules reference="eng-Latn-derivative-patterns"/>
- <dictionary reference="dictionary-eng-moby"/>
+ <dictionary reference="org.foray.eng.Latn.ZZZ"/>
<hyphenation-patterns reference="hyph-patterns-eng"/>
<derivative-factories reference="eng-Latn-derivatives"/>
<orthography language-iso-3char="eng" script-iso-4char="Latn" country-iso-3char="USA"/>
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/OrthographyServer4a.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/OrthographyServer4a.java 2023-08-24 20:38:26 UTC (rev 13170)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/OrthographyServer4a.java 2023-08-24 20:38:59 UTC (rev 13171)
@@ -79,9 +79,9 @@
private EntityResolver entityResolver = null;
/** Map of writing systems and their orthographies. */
- private Map<WritingSystem, Orthography4a> orthographyMap =
- new HashMap<WritingSystem, Orthography4a>();
+ private Map<WritingSystem, Orthography4a> orthographyMap = new HashMap<WritingSystem, Orthography4a>();
+// private Map<String, Orthography4a>
/** The map of match rule lists, keyed by id. */
private Map<String, List<Pattern>> matchRuleLists = new HashMap<String, List<Pattern>>();
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/SegmentDictionary.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/SegmentDictionary.java 2023-08-24 20:38:26 UTC (rev 13170)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/SegmentDictionary.java 2023-08-24 20:38:59 UTC (rev 13171)
@@ -49,6 +49,12 @@
/** Constant needed for serialization. */
private static final long serialVersionUID = -8752423281137349847L;
+ /** The uniqe id for this dictionary. */
+ private String id;
+
+ /** The unique id of the dictionary that this dictionary overrides. */
+ private String overrides;
+
/** The data structure containing the dictionary words. */
private Map<CharSequence, SegmentDictionaryWord> wordMap;
@@ -61,15 +67,20 @@
/**
* Constructor.
+ * @param id The unique id for this dictionary.
+ * @param overrides The unique id of the dictionary that this dictionary overrides, if any.
* @param uniqueWordSegments The array of word segments that can be used by words in this dictionary.
* @param initialCapacity The number of words that are expected to be added to this dictionary.
* This will give the dictionary a clue about how best to balance memory and performance issues.
*/
- public SegmentDictionary(final StringWordSegment[] uniqueWordSegments, final int initialCapacity) {
+ public SegmentDictionary(final String id, final String overrides, final StringWordSegment[] uniqueWordSegments,
+ final int initialCapacity) {
if (uniqueWordSegments.length > Character.MAX_VALUE + 1) {
throw new IllegalArgumentException("Size of segments: " + uniqueWordSegments.length +
" exceeds capacity: " + (Character.MAX_VALUE + 1));
}
+ this.id = id;
+ this.overrides = overrides;
Arrays.sort(uniqueWordSegments);
this.wordSegments = uniqueWordSegments;
@@ -127,10 +138,12 @@
* This will probably require more memory than constructing an instance and adding words individually using the
* {@link #addWord(String, StringWord)} method.
* However, it is at least useful for tests.
+ * @param id The unique id for the new dictionary.
+ * @param overrides The unique id of the dictionary that this dictionary overrides, if any.
* @param stringWords The list of string words that will comprise the dictionary.
* @return The new dictionary instance.
*/
- public static SegmentDictionary make(final List<StringWord> stringWords) {
+ public static SegmentDictionary make(final String id, final String overrides, final List<StringWord> stringWords) {
final Set<StringWordSegmentUtf16> segments = new HashSet<StringWordSegmentUtf16>(stringWords.size() * 3);
for (int index = 0; index < stringWords.size(); index ++) {
final StringWord stringWord = stringWords.get(index);
@@ -141,7 +154,7 @@
}
final StringWordSegmentUtf16[] segmentArray = new StringWordSegmentUtf16[segments.size()];
segments.toArray(segmentArray);
- final SegmentDictionary dictionary = new SegmentDictionary(segmentArray, stringWords.size());
+ final SegmentDictionary dictionary = new SegmentDictionary(id, overrides, segmentArray, stringWords.size());
for (int index = 0; index < stringWords.size(); index ++) {
final StringWord stringWord = stringWords.get(index);
@@ -246,4 +259,20 @@
return false;
}
+ /**
+ * Returns the unique ID of this dictionary.
+ * @return The unique ID of this dictionary.
+ */
+ public String getId() {
+ return this.id;
+ }
+
+ /**
+ * Returns the unique ID of the dictionary that this dictionary overrides, if any.
+ * @return The unique ID of the dictionary that this dictionary overrides, if any.
+ */
+ public String getOverrides() {
+ return this.overrides;
+ }
+
}
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 2023-08-24 20:38:26 UTC (rev 13170)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/DictionaryParser.java 2023-08-24 20:38:59 UTC (rev 13171)
@@ -72,6 +72,12 @@
*/
private class DictionaryElement {
+ /** The id of the dictionary. */
+ private String id;
+
+ /** The id of the dictionary that this dictionary overrides, if any. */
+ private String overrides;
+
/** The orthography for this dictionary. */
private WritingSystem4a orthography;
@@ -155,7 +161,8 @@
final StringWordSegment[] uniqueWordSegments = new StringWordSegment[segmentSet.size()];
segmentSet.toArray(uniqueWordSegments);
Arrays.sort(uniqueWordSegments);
- final SegmentDictionary dictionary = new SegmentDictionary(uniqueWordSegments, this.wordMap.size());
+ final SegmentDictionary dictionary = new SegmentDictionary(this.currentDictionary.id,
+ this.currentDictionary.overrides, uniqueWordSegments, this.wordMap.size());
for (Map.Entry<String, StringWord> entry : this.wordMap.entrySet()) {
dictionary.addWord(entry.getKey(), entry.getValue());
@@ -292,9 +299,13 @@
case "word-group": break;
case "axsl-dictionary": {
this.currentDictionary = new DictionaryElement();
+
+ this.currentDictionary.id = attributes.getValue(StringUtils.EMPTY_STRING, "id");
+ this.currentDictionary.overrides = attributes.getValue(StringUtils.EMPTY_STRING, "overrides");
final String language = attributes.getValue(StringUtils.EMPTY_STRING, "language");
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);
debugMessage("Begin dictionary word list parsing: " + this.currentDictionary.orthography.toString());
final String soft = attributes.getValue(StringUtils.EMPTY_STRING, "soft-hyphen-char");
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/DictionaryParserText.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/DictionaryParserText.java 2023-08-24 20:38:26 UTC (rev 13170)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/DictionaryParserText.java 2023-08-24 20:38:59 UTC (rev 13171)
@@ -158,7 +158,7 @@
final StringWordSegment[] uniqueWordSegments = new StringWordSegment[segmentSet.size()];
segmentSet.toArray(uniqueWordSegments);
Arrays.sort(uniqueWordSegments);
- final SegmentDictionary dictionary = new SegmentDictionary(uniqueWordSegments, wordMap.size());
+ final SegmentDictionary dictionary = new SegmentDictionary("created", null, uniqueWordSegments, wordMap.size());
for (Map.Entry<String, StringWord> entry : wordMap.entrySet()) {
dictionary.addWord(entry.getKey(), entry.getValue());
}
Modified: trunk/foray/foray-orthography/src/test/java/org/foray/orthography/SegmentDictionaryTests.java
===================================================================
--- trunk/foray/foray-orthography/src/test/java/org/foray/orthography/SegmentDictionaryTests.java 2023-08-24 20:38:26 UTC (rev 13170)
+++ trunk/foray/foray-orthography/src/test/java/org/foray/orthography/SegmentDictionaryTests.java 2023-08-24 20:38:59 UTC (rev 13171)
@@ -97,7 +97,7 @@
* */
assertEquals(8, segmentsArray.length);
- out = new SegmentDictionary(segmentsArray, 1000);
+ out = new SegmentDictionary("test", null, segmentsArray, 1000);
out.addWord(WORD_ATTENTION.getActualContent().toString(), WORD_ATTENTION);
out.addWord(WORD_INTENTION.getActualContent().toString(), WORD_INTENTION);
out.addWord(WORD_AMBITION.getActualContent().toString(), WORD_AMBITION);
@@ -128,7 +128,7 @@
final List<StringWord> words = new ArrayList<StringWord>();
words.add(WORD_ATTENTION);
words.add(WORD_HARMONIOUS);
- final SegmentDictionary dictionary = SegmentDictionary.make(words);
+ final SegmentDictionary dictionary = SegmentDictionary.make("test", null, words);
assertEquals(2, dictionary.getSize());
assertEquals("at-ten-tion", dictionary.getWord("attention", 0).toString());
assertEquals("har-mo-ni-ous", dictionary.getWord("harmonious", 0).toString());
Modified: trunk/foray/foray-orthography/src/test/java/org/foray/orthography/SegmentDictionaryWordTests.java
===================================================================
--- trunk/foray/foray-orthography/src/test/java/org/foray/orthography/SegmentDictionaryWordTests.java 2023-08-24 20:38:26 UTC (rev 13170)
+++ trunk/foray/foray-orthography/src/test/java/org/foray/orthography/SegmentDictionaryWordTests.java 2023-08-24 20:38:59 UTC (rev 13171)
@@ -63,7 +63,7 @@
words.add(SegmentDictionaryTests.WORD_AMBITION);
words.add(SegmentDictionaryTests.WORD_INTREPID);
words.add(SegmentDictionaryTests.WORD_HARMONIOUS);
- dictionary = SegmentDictionary.make(words);
+ dictionary = SegmentDictionary.make("test", null, words);
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2023-08-24 20:38:28
|
Revision: 13170
http://sourceforge.net/p/foray/code/13170
Author: victormote
Date: 2023-08-24 20:38:26 +0000 (Thu, 24 Aug 2023)
Log Message:
-----------
Fix build problems related to change of foray-00-master to foray-00-dev.
Modified Paths:
--------------
trunk/foray/buildSrc/src/main/groovy/foray.common-conventions.gradle
trunk/foray/foray-common/src/main/java/org/foray/common/Environment.java
Modified: trunk/foray/buildSrc/src/main/groovy/foray.common-conventions.gradle
===================================================================
--- trunk/foray/buildSrc/src/main/groovy/foray.common-conventions.gradle 2023-08-24 19:24:51 UTC (rev 13169)
+++ trunk/foray/buildSrc/src/main/groovy/foray.common-conventions.gradle 2023-08-24 20:38:26 UTC (rev 13170)
@@ -196,7 +196,7 @@
checkstyle {
- configFile = new File(rootProject.projectDir.absolutePath + '/foray-00-master/config/checkstyle/checkstyle-config.xml')
+ configFile = new File(rootProject.projectDir.absolutePath + '/foray-00-dev/config/checkstyle/checkstyle-config.xml')
configProperties.put('foray.root', rootProject.projectDir)
toolVersion = versions.checkstyle
}
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/Environment.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/Environment.java 2023-08-24 19:24:51 UTC (rev 13169)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/Environment.java 2023-08-24 20:38:26 UTC (rev 13170)
@@ -119,7 +119,7 @@
*/
public static File getTestDirectory() throws IOException {
final File sandbox = Environment.getSandbox();
- return new File(sandbox, "foray-00-master/dist/resource/test/");
+ return new File(sandbox, "src/dist/resource/test/");
}
/**
@@ -129,7 +129,7 @@
*/
public static File getExamplesDirectory() throws IOException {
final File sandbox = Environment.getSandbox();
- return new File(sandbox, "foray-00-master/dist/resource/fo-examples/");
+ return new File(sandbox, "src/dist/resource/fo-examples/");
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2023-08-24 19:24:53
|
Revision: 13169
http://sourceforge.net/p/foray/code/13169
Author: victormote
Date: 2023-08-24 19:24:51 +0000 (Thu, 24 Aug 2023)
Log Message:
-----------
Add required tags to dictionary elements.
Modified Paths:
--------------
trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-GBR.dict.xml
trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-USA.dict.xml
trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-ZZZ-archaic.dict.xml
trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-ZZZ.dict.xml
trunk/foray/foray-orthography/src/main/data/dictionaries/fre-Latn-ZZZ.dict.xml
trunk/foray/foray-orthography/src/main/data/dictionaries/grc-Latn-ZZZ.dict.xml
trunk/foray/foray-orthography/src/main/data/dictionaries/heb-Latn-ZZZ.dict.xml
trunk/foray/foray-orthography/src/main/data/dictionaries/ita-Latn-ZZZ.dict.xml
trunk/foray/foray-orthography/src/main/data/dictionaries/lat-Latn-ZZZ.dict.xml
Modified: trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-GBR.dict.xml
===================================================================
--- trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-GBR.dict.xml 2023-08-24 02:14:15 UTC (rev 13168)
+++ trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-GBR.dict.xml 2023-08-24 19:24:51 UTC (rev 13169)
@@ -4,8 +4,10 @@
PUBLIC "-//aXSL//DTD Dictionary V0.1//EN"
"http://www.axsl.org/dtds/0.1/en/axsl-dictionary.dtd">
-<axsl-dictionary language="eng" script="Latn" hard-hyphen-char="="
- soft-hyphen-char="-">
+<axsl-dictionary
+ id="org.foray.eng.Latn.GBR" overrides="org.foray.eng.Latn.ZZZ"
+ language="eng" script="Latn" country="GBR"
+ hard-hyphen-char="=" soft-hyphen-char="-">
<!--
This dictionary contains the British spelling of English words whose spellings
Modified: trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-USA.dict.xml
===================================================================
--- trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-USA.dict.xml 2023-08-24 02:14:15 UTC (rev 13168)
+++ trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-USA.dict.xml 2023-08-24 19:24:51 UTC (rev 13169)
@@ -4,8 +4,10 @@
PUBLIC "-//aXSL//DTD Dictionary V0.1//EN"
"http://www.axsl.org/dtds/0.1/en/axsl-dictionary.dtd">
-<axsl-dictionary language="eng" script="Latn" hard-hyphen-char="="
- soft-hyphen-char="-">
+<axsl-dictionary
+ id="org.foray.eng.Latn.USA" overrides="org.foray.eng.Latn.ZZZ"
+ language="eng" script="Latn" country="USA"
+ hard-hyphen-char="=" soft-hyphen-char="-">
<!--
This dictionary contains the American spelling of English words whose spellings
Modified: trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-ZZZ-archaic.dict.xml
===================================================================
--- trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-ZZZ-archaic.dict.xml 2023-08-24 02:14:15 UTC (rev 13168)
+++ trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-ZZZ-archaic.dict.xml 2023-08-24 19:24:51 UTC (rev 13169)
@@ -4,8 +4,10 @@
PUBLIC "-//aXSL//DTD Dictionary V0.1//EN"
"http://www.axsl.org/dtds/0.1/en/axsl-dictionary.dtd">
-<axsl-dictionary language="eng" script="Latn" hard-hyphen-char="="
- soft-hyphen-char="-">
+<axsl-dictionary
+ id="org.foray.eng.Latn.ZZZ.1920" overrides="org.foray.eng.Latn.ZZZ"
+ language="eng" script="Latn" epoch="1920"
+ hard-hyphen-char="=" soft-hyphen-char="-">
<w><t>ac-o-lyth</t><noun><pluralizable/><convertible-to-possessive/></noun></w>
<w><t>arch-bish-op-rick</t><noun/></w>
Modified: trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-ZZZ.dict.xml
===================================================================
--- trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-ZZZ.dict.xml 2023-08-24 02:14:15 UTC (rev 13168)
+++ trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-ZZZ.dict.xml 2023-08-24 19:24:51 UTC (rev 13169)
@@ -4,8 +4,10 @@
PUBLIC "-//aXSL//DTD Dictionary V0.1//EN"
"http://www.axsl.org/dtds/0.1/en/axsl-dictionary.dtd">
-<axsl-dictionary language="eng" script="Latn" hard-hyphen-char="="
- soft-hyphen-char="-">
+<axsl-dictionary
+ id="org.foray.eng.Latn.ZZZ"
+ language="eng" script="Latn"
+ hard-hyphen-char="=" soft-hyphen-char="-">
<!--
# This original version of this file was downloaded by The FOray Project from
Modified: trunk/foray/foray-orthography/src/main/data/dictionaries/fre-Latn-ZZZ.dict.xml
===================================================================
--- trunk/foray/foray-orthography/src/main/data/dictionaries/fre-Latn-ZZZ.dict.xml 2023-08-24 02:14:15 UTC (rev 13168)
+++ trunk/foray/foray-orthography/src/main/data/dictionaries/fre-Latn-ZZZ.dict.xml 2023-08-24 19:24:51 UTC (rev 13169)
@@ -4,8 +4,10 @@
PUBLIC "-//aXSL//DTD Dictionary V0.1//EN"
"http://www.axsl.org/dtds/0.1/en/axsl-dictionary.dtd">
-<axsl-dictionary language="ita" script="Latn" hard-hyphen-char="="
- soft-hyphen-char="-">
+<axsl-dictionary
+ id="org.foray.fre.Latn.ZZZ"
+ language="ita" script="Latn"
+ hard-hyphen-char="=" soft-hyphen-char="-">
<!--
-->
Modified: trunk/foray/foray-orthography/src/main/data/dictionaries/grc-Latn-ZZZ.dict.xml
===================================================================
--- trunk/foray/foray-orthography/src/main/data/dictionaries/grc-Latn-ZZZ.dict.xml 2023-08-24 02:14:15 UTC (rev 13168)
+++ trunk/foray/foray-orthography/src/main/data/dictionaries/grc-Latn-ZZZ.dict.xml 2023-08-24 19:24:51 UTC (rev 13169)
@@ -4,8 +4,10 @@
PUBLIC "-//aXSL//DTD Dictionary V0.1//EN"
"http://www.axsl.org/dtds/0.1/en/axsl-dictionary.dtd">
-<axsl-dictionary language="grc" script="Latn" hard-hyphen-char="="
- soft-hyphen-char="-">
+<axsl-dictionary
+ id="org.foray.grc.Latn.ZZZ"
+ language="grc" script="Latn"
+ hard-hyphen-char="=" soft-hyphen-char="-">
<!--
Dictionary of Ancient Greek words that are transliterated into Latin script.
Modified: trunk/foray/foray-orthography/src/main/data/dictionaries/heb-Latn-ZZZ.dict.xml
===================================================================
--- trunk/foray/foray-orthography/src/main/data/dictionaries/heb-Latn-ZZZ.dict.xml 2023-08-24 02:14:15 UTC (rev 13168)
+++ trunk/foray/foray-orthography/src/main/data/dictionaries/heb-Latn-ZZZ.dict.xml 2023-08-24 19:24:51 UTC (rev 13169)
@@ -4,8 +4,10 @@
PUBLIC "-//aXSL//DTD Dictionary V0.1//EN"
"http://www.axsl.org/dtds/0.1/en/axsl-dictionary.dtd">
-<axsl-dictionary language="heb" script="Latn" hard-hyphen-char="="
- soft-hyphen-char="-">
+<axsl-dictionary
+ id="org.foray.heb.Latn.ZZZ"
+ language="heb" script="Latn"
+ hard-hyphen-char="=" soft-hyphen-char="-">
<!--
-->
Modified: trunk/foray/foray-orthography/src/main/data/dictionaries/ita-Latn-ZZZ.dict.xml
===================================================================
--- trunk/foray/foray-orthography/src/main/data/dictionaries/ita-Latn-ZZZ.dict.xml 2023-08-24 02:14:15 UTC (rev 13168)
+++ trunk/foray/foray-orthography/src/main/data/dictionaries/ita-Latn-ZZZ.dict.xml 2023-08-24 19:24:51 UTC (rev 13169)
@@ -4,8 +4,10 @@
PUBLIC "-//aXSL//DTD Dictionary V0.1//EN"
"http://www.axsl.org/dtds/0.1/en/axsl-dictionary.dtd">
-<axsl-dictionary language="ita" script="Latn" hard-hyphen-char="="
- soft-hyphen-char="-">
+<axsl-dictionary
+ id="org.foray.ita.Latn.ZZZ"
+ language="ita" script="Latn"
+ hard-hyphen-char="=" soft-hyphen-char="-">
<!--
-->
Modified: trunk/foray/foray-orthography/src/main/data/dictionaries/lat-Latn-ZZZ.dict.xml
===================================================================
--- trunk/foray/foray-orthography/src/main/data/dictionaries/lat-Latn-ZZZ.dict.xml 2023-08-24 02:14:15 UTC (rev 13168)
+++ trunk/foray/foray-orthography/src/main/data/dictionaries/lat-Latn-ZZZ.dict.xml 2023-08-24 19:24:51 UTC (rev 13169)
@@ -4,8 +4,10 @@
PUBLIC "-//aXSL//DTD Dictionary V0.1//EN"
"http://www.axsl.org/dtds/0.1/en/axsl-dictionary.dtd">
-<axsl-dictionary language="lat" script="Latn" hard-hyphen-char="="
- soft-hyphen-char="-">
+<axsl-dictionary
+ id="org.foray.lat.Latn.ZZZ"
+ language="lat" script="Latn"
+ hard-hyphen-char="=" soft-hyphen-char="-">
<!--
-->
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2023-08-24 02:14:18
|
Revision: 13168
http://sourceforge.net/p/foray/code/13168
Author: victormote
Date: 2023-08-24 02:14:15 +0000 (Thu, 24 Aug 2023)
Log Message:
-----------
Since terminal elements can't straddle words, replace them with whitespace, to clarify words breaks.
Modified Paths:
--------------
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/SpellChecker.java
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 2023-08-23 21:06:20 UTC (rev 13167)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/SpellChecker.java 2023-08-24 02:14:15 UTC (rev 13168)
@@ -333,6 +333,10 @@
/* Whether the writing system has changed or not, if we are at the end of a terminal element, process text. */
if (this.elementTerminalList.contains(localName)) {
checkWords(oldWritingSystem);
+ /* Since we are at the end of a terminal element, the next text should be the beginning of a word.
+ * Pretend like the end of this element is a single space, to avoid confusion about where and if a word
+ * is starting. */
+ appendText(StringUtils.SINGLE_SPACE);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2023-08-23 21:06:23
|
Revision: 13167
http://sourceforge.net/p/foray/code/13167
Author: victormote
Date: 2023-08-23 21:06:20 +0000 (Wed, 23 Aug 2023)
Log Message:
-----------
Include orthography data in distribution.
Modified Paths:
--------------
trunk/foray/build.gradle
Modified: trunk/foray/build.gradle
===================================================================
--- trunk/foray/build.gradle 2023-08-23 15:51:25 UTC (rev 13166)
+++ trunk/foray/build.gradle 2023-08-23 21:06:20 UTC (rev 13167)
@@ -60,6 +60,17 @@
}
+distributions {
+ main {
+ contents {
+ from ('foray-orthography/src/main') {
+ include 'data/**'
+ }
+ }
+ }
+}
+
+
/* Configure the aggregate javadocs. */
task allJavadoc(type: Javadoc) {
source subprojects.collect {project -> project.sourceSets.main.allJava}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2023-08-23 15:51:27
|
Revision: 13166
http://sourceforge.net/p/foray/code/13166
Author: victormote
Date: 2023-08-23 15:51:25 +0000 (Wed, 23 Aug 2023)
Log Message:
-----------
Ugly hack coding some specific configuration into general code -- for testing.
Modified Paths:
--------------
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/SpellChecker.java
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 2023-08-23 15:20:06 UTC (rev 13165)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/SpellChecker.java 2023-08-23 15:51:25 UTC (rev 13166)
@@ -410,8 +410,13 @@
* @return The writing system parsed from {@code attributes}.
*/
private WritingSystem4a parseWritingSystem(final Attributes attributes) {
- final String languageAttr = XML_LANG_ATTRIBUTE.getValue(attributes);
+ /* TODO: This is horrible. Make this all configurable. */
+ String languageAttr = XML_LANG_ATTRIBUTE.getValue(attributes);
if (languageAttr == null) {
+// languageAttr = attributes.getValue("http://www.portagepub.com/ns/Book/content", "Lang");
+ languageAttr = attributes.getValue("", "Lang");
+ }
+ if (languageAttr == null) {
if (getCurrentWritingSystem() == null) {
this.output.println("Orthography not specified. " + getLocationString(getLocator()));
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2023-08-23 15:20:10
|
Revision: 13165
http://sourceforge.net/p/foray/code/13165
Author: victormote
Date: 2023-08-23 15:20:06 +0000 (Wed, 23 Aug 2023)
Log Message:
-----------
Add and use command-line argument that provides the path to a catalog file.
Modified Paths:
--------------
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/SpellChecker.java
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 2023-08-23 11:02:30 UTC (rev 13164)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/SpellChecker.java 2023-08-23 15:20:06 UTC (rev 13165)
@@ -38,6 +38,7 @@
import org.foray.primitive.CharacterUtils;
import org.foray.primitive.StringUtils;
import org.foray.xml.SaxParser;
+import org.foray.xml.SaxUtils;
import org.foray.xml.dtd.DtdAttribute;
import org.axsl.i18n.WritingSystem;
@@ -55,6 +56,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.xml.sax.Attributes;
+import org.xml.sax.EntityResolver;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.XMLReader;
@@ -187,10 +189,14 @@
/** The counter for "Not found" words. */
private int notFoundCounter = 0;
+ /** The entity resolver for locating resources. */
+ private EntityResolver entityResolver;
+
/**
* Constructor.
* @param output The output stream to which the spelling errors should be written.
* @param orthographyConfigPath The path to the orthography configuration.
+ * @param xmlCatalogPath The path to a catalog file to be used for entity resolution.
* @param adhocDictionaryPaths (optional) List of paths to ad-hoc dictionaries to be used by the spell-checker.
* This is useful for cases where a document has words that are not found in standard dictionaries.
* This can be null.
@@ -198,8 +204,8 @@
* @throws IOException For input/output errors during parsing.
* @throws SAXException For errors found by the SAX parser.
*/
- public SpellChecker(final PrintStream output, final URL orthographyConfigPath, final List<URL> adhocDictionaryPaths)
- throws OrthographyException, IOException, SAXException {
+ public SpellChecker(final PrintStream output, final URL orthographyConfigPath, final String xmlCatalogPath,
+ final List<URL> adhocDictionaryPaths) throws OrthographyException, IOException, SAXException {
this.output = output;
final OrthographyServerConfig serverConfig = new OrthographyServerConfig();
@@ -215,12 +221,16 @@
this.currentDictionaries.addAll(dictionaries);
}
}
+
+ if (xmlCatalogPath != null) {
+ this.entityResolver = SaxUtils.getEntityResolver(xmlCatalogPath);
+ }
}
@Override
public Object parse(final InputSource inputSource) throws IOException, SAXException {
/* Skip validation. That should be handled upstream of this process. */
- final XMLReader parser = createSax2Parser(false, true, true, null, false);
+ final XMLReader parser = createSax2Parser(false, true, true, this.entityResolver, false);
parser.parse(inputSource);
cleanup();
return null;
@@ -451,11 +461,13 @@
final Option input = new Option("i", "input", true, "path to the input file");
input.setRequired(true);
final Option config = new Option("c", "config", true, "path to orthography configuration");
+ final Option xmlCatalog = new Option("x", "xml-catalog", true, "path to XML catalog file");
final Option dictionaries = new Option("d", "dictionary", true, "path(s) to ad-hoc dictionary(ies)");
dictionaries.setArgs(Option.UNLIMITED_VALUES);
clOptions.addOption(input);
clOptions.addOption(config);
+ clOptions.addOption(xmlCatalog);
clOptions.addOption(dictionaries);
return clOptions;
}
@@ -487,6 +499,7 @@
final String input = parsedCommandLine.getOptionValue("input");
final String config = parsedCommandLine.getOptionValue("config");
+ final String xmlCatalog = parsedCommandLine.getOptionValue("xml-catalog");
final String[] dictionariesArray = parsedCommandLine.getOptionValues("dictionary");
InputStream inputStream = null;
@@ -514,7 +527,7 @@
}
}
- final SpellChecker checker = new SpellChecker(output, orthographyConfigPath, dictionaries);
+ final SpellChecker checker = new SpellChecker(output, orthographyConfigPath, xmlCatalog, dictionaries);
checker.parse(inputSource);
} catch (final OrthographyException | IOException | SAXException e) {
logger.error("Error configuring or running: " + input, e);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2023-08-23 11:02:32
|
Revision: 13164
http://sourceforge.net/p/foray/code/13164
Author: victormote
Date: 2023-08-23 11:02:30 +0000 (Wed, 23 Aug 2023)
Log Message:
-----------
Update directory containing FOray DTDs.
Modified Paths:
--------------
trunk/foray/foray-common/src/main/java/org/foray/common/ForayEntityResolver.java
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/ForayEntityResolver.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/ForayEntityResolver.java 2023-08-22 23:50:29 UTC (rev 13163)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/ForayEntityResolver.java 2023-08-23 11:02:30 UTC (rev 13164)
@@ -109,7 +109,7 @@
* website directory in the "master" project, the IDE does not know about them.
* See build.gradle where the file is copied into the jar file.
* Therefore, we look for the file on the local file system. */
- final File file = new File("../foray-00-master/doc/web/dtds/0.1/en/" + dtdName);
+ final File file = new File("../foray-00-dev/doc/web/dtds/0.1/en/" + dtdName);
if (! file.exists()) {
return null;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2023-08-22 23:50:31
|
Revision: 13163
http://sourceforge.net/p/foray/code/13163
Author: victormote
Date: 2023-08-22 23:50:29 +0000 (Tue, 22 Aug 2023)
Log Message:
-----------
1. Restore foray-00-dev as a project, to have better access to its resources in IDEs. 2. Fix checkstyle config for new directory name.
Modified Paths:
--------------
trunk/foray/foray-00-dev/config/checkstyle/checkstyle-config.xml
trunk/foray/settings.gradle
Modified: trunk/foray/foray-00-dev/config/checkstyle/checkstyle-config.xml
===================================================================
--- trunk/foray/foray-00-dev/config/checkstyle/checkstyle-config.xml 2023-08-22 23:43:39 UTC (rev 13162)
+++ trunk/foray/foray-00-dev/config/checkstyle/checkstyle-config.xml 2023-08-22 23:50:29 UTC (rev 13163)
@@ -13,7 +13,7 @@
<!-- Reference the file with suppression information. -->
<module name="SuppressionFilter">
- <property name="file" value="${foray.root}/foray-00-master/config/checkstyle/checkstyle-suppressions.xml"/>
+ <property name="file" value="${foray.root}/foray-00-dev/config/checkstyle/checkstyle-suppressions.xml"/>
</module>
<module name="FileTabCharacter">
@@ -21,7 +21,7 @@
</module>
<module name="RegexpHeader">
- <property name="headerFile" value="${foray.root}/foray-00-master/config/checkstyle/checkstyle-header-java.txt"/>
+ <property name="headerFile" value="${foray.root}/foray-00-dev/config/checkstyle/checkstyle-header-java.txt"/>
</module>
<!-- Make sure each package has javadoc package-info.java. -->
Modified: trunk/foray/settings.gradle
===================================================================
--- trunk/foray/settings.gradle 2023-08-22 23:43:39 UTC (rev 13162)
+++ trunk/foray/settings.gradle 2023-08-22 23:50:29 UTC (rev 13163)
@@ -1,5 +1,6 @@
rootProject.name = 'foray'
+include 'foray-00-dev'
include 'foray-app'
include 'foray-areatree'
include 'foray-common'
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2023-08-22 23:43:40
|
Revision: 13162
http://sourceforge.net/p/foray/code/13162
Author: victormote
Date: 2023-08-22 23:43:39 +0000 (Tue, 22 Aug 2023)
Log Message:
-----------
Fix directory name of foray-00-dev.
Added Paths:
-----------
trunk/foray/foray-00-dev/
Removed Paths:
-------------
trunk/foray/00-foray-dev/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2023-08-22 23:32:04
|
Revision: 13161
http://sourceforge.net/p/foray/code/13161
Author: victormote
Date: 2023-08-22 23:32:02 +0000 (Tue, 22 Aug 2023)
Log Message:
-----------
Rename 00-dev to foray-00-dev in preparation for restoring it as a project.
Added Paths:
-----------
trunk/foray/00-foray-dev/
Removed Paths:
-------------
trunk/foray/00-dev/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2023-08-14 21:53:26
|
Revision: 13160
http://sourceforge.net/p/foray/code/13160
Author: victormote
Date: 2023-08-14 21:53:23 +0000 (Mon, 14 Aug 2023)
Log Message:
-----------
Include logging implementation jars in the standard distribution, along with readme files explaining how the classpath is built.
Modified Paths:
--------------
trunk/foray/src/dist/bin/foray-pretty.bat
trunk/foray/src/dist/bin/foray.bat
trunk/foray/src/dist/bin/foray.sh
trunk/foray/src/dist/lib-impl/00-readme.txt
Added Paths:
-----------
trunk/foray/src/dist/lib-local/
trunk/foray/src/dist/lib-local/00-readme.txt
Modified: trunk/foray/src/dist/bin/foray-pretty.bat
===================================================================
--- trunk/foray/src/dist/bin/foray-pretty.bat 2023-08-14 20:57:27 UTC (rev 13159)
+++ trunk/foray/src/dist/bin/foray-pretty.bat 2023-08-14 21:53:23 UTC (rev 13160)
@@ -14,13 +14,15 @@
echo Start pretty-printing of %INPUT_FILE%.
rem Set up the classpath.
-rem Save current directory and change to lib directory.
-pushd %~dp0..\lib
+rem Save current directory and change to the FOray root directory.
+pushd %~dp0..
rem Save value of current directory
-set FORAY_LIB_DIR=%cd%
-rem Restory original directory
+set FORAY_ROOT_DIR=%cd%
+rem Restore original directory
popd
-set FORAY_CP=%FORAY_LIB_DIR%\*
+set FORAY_CP=%FORAY_ROOT_DIR%\lib-local\*
+set FORAY_CP=%FORAY_CP%;%FORAY_ROOT_DIR%\lib\*
+set FORAY_CP=%FORAY_CP%;%FORAY_ROOT_DIR%\lib-impl\*
echo FORAY_CP:
echo %FORAY_CP%
Modified: trunk/foray/src/dist/bin/foray.bat
===================================================================
--- trunk/foray/src/dist/bin/foray.bat 2023-08-14 20:57:27 UTC (rev 13159)
+++ trunk/foray/src/dist/bin/foray.bat 2023-08-14 21:53:23 UTC (rev 13160)
@@ -10,13 +10,15 @@
set FORAY_LIB=..\lib
rem Set up the classpath.
-rem Save current directory and change to lib directory.
-pushd %~dp0..\lib
+rem Save current directory and change to the FOray root directory.
+pushd %~dp0..
rem Save value of current directory
-set FORAY_LIB_DIR=%cd%
-rem Restory original directory
+set FORAY_ROOT_DIR=%cd%
+rem Restore original directory
popd
-set FORAY_CP=%FORAY_LIB_DIR%\*
+set FORAY_CP=%FORAY_ROOT_DIR%\lib-local\*
+set FORAY_CP=%FORAY_CP%;%FORAY_ROOT_DIR%\lib\*
+set FORAY_CP=%FORAY_CP%;%FORAY_ROOT_DIR%\lib-impl\*
echo FORAY_CP:
echo %FORAY_CP%
Modified: trunk/foray/src/dist/bin/foray.sh
===================================================================
--- trunk/foray/src/dist/bin/foray.sh 2023-08-14 20:57:27 UTC (rev 13159)
+++ trunk/foray/src/dist/bin/foray.sh 2023-08-14 21:53:23 UTC (rev 13160)
@@ -17,6 +17,23 @@
FORAY_CP=$CLASSPATH
fi
+
+# Set up the classpath.
+# Save current directory and change to the FOray root directory.
+CURRENT_DIR = `pwd`
+cd ..
+FORAY_ROOT_DIR=`pwd`
+rem Restore original directory
+cd $CURRENT_DIR
+
+FORAY_CP=$FORAY_ROOT_DIR/lib-local/*
+FORAY_CP=$FORAY_CP:$FORAY_ROOT_DIR/lib/*
+FORAY_CP=$FORAY_CP:$FORAY_ROOT_DIR/lib-impl/*
+echo FORAY_CP:
+echo $FORAY_CP
+
+
+
# Add the library jar files to the FOray classpath
FORAY_LIB=../lib
Modified: trunk/foray/src/dist/lib-impl/00-readme.txt
===================================================================
--- trunk/foray/src/dist/lib-impl/00-readme.txt 2023-08-14 20:57:27 UTC (rev 13159)
+++ trunk/foray/src/dist/lib-impl/00-readme.txt 2023-08-14 21:53:23 UTC (rev 13160)
@@ -1,11 +1,33 @@
+General Comments about the jars in FOray classpath
+========================================================================
+The standard classpath used by FOray scripts looks for jar files in the
+following directories, in the following order:
+1. lib-local
+ always empty in the standard distribution, to be used only by the
+ local installation.
+2. lib
+ the standard jar files included in the FOray distribution.
+3. lib-impl
+ implementation jar files not needed to run FOray, but included as
+ a general convenience.
+
FOray has purposely been coded in such a way as to have no dependencies
-on any logger implementation. The jar files in this directory are
-included in a user library in Eclipse that can be used as a convenience
-for developers at development time only. Until we design a way to
-provide the user with a default logging implementation that doesn't
-interfere with their own logging intentions, these jar files should not
-be part of any FOray distribution.
+on any logger implementation. However, as a convenience, a simple logger
+implementation is included in this lib-impl directory so that, by
+default, some basic logging will be done.
+You will likely want to use a different logging implementation. The jar
+files for that implementation should be loaded into the lib-local
+directory, which is searched before either lib or lib-impl.
+
+You are of course free to arrange the content of lib-local and lib-impl
+as you see fit. We do not recommend either adding or deleting jar files
+to/from the lib directory.
+
+
+
+Comments about Logging implementation
+========================================================================
According to https://logback.qos.ch/dependencies.html, the following
are functionally equivalent:
1. Logback 1.3.x, supports Java EE ("javax" namespace), JDK 8.
Added: trunk/foray/src/dist/lib-local/00-readme.txt
===================================================================
--- trunk/foray/src/dist/lib-local/00-readme.txt (rev 0)
+++ trunk/foray/src/dist/lib-local/00-readme.txt 2023-08-14 21:53:23 UTC (rev 13160)
@@ -0,0 +1,6 @@
+This directory should always be empty in the standard FOray distribution.
+It is reserved for installations to include jar files for local use only,
+usually custom code or implementation code for such functions as logging.
+
+See ../lib-impl/00-readme.txt for a fuller explanation of the standard
+runtime configuration for FOray.
Property changes on: trunk/foray/src/dist/lib-local/00-readme.txt
___________________________________________________________________
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...> - 2023-08-14 20:57:28
|
Revision: 13159
http://sourceforge.net/p/foray/code/13159
Author: victormote
Date: 2023-08-14 20:57:27 +0000 (Mon, 14 Aug 2023)
Log Message:
-----------
Move logging implementation jar files to the distribution folder.
Added Paths:
-----------
trunk/foray/src/dist/lib-impl/
Removed Paths:
-------------
trunk/foray/00-dev/resources/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2023-08-12 13:23:38
|
Revision: 13158
http://sourceforge.net/p/foray/code/13158
Author: victormote
Date: 2023-08-12 13:23:37 +0000 (Sat, 12 Aug 2023)
Log Message:
-----------
Update class name to match changes to it.
Modified Paths:
--------------
trunk/foray/src/dist/bin/foray-pretty.bat
Modified: trunk/foray/src/dist/bin/foray-pretty.bat
===================================================================
--- trunk/foray/src/dist/bin/foray-pretty.bat 2023-08-12 11:43:20 UTC (rev 13157)
+++ trunk/foray/src/dist/bin/foray-pretty.bat 2023-08-12 13:23:37 UTC (rev 13158)
@@ -40,7 +40,7 @@
:verify
rem Make sure the pretty-printed version has the same content as original.
echo Comparing content for unintended changes during pretty-print.
-set CLASS=org.foray.xml.FOrayXDiff
+set CLASS=org.foray.xml.ForayXdiff
set COMMAND=java -cp %FORAY_CP% %CLASS% --files %INPUT_FILE% %TEMP_NAME% --catalog %CATALOG%
%COMMAND%
echo End comparison.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2023-08-12 11:43:22
|
Revision: 13157
http://sourceforge.net/p/foray/code/13157
Author: victormote
Date: 2023-08-12 11:43:20 +0000 (Sat, 12 Aug 2023)
Log Message:
-----------
Rename foray-00-master to 00-dev. Remove it as a project.
Modified Paths:
--------------
trunk/foray/settings.gradle
Added Paths:
-----------
trunk/foray/00-dev/
Removed Paths:
-------------
trunk/foray/foray-00-master/
Modified: trunk/foray/settings.gradle
===================================================================
--- trunk/foray/settings.gradle 2023-08-12 11:24:15 UTC (rev 13156)
+++ trunk/foray/settings.gradle 2023-08-12 11:43:20 UTC (rev 13157)
@@ -1,6 +1,5 @@
rootProject.name = 'foray'
-include 'foray-00-master'
include 'foray-app'
include 'foray-areatree'
include 'foray-common'
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2023-08-12 11:24:17
|
Revision: 13156
http://sourceforge.net/p/foray/code/13156
Author: victormote
Date: 2023-08-12 11:24:15 +0000 (Sat, 12 Aug 2023)
Log Message:
-----------
In order to use convention over configuration, move foray-00-master/dist to foray/src/dist.
Modified Paths:
--------------
trunk/foray/build.gradle
Added Paths:
-----------
trunk/foray/src/
trunk/foray/src/dist/
Removed Paths:
-------------
trunk/foray/foray-00-master/dist/
Modified: trunk/foray/build.gradle
===================================================================
--- trunk/foray/build.gradle 2023-08-12 11:05:22 UTC (rev 13155)
+++ trunk/foray/build.gradle 2023-08-12 11:24:15 UTC (rev 13156)
@@ -140,13 +140,4 @@
}
-distributions {
- main {
- contents {
- from "foray-00-master/dist"
- }
- }
-}
-
-
/* Last line of script. */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2023-08-12 11:05:24
|
Revision: 13155
http://sourceforge.net/p/foray/code/13155
Author: victormote
Date: 2023-08-12 11:05:22 +0000 (Sat, 12 Aug 2023)
Log Message:
-----------
Replace task building distribution zip with standard task in java-library-distributions.
Modified Paths:
--------------
trunk/foray/build.gradle
Removed Paths:
-------------
trunk/foray/readme.txt
Modified: trunk/foray/build.gradle
===================================================================
--- trunk/foray/build.gradle 2023-08-09 13:33:29 UTC (rev 13154)
+++ trunk/foray/build.gradle 2023-08-12 11:05:22 UTC (rev 13155)
@@ -6,7 +6,9 @@
Builds and publishes the artifacts to the local maven repository.
3. gradle zipAllJavadoc
Builds the aggregate javadocs for all Java code in foray and puts them in a zip file.
- 4. gradle zipAllBin
+ 4. gradle distZip
+ standard task in java-library-distribution
+ configure in "distributions"
Builds a zip file containing FOray executables and all runtime dependencies.
5. gradle zipAllSources
Builds a zip file containing all source code.
@@ -27,9 +29,37 @@
id 'foray.common-conventions'
id 'java'
id "com.autonomousapps.dependency-analysis" version "1.0.0-rc02"
+ id "java-library-distribution"
}
+/* Create dependency for all FOray projects, as this (root) project consolidates them all. */
+dependencies {
+ implementation (project(':foray-app'))
+ implementation (project(':foray-areatree'))
+ implementation (project(':foray-common'))
+ implementation (project(':foray-content'))
+ implementation (project(':foray-core'))
+ implementation (project(':foray-font'))
+ implementation (project(':foray-fotree'))
+ implementation (project(':foray-graphic'))
+ implementation (project(':foray-layout'))
+ implementation (project(':foray-linebreak'))
+ implementation (project(':foray-mif'))
+ implementation (project(':foray-orthography'))
+ implementation (project(':foray-output'))
+ implementation (project(':foray-pdf'))
+ implementation (project(':foray-pioneer'))
+ implementation (project(':foray-primitive'))
+ implementation (project(':foray-ps'))
+ implementation (project(':foray-render'))
+ implementation (project(':foray-speech'))
+ implementation (project(':foray-unicode'))
+ implementation (project(':foray-xml'))
+ /* DO NOT include foray-zz-attic as a dependency as we do not want it included in the distribution. */
+}
+
+
/* Configure the aggregate javadocs. */
task allJavadoc(type: Javadoc) {
source subprojects.collect {project -> project.sourceSets.main.allJava}
@@ -97,35 +127,6 @@
}
-task zipAllBin(type: Zip, dependsOn: build) {
- duplicatesStrategy = DuplicatesStrategy.EXCLUDE
- String internalDir = "foray-all-${archiveVersion.get()}-bin"
- archiveFileName = internalDir + ".zip"
-
- /* Include the jar files built for each subproject. */
- from(subprojects.collect {project -> project.tasks.withType(Jar)}) {
- exclude '*-javadoc.jar'
- exclude '*-sources.jar'
- exclude 'foray-zz-attic*'
- into "${internalDir}/lib"
- }
-
- /* Include the jar files for the dependencies for each subproject. */
- from(subprojects.collect {project -> project.sourceSets.main.compileClasspath}) {
- include '*.jar'
- into "${internalDir}/lib"
- }
-
- /* Include files especially created for this distribution. */
- from(project.projectDir.absolutePath + "/foray-00-master/dist") {
- include '**/**'
- into "${internalDir}"
- }
-
- destinationDirectory = file("${buildDir}")
-}
-
-
task zipAllSources(type: Zip) {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
String internalDir = "foray-all-${archiveVersion.get()}-sources"
@@ -138,4 +139,14 @@
destinationDirectory = file("${buildDir}")
}
+
+distributions {
+ main {
+ contents {
+ from "foray-00-master/dist"
+ }
+ }
+}
+
+
/* Last line of script. */
Deleted: trunk/foray/readme.txt
===================================================================
--- trunk/foray/readme.txt 2023-08-09 13:33:29 UTC (rev 13154)
+++ trunk/foray/readme.txt 2023-08-12 11:05:22 UTC (rev 13155)
@@ -1,214 +0,0 @@
-FOray is an open-source java software package that converts XSL-FO input to
-several output formats.
-
-More information can be found at http://www.foray.org
-
-A copy of the license follows:
-
-
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- 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.
-
-
-
-# Last Line of File
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2023-08-09 13:33:36
|
Revision: 13154
http://sourceforge.net/p/foray/code/13154
Author: victormote
Date: 2023-08-09 13:33:29 +0000 (Wed, 09 Aug 2023)
Log Message:
-----------
Upgrade Gradle to 8.2.1.
Modified Paths:
--------------
trunk/foray/build.gradle
trunk/foray/buildSrc/src/main/groovy/foray.common-conventions.gradle
trunk/foray/gradle/wrapper/gradle-wrapper.jar
trunk/foray/gradle/wrapper/gradle-wrapper.properties
trunk/foray/gradlew
trunk/foray/gradlew.bat
Modified: trunk/foray/build.gradle
===================================================================
--- trunk/foray/build.gradle 2023-08-08 23:07:19 UTC (rev 13153)
+++ trunk/foray/build.gradle 2023-08-09 13:33:29 UTC (rev 13154)
@@ -74,7 +74,7 @@
task zipAllJavadoc(type: Zip, dependsOn: allJavadoc) {
from ("${buildDir}/docs/javadoc")
archiveAppendix = "all"
- classifier = "javadoc"
+ archiveClassifier = "javadoc"
destinationDirectory = file("${buildDir}")
}
Modified: trunk/foray/buildSrc/src/main/groovy/foray.common-conventions.gradle
===================================================================
--- trunk/foray/buildSrc/src/main/groovy/foray.common-conventions.gradle 2023-08-08 23:07:19 UTC (rev 13153)
+++ trunk/foray/buildSrc/src/main/groovy/foray.common-conventions.gradle 2023-08-09 13:33:29 UTC (rev 13154)
@@ -140,12 +140,12 @@
}
task packageSources(type: Jar, dependsOn:classes) {
- classifier = 'sources'
+ archiveClassifier = 'sources'
from sourceSets.main.allSource
}
task packageJavadocs(type: Jar, dependsOn:javadoc) {
- classifier = 'javadoc'
+ archiveClassifier = 'javadoc'
from javadoc.destinationDir
}
Modified: trunk/foray/gradle/wrapper/gradle-wrapper.jar
===================================================================
(Binary files differ)
Modified: trunk/foray/gradle/wrapper/gradle-wrapper.properties
===================================================================
--- trunk/foray/gradle/wrapper/gradle-wrapper.properties 2023-08-08 23:07:19 UTC (rev 13153)
+++ trunk/foray/gradle/wrapper/gradle-wrapper.properties 2023-08-09 13:33:29 UTC (rev 13154)
@@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
+networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Modified: trunk/foray/gradlew
===================================================================
--- trunk/foray/gradlew 2023-08-08 23:07:19 UTC (rev 13153)
+++ trunk/foray/gradlew 2023-08-09 13:33:29 UTC (rev 13154)
@@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
-# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
+# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -80,11 +80,11 @@
esac
done
+# This is normally unused
+# shellcheck disable=SC2034
+APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
-APP_NAME="Gradle"
-APP_BASE_NAME=${0##*/}
-
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
@@ -143,6 +143,8 @@
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
+ # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
+ # shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
@@ -149,6 +151,8 @@
case $MAX_FD in #(
'' | soft) :;; #(
*)
+ # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
+ # shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
@@ -205,6 +209,12 @@
org.gradle.wrapper.GradleWrapperMain \
"$@"
+# Stop when "xargs" is not available.
+if ! command -v xargs >/dev/null 2>&1
+then
+ die "xargs is not available"
+fi
+
# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
Modified: trunk/foray/gradlew.bat
===================================================================
--- trunk/foray/gradlew.bat 2023-08-08 23:07:19 UTC (rev 13153)
+++ trunk/foray/gradlew.bat 2023-08-09 13:33:29 UTC (rev 13154)
@@ -14,7 +14,7 @@
@rem limitations under the License.
@rem
-@if "%DEBUG%" == "" @echo off
+@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@@ -25,7 +25,8 @@
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
+if "%DIRNAME%"=="" set DIRNAME=.
+@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@@ -40,7 +41,7 @@
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto execute
+if %ERRORLEVEL% equ 0 goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@@ -75,13 +76,15 @@
:end
@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
+if %ERRORLEVEL% equ 0 goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
+set EXIT_CODE=%ERRORLEVEL%
+if %EXIT_CODE% equ 0 set EXIT_CODE=1
+if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
+exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2023-08-08 23:07:21
|
Revision: 13153
http://sourceforge.net/p/foray/code/13153
Author: victormote
Date: 2023-08-08 23:07:19 +0000 (Tue, 08 Aug 2023)
Log Message:
-----------
To avoid gradle warnings about dependencies between projects, make zip file content dependent on build tasks instead of directly copying files.
Modified Paths:
--------------
trunk/foray/build.gradle
Modified: trunk/foray/build.gradle
===================================================================
--- trunk/foray/build.gradle 2023-08-08 21:43:36 UTC (rev 13152)
+++ trunk/foray/build.gradle 2023-08-08 23:07:19 UTC (rev 13153)
@@ -103,10 +103,10 @@
archiveFileName = internalDir + ".zip"
/* Include the jar files built for each subproject. */
- from(subprojects.collect {project -> "${project.buildDir}/libs"}) {
- include '*.jar'
+ from(subprojects.collect {project -> project.tasks.withType(Jar)}) {
exclude '*-javadoc.jar'
exclude '*-sources.jar'
+ exclude 'foray-zz-attic*'
into "${internalDir}/lib"
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2023-08-08 21:43:39
|
Revision: 13152
http://sourceforge.net/p/foray/code/13152
Author: victormote
Date: 2023-08-08 21:43:36 +0000 (Tue, 08 Aug 2023)
Log Message:
-----------
Fix build issues.
Modified Paths:
--------------
trunk/foray/buildSrc/src/main/groovy/foray.common-conventions.gradle
trunk/foray/foray-xml/build.gradle
Modified: trunk/foray/buildSrc/src/main/groovy/foray.common-conventions.gradle
===================================================================
--- trunk/foray/buildSrc/src/main/groovy/foray.common-conventions.gradle 2023-08-08 17:48:42 UTC (rev 13151)
+++ trunk/foray/buildSrc/src/main/groovy/foray.common-conventions.gradle 2023-08-08 21:43:36 UTC (rev 13152)
@@ -49,7 +49,7 @@
commonsCli: '1.5.0', // Latest is 1.5.0 as of 2022-11-26.
xmlResolver: '1.2', // Latest is 1.2 as of 2022-11-26. See Note 3.
xmlSchemaCore: '2.3.0', // Latest is 2.3.0 as of 2023-08-05.
- xerces2-J: '2.12.2', // Latest is 2.12.2 as of 2023-08-05.
+ xerces2_J: '2.12.2', // Latest is 2.12.2 as of 2023-08-05.
ant: '1.10.12', // Latest is 1.10.12 as of 2022-11-26.
servletApi: '4.0.1', // Latest is 4.0.1 as of 2022-11-26.
xmlgraphicsCommons: '2.6', // Latest is 2.6 as of 2022-01-17.
Modified: trunk/foray/foray-xml/build.gradle
===================================================================
--- trunk/foray/foray-xml/build.gradle 2023-08-08 17:48:42 UTC (rev 13151)
+++ trunk/foray/foray-xml/build.gradle 2023-08-08 21:43:36 UTC (rev 13152)
@@ -12,7 +12,7 @@
implementation (group: 'org.apache.ws.xmlschema', name: 'xmlschema-core', version: versions.xmlSchemaCore)
/* The Xerces parser is used because it handles numeric character references correctly, while the standard Java
parser currently does not. */
- implementation (group: 'xerces', name: 'xercesImpl', version: versions: xerces2-J)
+ implementation (group: 'xerces', name: 'xercesImpl', version: versions.xerces2_J)
api (group: "org.apache.xmlgraphics", name: "batik-dom", version: versions.batik)
api (group: "org.axsl.org.w3c.dom.mathml", name:"mathml-dom-java", version: versions.mathMlDom)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2023-08-08 17:48:44
|
Revision: 13151
http://sourceforge.net/p/foray/code/13151
Author: victormote
Date: 2023-08-08 17:48:42 +0000 (Tue, 08 Aug 2023)
Log Message:
-----------
Handle long attribute values.
Modified Paths:
--------------
trunk/foray/foray-xml/src/main/java/org/foray/xml/ForayPrettyPush.java
Modified: trunk/foray/foray-xml/src/main/java/org/foray/xml/ForayPrettyPush.java
===================================================================
--- trunk/foray/foray-xml/src/main/java/org/foray/xml/ForayPrettyPush.java 2023-08-08 17:26:16 UTC (rev 13150)
+++ trunk/foray/foray-xml/src/main/java/org/foray/xml/ForayPrettyPush.java 2023-08-08 17:48:42 UTC (rev 13151)
@@ -224,9 +224,11 @@
tagOpenBuffer.append(qName);
/* Accumulate the attributes. */
- final List<CharSequence> attributesList = new ArrayList<CharSequence>();
+ final List<CharSequence> attributesContent = new ArrayList<CharSequence>();
/* For attributes, indent two additional levels. */
final int attributeIndentation = (currentIndentation() + 2) * config.getIndent();
+ /* For attribute values that go to another line, indent even further. */
+ final int intraAttributeIndentation = (currentIndentation() + 4) * config.getIndent();
for (int i = 0; i < attributes.getLength(); i++) {
/* Check "isSpecified" to eliminate any attributes that were included by the parser as a default, in other
* words, attributes that did not actually exist in the parsed text. */
@@ -233,15 +235,29 @@
if (attributes.isSpecified(i)) {
final StringBuilder attributesBuffer = new StringBuilder();
if (this.elementStack.topIsBlockElement()) {
- attributesList.add(this.prettyOutput.getContingentIndentation(attributeIndentation));
+ attributesContent.add(this.prettyOutput.getContingentIndentation(attributeIndentation));
} else {
attributesBuffer.append(" ");
}
attributesBuffer.append(attributes.getQName(i));
attributesBuffer.append("=\"");
- attributesBuffer.append(attributes.getValue(i));
+ final String attributeValue = attributes.getValue(i);
+ if (attributeValue.contains(" ")) {
+ attributesContent.add(attributesBuffer.toString());
+ attributesBuffer.setLength(0);
+ final String[] pieces = attributeValue.split(" ");
+ for (int pieceIndex = 0; pieceIndex < pieces.length; pieceIndex ++) {
+ attributesContent.add(pieces[pieceIndex]);
+ if (pieceIndex < pieces.length - 1) {
+ attributesContent.add(
+ this.prettyOutput.getContingentIndentation(intraAttributeIndentation));
+ }
+ }
+ } else {
+ attributesBuffer.append(attributeValue);
+ }
attributesBuffer.append("\"");
- attributesList.add(attributesBuffer.toString());
+ attributesContent.add(attributesBuffer.toString());
}
}
@@ -267,7 +283,7 @@
}
/* Queue up the attributes and tag close. */
- this.prettyOutput.add(attributesList);
+ this.prettyOutput.add(attributesContent);
this.prettyOutput.add(tagCloseBuffer.toString());
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|