foray-commit Mailing List for FOray (Page 58)
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
(4) |
Dec
|
|
From: <vic...@us...> - 2022-01-22 13:30:57
|
Revision: 12452
http://sourceforge.net/p/foray/code/12452
Author: victormote
Date: 2022-01-22 13:30:52 +0000 (Sat, 22 Jan 2022)
Log Message:
-----------
Conform to aXSL changes: Rename methods for clarity and consistency.
Modified Paths:
--------------
trunk/foray/foray-app/src/test/java/org/foray/app/fo/AbstractFoTreeTest.java
trunk/foray/foray-app/src/test/java/org/foray/app/fo/TestFont.java
trunk/foray/foray-app/src/test/java/org/foray/app/fo/TestGraphic.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaTree4a.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/BookmarkArea.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalBlockArea4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/DescendantIterator.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/ForeignXml.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/obj/Metadata4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractCharacterSequence.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractFlow.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractFolioDescriptor.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractIndexFormatting.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractPageMaster.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractPageReference.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractTablePart.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BlockContainer4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Bookmark4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BookmarkTitle4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BookmarkTree4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ChangeBarBegin4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ChangeBarEnd4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Character4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ColorProfile4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ConditionalPageMasterReference4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Declarations4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ExternalGraphic4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Float4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowAssignment4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowMap4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowNameSpecifier4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowSourceList4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowTargetList4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Footnote4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FootnoteBody4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexKeyReference4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexPageCitationList4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexRangeBegin4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexRangeEnd4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/InitialPropertySet4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/InlineContainer4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/InstreamForeignObject4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/LayoutMasterSet4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Leader4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ListBlock4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ListItem4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ListItemBody4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ListItemLabel4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiCase4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiProperties4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiPropertySet4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiSwitch4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiToggle4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageMasterResolver4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageSequence4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageSequenceMaster4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageSequenceWrapper4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Region4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RegionNameSpecifier4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RepeatablePmAlternatives4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RepeatablePmReference4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RetrieveMarker4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RetrieveTableMarker4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Root4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/SinglePageMasterReference4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Table4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/TableAndCaption4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/TableCaption4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/TableCell4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/TableColumn4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/TableRow4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Title4a.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/AbstractMixedInlinePnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/AbstractTablePartPnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/BlockContainerPnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/BlockPnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FlowPnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FoNodePnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FoObjPnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FootnoteBodyPnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/ListBlockPnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/ListItemBodyPnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/ListItemLabelPnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/ListItemPnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/RetrieveMarkerPnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/StaticContentPnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/TableCellPnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/TablePnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/TableRowPnr.java
Modified: trunk/foray/foray-app/src/test/java/org/foray/app/fo/AbstractFoTreeTest.java
===================================================================
--- trunk/foray/foray-app/src/test/java/org/foray/app/fo/AbstractFoTreeTest.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-app/src/test/java/org/foray/app/fo/AbstractFoTreeTest.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -48,10 +48,10 @@
*/
protected Flow4a getFlow(final FoTree4a foTree) {
final Root4a root = foTree.getRootFo();
- FoObj node = root.formattingObjectAt(1);
+ FoObj node = root.formattingObjectChildAt(1);
Assert.assertTrue(node instanceof PageSequence4a);
final PageSequence4a sequence = (PageSequence4a) node;
- node = sequence.formattingObjectAt(0);
+ node = sequence.formattingObjectChildAt(0);
Assert.assertTrue(node instanceof Flow4a);
final Flow4a flow = (Flow4a) node;
return flow;
Modified: trunk/foray/foray-app/src/test/java/org/foray/app/fo/TestFont.java
===================================================================
--- trunk/foray/foray-app/src/test/java/org/foray/app/fo/TestFont.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-app/src/test/java/org/foray/app/fo/TestFont.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -59,7 +59,7 @@
"fo/font-family-001.fo");
final Flow4a flow = this.getFlow(foTree);
- FoObj node = flow.formattingObjectAt(0);
+ FoObj node = flow.formattingObjectChildAt(0);
Assert.assertTrue(node instanceof Block4a);
Block4a block = (Block4a) node;
List<String> fontFamilies = block.traitFontFamily(null);
@@ -67,7 +67,7 @@
/* The default font-family is "serif". */
Assert.assertEquals("serif", fontFamilies.get(0));
- node = flow.formattingObjectAt(1);
+ node = flow.formattingObjectChildAt(1);
Assert.assertTrue(node instanceof Block4a);
block = (Block4a) node;
fontFamilies = block.traitFontFamily(null);
@@ -89,7 +89,7 @@
final FoTree4a foTree = reader.buildFoTree("fo/font-size-001.fo");
final Flow4a flow = this.getFlow(foTree);
- FoObj node = flow.formattingObjectAt(0);
+ FoObj node = flow.formattingObjectChildAt(0);
Assert.assertTrue(node instanceof Block4a);
Block4a block = (Block4a) node;
int fontSize = block.traitFontSize(null);
@@ -96,13 +96,13 @@
/* The default font size is 12 points. */
Assert.assertEquals(12000, fontSize);
- node = flow.formattingObjectAt(1);
+ node = flow.formattingObjectChildAt(1);
Assert.assertTrue(node instanceof Block4a);
block = (Block4a) node;
fontSize = block.traitFontSize(null);
Assert.assertEquals(8000, fontSize);
- node = flow.formattingObjectAt(2);
+ node = flow.formattingObjectChildAt(2);
Assert.assertTrue(node instanceof Block4a);
block = (Block4a) node;
final Font font = node.getPrimaryFont(null).getFont();
Modified: trunk/foray/foray-app/src/test/java/org/foray/app/fo/TestGraphic.java
===================================================================
--- trunk/foray/foray-app/src/test/java/org/foray/app/fo/TestGraphic.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-app/src/test/java/org/foray/app/fo/TestGraphic.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -55,17 +55,17 @@
final Flow4a flow = this.getFlow(foTree);
/* The second child should be a block ... */
- FoObj node = flow.formattingObjectAt(1);
+ FoObj node = flow.formattingObjectChildAt(1);
Assert.assertTrue(node instanceof Block4a);
final Block4a block = (Block4a) node;
/* ... which contains an InstreamForeignObject ... */
- node = block.formattingObjectAt(0);
+ node = block.formattingObjectChildAt(0);
Assert.assertTrue(node instanceof InstreamForeignObject4a);
final InstreamForeignObject4a ifo = (InstreamForeignObject4a) node;
/* ... which contains an SVGElement ... */
- node = ifo.formattingObjectAt(0);
+ node = ifo.formattingObjectChildAt(0);
Assert.assertTrue(node instanceof InstreamSvgElement);
final InstreamSvgElement svgElement = (InstreamSvgElement) node;
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaTree4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaTree4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaTree4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -216,9 +216,9 @@
}
this.bookmarkTreeArea = BookmarkTreeArea.makeBookmarkTreeArea(
bookmarkTree, this);
- for (int i = 0; i < bookmarkTree.formattingObjectCount(); i++) {
+ for (int i = 0; i < bookmarkTree.qtyFormattingObjectChildren(); i++) {
final Bookmark bookmark = (Bookmark)
- bookmarkTree.formattingObjectAt(i);
+ bookmarkTree.formattingObjectChildAt(i);
this.bookmarkTreeArea.makeBookmarkArea(bookmark);
}
}
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/BookmarkArea.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/BookmarkArea.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/BookmarkArea.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -106,8 +106,8 @@
* @param bookmark The "generated-by" Bookmark.
*/
public void makeChildren(final Bookmark bookmark) {
- for (int i = 0; i < bookmark.formattingObjectCount(); i++) {
- final Fo child = bookmark.formattingObjectAt(i);
+ for (int i = 0; i < bookmark.qtyFormattingObjectChildren(); i++) {
+ final Fo child = bookmark.formattingObjectChildAt(i);
if (child instanceof Bookmark) {
this.makeBookmarkArea((Bookmark) child);
} else if (child instanceof BookmarkTitle) {
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalBlockArea4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalBlockArea4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalBlockArea4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -261,7 +261,7 @@
* actually have children. If the FONode has no children, then an empty
* area is needed in the area tree. */
if (this.qtyAreaNodeChildren() < 1
- && this.traitGeneratedBy().formattingObjectCount() != 0) {
+ && this.traitGeneratedBy().qtyFormattingObjectChildren() != 0) {
return true;
}
return false;
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/DescendantIterator.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/DescendantIterator.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/DescendantIterator.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -87,7 +87,7 @@
*/
private FoObj nextPreOrderBoundedNode(final FoObj node, final FoObj rootNode) {
// Any children?
- if (node.formattingObjectCount() > 0) {
+ if (node.qtyFormattingObjectChildren() > 0) {
return node.getChildren().get(0);
}
FoObj currentNode = node;
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -257,12 +257,12 @@
public abstract List<? extends FoObj> getChildren();
@Override
- public int formattingObjectCount() {
+ public int qtyFormattingObjectChildren() {
return this.getOtnChildCount();
}
@Override
- public FoObj formattingObjectAt(final int childIndex) {
+ public FoObj formattingObjectChildAt(final int childIndex) {
return getChildren().get(childIndex);
}
@@ -511,7 +511,7 @@
* @throws FoTreeException If this has any children.
*/
public void validateEmptyContent() throws FoTreeException {
- if (formattingObjectCount() > 0) {
+ if (qtyFormattingObjectChildren() > 0) {
throwException(this.getFullName() + " has NO content.");
}
}
@@ -521,7 +521,7 @@
* @throws FoTreeException If this has no children.
*/
public void validateAtLeastOneChild() throws FoTreeException {
- if (formattingObjectCount() < 1) {
+ if (qtyFormattingObjectChildren() < 1) {
throwException(this.getFullName() + " must have at least one child.");
}
}
@@ -3173,7 +3173,7 @@
if (this.getChildren() == null) {
return null;
}
- for (int i = 0; i < formattingObjectCount(); i++) {
+ for (int i = 0; i < qtyFormattingObjectChildren(); i++) {
final Object child = this.getChildren().get(i);
if (child instanceof FoLineText) {
return (FoLineText) child;
@@ -3410,7 +3410,7 @@
@Override
public boolean hasNext() {
- return this.nextIndex < formattingObjectCount();
+ return this.nextIndex < qtyFormattingObjectChildren();
}
@Override
@@ -3419,7 +3419,7 @@
throw new NoSuchElementException();
}
this.nextIndex ++;
- return formattingObjectAt(this.nextIndex - 1);
+ return formattingObjectChildAt(this.nextIndex - 1);
}
@Override
@@ -3703,8 +3703,8 @@
* @return True if and only if this object has at least one descendant block-level item.
*/
public boolean hasDescendantBlocks() {
- for (int index = 0; index < formattingObjectCount(); index ++) {
- final FoObj foobj = this.formattingObjectAt(index);
+ for (int index = 0; index < qtyFormattingObjectChildren(); index ++) {
+ final FoObj foobj = this.formattingObjectChildAt(index);
if (foobj.isAlwaysBlockContent()) {
return true;
} else if (foobj.hasDescendantBlocks()) {
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/ForeignXml.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/ForeignXml.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/ForeignXml.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -276,7 +276,7 @@
}
@Override
- public FoObj formattingObjectAt(final int index) {
+ public FoObj formattingObjectChildAt(final int index) {
return null;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/obj/Metadata4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/obj/Metadata4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/obj/Metadata4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -99,7 +99,7 @@
@Override
protected void validateDescendants() throws FoTreeException {
if (this.getChildren().size() != 1
- || ! (this.formattingObjectAt(0) instanceof FoTextCharacters4a)) {
+ || ! (this.formattingObjectChildAt(0) instanceof FoTextCharacters4a)) {
throwException("The content model for " + this.getFullName()
+ " is: (#PCDATA).");
}
@@ -142,7 +142,7 @@
public String getMetadataValue() {
/* Existence and casting verified at validateDescendants(). */
final FoTextCharacters4a text =
- (FoTextCharacters4a) this.formattingObjectAt(0);
+ (FoTextCharacters4a) this.formattingObjectChildAt(0);
return text.getRefinedText(null).toString();
}
@@ -212,7 +212,7 @@
}
@Override
- public FoObj formattingObjectAt(final int index) {
+ public FoObj formattingObjectChildAt(final int index) {
return this.children.get(index);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractCharacterSequence.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractCharacterSequence.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractCharacterSequence.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -283,7 +283,7 @@
}
@Override
- public FoObj formattingObjectAt(final int index) {
+ public FoObj formattingObjectChildAt(final int index) {
return null;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractFlow.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractFlow.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractFlow.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -130,7 +130,7 @@
}
@Override
- public FoObj formattingObjectAt(final int index) {
+ public FoObj formattingObjectChildAt(final int index) {
return this.children.get(index);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractFolioDescriptor.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractFolioDescriptor.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractFolioDescriptor.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -128,7 +128,7 @@
}
@Override
- public FoObj formattingObjectAt(final int index) {
+ public FoObj formattingObjectChildAt(final int index) {
return this.children.get(index);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractIndexFormatting.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractIndexFormatting.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractIndexFormatting.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -126,7 +126,7 @@
}
@Override
- public FoObj formattingObjectAt(final int index) {
+ public FoObj formattingObjectChildAt(final int index) {
return this.children.get(index);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractPageMaster.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractPageMaster.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractPageMaster.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -112,7 +112,7 @@
}
@Override
- public FoObj formattingObjectAt(final int index) {
+ public FoObj formattingObjectChildAt(final int index) {
return this.children.get(index);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractPageReference.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractPageReference.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractPageReference.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -93,7 +93,7 @@
}
@Override
- public FoObj formattingObjectAt(final int index) {
+ public FoObj formattingObjectChildAt(final int index) {
return null;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractTablePart.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractTablePart.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractTablePart.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -116,13 +116,13 @@
* overlap. Such overlap could be due to the same column-number being
* assigned to two different cells in the same row, or due to column
* or row spanning causing an overlap." */
- final int qtyRows = formattingObjectCount();
+ final int qtyRows = qtyFormattingObjectChildren();
final int qtyColumns = this.parent.numberOfColumns();
final TableCell4a[][] cellArray = new TableCell4a[qtyRows][qtyColumns];
for (int startingRow = 0; startingRow < qtyRows; startingRow++) {
- final TableRow4a tableRow = formattingObjectAt(startingRow);
- for (int i = 0; i < tableRow.formattingObjectCount(); i++) {
- final TableCell4a tableCell = (TableCell4a) tableRow.formattingObjectAt(i);
+ final TableRow4a tableRow = formattingObjectChildAt(startingRow);
+ for (int i = 0; i < tableRow.qtyFormattingObjectChildren(); i++) {
+ final TableCell4a tableCell = (TableCell4a) tableRow.formattingObjectChildAt(i);
if (tableCell != null) {
validateOverlapCell(cellArray, startingRow, tableCell);
}
@@ -262,7 +262,7 @@
}
@Override
- public TableRow4a formattingObjectAt(final int index) {
+ public TableRow4a formattingObjectChildAt(final int index) {
return this.children.get(index);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BlockContainer4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BlockContainer4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BlockContainer4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -147,7 +147,7 @@
}
@Override
- public FoObj formattingObjectAt(final int index) {
+ public FoObj formattingObjectChildAt(final int index) {
return this.children.get(index);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Bookmark4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Bookmark4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Bookmark4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -191,7 +191,7 @@
}
@Override
- public FoObj formattingObjectAt(final int index) {
+ public FoObj formattingObjectChildAt(final int index) {
return this.children.get(index);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BookmarkTitle4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BookmarkTitle4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BookmarkTitle4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -183,7 +183,7 @@
}
@Override
- public AbstractCharacterSequence formattingObjectAt(final int index) {
+ public AbstractCharacterSequence formattingObjectChildAt(final int index) {
return this.children.get(index);
}
@@ -192,7 +192,7 @@
if (this.children.size() < 1) {
return WellKnownConstants.EMPTY_STRING;
}
- final AbstractCharacterSequence child = this.formattingObjectAt(0);
+ final AbstractCharacterSequence child = this.formattingObjectChildAt(0);
final CharSequence text = child.getRefinedText(null);
return text.toString();
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BookmarkTree4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BookmarkTree4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/BookmarkTree4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -146,7 +146,7 @@
}
@Override
- public FoObj formattingObjectAt(final int index) {
+ public FoObj formattingObjectChildAt(final int index) {
return this.children.get(index);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ChangeBarBegin4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ChangeBarBegin4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ChangeBarBegin4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -138,7 +138,7 @@
}
@Override
- public FoObj formattingObjectAt(final int index) {
+ public FoObj formattingObjectChildAt(final int index) {
return null;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ChangeBarEnd4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ChangeBarEnd4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ChangeBarEnd4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -138,7 +138,7 @@
}
@Override
- public FoObj formattingObjectAt(final int index) {
+ public FoObj formattingObjectChildAt(final int index) {
return null;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Character4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Character4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Character4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -275,7 +275,7 @@
}
@Override
- public FoObj formattingObjectAt(final int index) {
+ public FoObj formattingObjectChildAt(final int index) {
return null;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ColorProfile4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ColorProfile4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ColorProfile4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -133,7 +133,7 @@
}
@Override
- public FoObj formattingObjectAt(final int index) {
+ public FoObj formattingObjectChildAt(final int index) {
return null;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ConditionalPageMasterReference4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ConditionalPageMasterReference4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ConditionalPageMasterReference4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -288,7 +288,7 @@
}
@Override
- public FoObj formattingObjectAt(final int index) {
+ public FoObj formattingObjectChildAt(final int index) {
return this.children.get(index);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Declarations4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Declarations4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Declarations4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -204,7 +204,7 @@
}
@Override
- public FoObj formattingObjectAt(final int index) {
+ public FoObj formattingObjectChildAt(final int index) {
return this.children.get(index);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ExternalGraphic4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ExternalGraphic4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ExternalGraphic4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -256,7 +256,7 @@
}
@Override
- public FoObj formattingObjectAt(final int index) {
+ public FoObj formattingObjectChildAt(final int index) {
return null;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Float4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Float4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Float4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -135,7 +135,7 @@
}
@Override
- public FoObj formattingObjectAt(final int index) {
+ public FoObj formattingObjectChildAt(final int index) {
return this.children.get(index);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowAssignment4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowAssignment4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowAssignment4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -166,7 +166,7 @@
}
@Override
- public FoObj formattingObjectAt(final int index) {
+ public FoObj formattingObjectChildAt(final int index) {
return this.children.get(index);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowMap4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowMap4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowMap4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -157,7 +157,7 @@
}
@Override
- public FlowAssignment4a formattingObjectAt(final int index) {
+ public FlowAssignment4a formattingObjectChildAt(final int index) {
return this.children.get(index);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowNameSpecifier4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowNameSpecifier4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowNameSpecifier4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -133,7 +133,7 @@
}
@Override
- public FoObj formattingObjectAt(final int index) {
+ public FoObj formattingObjectChildAt(final int index) {
return null;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowSourceList4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowSourceList4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowSourceList4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -160,7 +160,7 @@
}
@Override
- public FlowNameSpecifier4a formattingObjectAt(final int index) {
+ public FlowNameSpecifier4a formattingObjectChildAt(final int index) {
return this.children.get(index);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowTargetList4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowTargetList4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowTargetList4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -141,7 +141,7 @@
public List<String> childrenAsStrings() {
/* TODO: This is a bit ugly to build this each time. Consider caching
* the list. */
- final int size = formattingObjectCount();
+ final int size = qtyFormattingObjectChildren();
final List<String> theList = new ArrayList<String>(size);
for (int i = 0; i < size; i++) {
final RegionNameSpecifier4a specifier = this.children.get(i);
@@ -161,7 +161,7 @@
}
@Override
- public RegionNameSpecifier4a formattingObjectAt(final int index) {
+ public RegionNameSpecifier4a formattingObjectChildAt(final int index) {
return this.children.get(index);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Footnote4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Footnote4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Footnote4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -157,7 +157,7 @@
}
@Override
- public FoObj formattingObjectAt(final int index) {
+ public FoObj formattingObjectChildAt(final int index) {
return this.children.get(index);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FootnoteBody4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FootnoteBody4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FootnoteBody4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -136,7 +136,7 @@
}
@Override
- public FoObj formattingObjectAt(final int index) {
+ public FoObj formattingObjectChildAt(final int index) {
return this.children.get(index);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexKeyReference4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexKeyReference4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexKeyReference4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -138,7 +138,7 @@
}
@Override
- public FoObj formattingObjectAt(final int index) {
+ public FoObj formattingObjectChildAt(final int index) {
return this.children.get(index);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexPageCitationList4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexPageCitationList4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexPageCitationList4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -138,7 +138,7 @@
}
@Override
- public FoObj formattingObjectAt(final int index) {
+ public FoObj formattingObjectChildAt(final int index) {
return this.children.get(index);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexRangeBegin4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexRangeBegin4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexRangeBegin4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -138,7 +138,7 @@
}
@Override
- public FoObj formattingObjectAt(final int index) {
+ public FoObj formattingObjectChildAt(final int index) {
return null;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexRangeEnd4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexRangeEnd4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/IndexRangeEnd4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -137,7 +137,7 @@
}
@Override
- public FoObj formattingObjectAt(final int index) {
+ public FoObj formattingObjectChildAt(final int index) {
return null;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/InitialPropertySet4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/InitialPropertySet4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/InitialPropertySet4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -142,7 +142,7 @@
}
@Override
- public FoObj formattingObjectAt(final int index) {
+ public FoObj formattingObjectChildAt(final int index) {
return this.children.get(index);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/InlineContainer4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/InlineContainer4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/InlineContainer4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -142,7 +142,7 @@
}
@Override
- public FoObj formattingObjectAt(final int index) {
+ public FoObj formattingObjectChildAt(final int index) {
return this.children.get(index);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/InstreamForeignObject4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/InstreamForeignObject4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/InstreamForeignObject4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -209,7 +209,7 @@
}
@Override
- public FoObj formattingObjectAt(final int index) {
+ public FoObj formattingObjectChildAt(final int index) {
return this.children.get(index);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/LayoutMasterSet4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/LayoutMasterSet4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/LayoutMasterSet4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -421,7 +421,7 @@
}
@Override
- public FoObj formattingObjectAt(final int index) {
+ public FoObj formattingObjectChildAt(final int index) {
return this.children.get(index);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Leader4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Leader4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Leader4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -201,7 +201,7 @@
}
@Override
- public FoObj formattingObjectAt(final int index) {
+ public FoObj formattingObjectChildAt(final int index) {
return this.children.get(index);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ListBlock4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ListBlock4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ListBlock4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -82,11 +82,11 @@
@Override
protected void validateDescendants() throws FoTreeException {
- if (this.formattingObjectCount() < 1) {
+ if (this.qtyFormattingObjectChildren() < 1) {
this.throwException("fo:list-block must have at least one child.");
}
for (int i = 0; i < this.getChildren().size(); i++) {
- final FoObj fobj = this.formattingObjectAt(i);
+ final FoObj fobj = this.formattingObjectChildAt(i);
if (! (fobj instanceof ListItem4a)) {
this.throwException("Child of fo:list-block must be "
+ "fo:list-item");
@@ -145,7 +145,7 @@
}
@Override
- public FoObj formattingObjectAt(final int index) {
+ public FoObj formattingObjectChildAt(final int index) {
return this.children.get(index);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ListItem4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ListItem4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ListItem4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -165,7 +165,7 @@
}
@Override
- public FoObj formattingObjectAt(final int index) {
+ public FoObj formattingObjectChildAt(final int index) {
return this.children.get(index);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ListItemBody4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ListItemBody4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ListItemBody4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -147,7 +147,7 @@
}
@Override
- public FoObj formattingObjectAt(final int index) {
+ public FoObj formattingObjectChildAt(final int index) {
return this.children.get(index);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ListItemLabel4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ListItemLabel4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ListItemLabel4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -147,7 +147,7 @@
}
@Override
- public FoObj formattingObjectAt(final int index) {
+ public FoObj formattingObjectChildAt(final int index) {
return this.children.get(index);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiCase4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiCase4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiCase4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -137,7 +137,7 @@
}
@Override
- public FoObj formattingObjectAt(final int index) {
+ public FoObj formattingObjectChildAt(final int index) {
return this.children.get(index);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiProperties4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiProperties4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiProperties4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -136,7 +136,7 @@
}
@Override
- public FoObj formattingObjectAt(final int index) {
+ public FoObj formattingObjectChildAt(final int index) {
return this.children.get(index);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiPropertySet4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiPropertySet4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiPropertySet4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -132,7 +132,7 @@
}
@Override
- public FoObj formattingObjectAt(final int index) {
+ public FoObj formattingObjectChildAt(final int index) {
return null;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiSwitch4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiSwitch4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiSwitch4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -136,7 +136,7 @@
}
@Override
- public FoObj formattingObjectAt(final int index) {
+ public FoObj formattingObjectChildAt(final int index) {
return this.children.get(index);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiToggle4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiToggle4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiToggle4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -137,7 +137,7 @@
}
@Override
- public FoObj formattingObjectAt(final int index) {
+ public FoObj formattingObjectChildAt(final int index) {
return this.children.get(index);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageMasterResolver4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageMasterResolver4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageMasterResolver4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -141,8 +141,8 @@
final PageSequenceMaster4a psm) {
this.currentSubSequenceNumber++;
if (this.currentSubSequenceNumber >= 0
- && this.currentSubSequenceNumber < psm.formattingObjectCount()) {
- final SubSequenceSpecifier specifier = psm.formattingObjectAt(
+ && this.currentSubSequenceNumber < psm.qtyFormattingObjectChildren()) {
+ final SubSequenceSpecifier specifier = psm.formattingObjectChildAt(
this.currentSubSequenceNumber);
return makeWrapper(specifier);
}
@@ -299,9 +299,9 @@
return null;
}
- for (int i = 0; i < this.wrapped.formattingObjectCount(); i++) {
+ for (int i = 0; i < this.wrapped.qtyFormattingObjectChildren(); i++) {
final ConditionalPageMasterReference4a cpmr =
- this.wrapped.formattingObjectAt(i);
+ this.wrapped.formattingObjectChildAt(i);
if (cpmr.matchesCriteria(isFirstPage, isLastPage, isOddPage,
isEmptyPage)) {
return cpmr.traitMasterReference();
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageSequence4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageSequence4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageSequence4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -341,7 +341,7 @@
}
@Override
- public FoObj formattingObjectAt(final int index) {
+ public FoObj formattingObjectChildAt(final int index) {
return this.children.get(index);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageSequenceMaster4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageSequenceMaster4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageSequenceMaster4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -153,8 +153,8 @@
* page-sequence-master has not been defined.
*/
public void validatePageExistence() throws FoTreeException {
- for (int i = 0; i < formattingObjectCount(); i++) {
- final SubSequenceSpecifier specifier = formattingObjectAt(i);
+ for (int i = 0; i < qtyFormattingObjectChildren(); i++) {
+ final SubSequenceSpecifier specifier = formattingObjectChildAt(i);
specifier.validatePageExistence();
}
}
@@ -209,7 +209,7 @@
}
@Override
- public SubSequenceSpecifier formattingObjectAt(final int index) {
+ public SubSequenceSpecifier formattingObjectChildAt(final int index) {
return this.children.get(index);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageSequenceWrapper4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageSequenceWrapper4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageSequenceWrapper4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -146,7 +146,7 @@
}
@Override
- public FoObj formattingObjectAt(final int index) {
+ public FoObj formattingObjectChildAt(final int index) {
return this.children.get(index);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Region4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Region4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Region4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -218,7 +218,7 @@
}
@Override
- public FoObj formattingObjectAt(final int index) {
+ public FoObj formattingObjectChildAt(final int index) {
return this.children.get(index);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RegionNameSpecifier4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RegionNameSpecifier4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RegionNameSpecifier4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -135,7 +135,7 @@
}
@Override
- public FoObj formattingObjectAt(final int index) {
+ public FoObj formattingObjectChildAt(final int index) {
return null;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RepeatablePmAlternatives4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RepeatablePmAlternatives4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RepeatablePmAlternatives4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -105,8 +105,8 @@
@Override
public void validatePageExistence() throws FoTreeException {
- for (int i = 0; i < this.formattingObjectCount(); i++) {
- final ConditionalPageMasterReference4a child = this.formattingObjectAt(i);
+ for (int i = 0; i < this.qtyFormattingObjectChildren(); i++) {
+ final ConditionalPageMasterReference4a child = this.formattingObjectChildAt(i);
child.validatePageExistence();
}
}
@@ -132,7 +132,7 @@
}
@Override
- public ConditionalPageMasterReference4a formattingObjectAt(final int index) {
+ public ConditionalPageMasterReference4a formattingObjectChildAt(final int index) {
return this.children.get(index);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RepeatablePmReference4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RepeatablePmReference4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RepeatablePmReference4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -126,7 +126,7 @@
}
@Override
- public FoObj formattingObjectAt(final int index) {
+ public FoObj formattingObjectChildAt(final int index) {
return null;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RetrieveMarker4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RetrieveMarker4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RetrieveMarker4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -191,7 +191,7 @@
}
@Override
- public FoObj formattingObjectAt(final int index) {
+ public FoObj formattingObjectChildAt(final int index) {
return null;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RetrieveTableMarker4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RetrieveTableMarker4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RetrieveTableMarker4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -135,7 +135,7 @@
}
@Override
- public FoObj formattingObjectAt(final int index) {
+ public FoObj formattingObjectChildAt(final int index) {
return null;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Root4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Root4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Root4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -494,7 +494,7 @@
}
@Override
- public FoObj formattingObjectAt(final int index) {
+ public FoObj formattingObjectChildAt(final int index) {
return this.children.get(index);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/SinglePageMasterReference4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/SinglePageMasterReference4a.java 2022-01-22 12:58:06 UTC (rev 12451)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/SinglePageMasterReference4a.java 2022-01-22 13:30:52 UTC (rev 12452)
@@ -124,7 +124,7 @@
}
@Override
- public FoObj formattingObjectAt(final int index) {
+ public FoObj formattingObjectChildAt(final int index) {
return null;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Table4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/f...
[truncated message content] |
|
From: <vic...@us...> - 2022-01-22 12:58:09
|
Revision: 12451
http://sourceforge.net/p/foray/code/12451
Author: victormote
Date: 2022-01-22 12:58:06 +0000 (Sat, 22 Jan 2022)
Log Message:
-----------
Conform to aXSL changes: Rename methods for clarity and consistency.
Modified Paths:
--------------
trunk/foray/foray-app/src/test/java/org/foray/app/area/AbstractAreaTreeTest.java
trunk/foray/foray-app/src/test/java/org/foray/app/area/TestBlock.java
trunk/foray/foray-app/src/test/java/org/foray/app/area/TestBorder.java
trunk/foray/foray-app/src/test/java/org/foray/app/area/TestGraphicArea.java
trunk/foray/foray-app/src/test/java/org/foray/app/area/TestInline.java
trunk/foray/foray-app/src/test/java/org/foray/app/area/TestVertical.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaNode4a.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/BasicLinkArea.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/BidiOverrideArea.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/IndexPageCitationListArea.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/InlineArea.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/LeaderArea.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/LineArea4a.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/MainRa4a.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalBlockArea4a.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalFlowRa4a.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/PageNumberArea.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/PageNumberCitationArea.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/PageNumberCitationLastArea.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/PageRa4a.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/SpanRa4a.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FootnoteBodyPnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/PioneerLayoutStrategy.java
trunk/foray/foray-render/src/main/java/org/foray/render/Renderer.java
trunk/foray/foray-render/src/main/java/org/foray/render/pdf/PdfRenderer.java
Modified: trunk/foray/foray-app/src/test/java/org/foray/app/area/AbstractAreaTreeTest.java
===================================================================
--- trunk/foray/foray-app/src/test/java/org/foray/app/area/AbstractAreaTreeTest.java 2022-01-22 12:23:38 UTC (rev 12450)
+++ trunk/foray/foray-app/src/test/java/org/foray/app/area/AbstractAreaTreeTest.java 2022-01-22 12:58:06 UTC (rev 12451)
@@ -100,10 +100,10 @@
final RegionBodyRa4a regionBody = firstPage.getRegionBody(
"xsl-region-body");
final MainRa4a main = regionBody.getMainRefArea();
- AreaNode4a node = main.areaNodeAt(0);
+ AreaNode4a node = main.areaNodeChildAt(0);
Assert.assertTrue(node instanceof SpanRa4a);
final SpanRa4a span = (SpanRa4a) node;
- node = span.areaNodeAt(0);
+ node = span.areaNodeChildAt(0);
Assert.assertTrue(node instanceof NormalFlowRa4a);
final NormalFlowRa4a nfa = (NormalFlowRa4a) node;
return nfa;
@@ -119,7 +119,7 @@
*/
protected PageCollection4a getPageCollection(final AreaTree4a areaTree,
final int collectionNum) {
- final AreaNode4a node = areaTree.areaNodeAt(0);
+ final AreaNode4a node = areaTree.areaNodeChildAt(0);
Assert.assertTrue(node instanceof PageCollection4a);
final PageCollection4a pageCollection = (PageCollection4a) node;
return pageCollection;
@@ -139,8 +139,8 @@
/* Convert the ordinal page number to an index into the children. */
final int index = pageNum - 1;
Assert.assertTrue(index >= 0);
- Assert.assertTrue(index < pageCollection.areaNodeCount());
- final AreaNode4a node = pageCollection.areaNodeAt(index);
+ Assert.assertTrue(index < pageCollection.qtyAreaNodeChildren());
+ final AreaNode4a node = pageCollection.areaNodeChildAt(index);
Assert.assertTrue(node instanceof PageRa4a);
final PageRa4a page = (PageRa4a) node;
return page;
Modified: trunk/foray/foray-app/src/test/java/org/foray/app/area/TestBlock.java
===================================================================
--- trunk/foray/foray-app/src/test/java/org/foray/app/area/TestBlock.java 2022-01-22 12:23:38 UTC (rev 12450)
+++ trunk/foray/foray-app/src/test/java/org/foray/app/area/TestBlock.java 2022-01-22 12:58:06 UTC (rev 12451)
@@ -77,7 +77,7 @@
areaTree);
/* The outer block area. */
- AreaNode4a node = firstNormalFlowArea.areaNodeAt(0);
+ AreaNode4a node = firstNormalFlowArea.areaNodeChildAt(0);
Assert.assertTrue(node instanceof NormalBlockArea4a);
final NormalBlockArea4a outerBlockArea = (NormalBlockArea4a) node;
/* 1 inch left margin. */
@@ -89,7 +89,7 @@
Assert.assertEquals(432000, outerBlockArea.crIpd());
/* The first child of the outer block area is a line-area. */
- node = outerBlockArea.areaNodeAt(0);
+ node = outerBlockArea.areaNodeChildAt(0);
Assert.assertTrue(node instanceof LineArea4a);
LineArea4a lineArea = (LineArea4a) node;
/* Should have anterior space of one half-leading, which comes from the
@@ -108,7 +108,7 @@
Assert.assertEquals(12000, lineArea.crBpd());
/* The second child of the outer block area is a block-area. */
- node = outerBlockArea.areaNodeAt(1);
+ node = outerBlockArea.areaNodeChildAt(1);
Assert.assertTrue(node instanceof NormalBlockArea4a);
final NormalBlockArea4a insideBlockArea = (NormalBlockArea4a) node;
/* Should have anterior space of one half-leading, which comes from the
@@ -126,7 +126,7 @@
Assert.assertEquals(0, insideBlockArea.crBpd());
/* The third child of the outer block area is another line-area. */
- node = outerBlockArea.areaNodeAt(2);
+ node = outerBlockArea.areaNodeChildAt(2);
Assert.assertTrue(node instanceof LineArea4a);
lineArea = (LineArea4a) node;
/* Should have anterior space of one half-leading, which comes from the
@@ -143,7 +143,7 @@
Assert.assertEquals(12000, lineArea.crBpd());
/* The fourth child of the outer block area is another line-area. */
- node = outerBlockArea.areaNodeAt(3);
+ node = outerBlockArea.areaNodeChildAt(3);
Assert.assertTrue(node instanceof LineArea4a);
lineArea = (LineArea4a) node;
/* Should have anterior space of two half-leadings, one from the space-
@@ -173,7 +173,7 @@
final AreaTree4a areaTree = creator.buildAreaTree("fo/block-002.fo", getTextServer(), getLineBreakerFactory());
final PageCollection4a pageCollection = this.getPageCollection(areaTree,
1);
- final int numPages = pageCollection.areaNodeCount();
+ final int numPages = pageCollection.qtyAreaNodeChildren();
Assert.assertEquals(2, numPages);
final String documentContent = this.getText(areaTree);
final String testString =
@@ -256,7 +256,7 @@
areaTree);
/* Test location and dimensions of the block area. */
- AreaNode4a node = firstNormalFlowArea.areaNodeAt(0);
+ AreaNode4a node = firstNormalFlowArea.areaNodeChildAt(0);
Assert.assertTrue(node instanceof NormalBlockArea4a);
final NormalBlockArea4a blockArea = (NormalBlockArea4a) node;
/* 1 inch left margin. */
@@ -268,7 +268,7 @@
Assert.assertEquals(468000, blockArea.crIpd());
/* Test location and dimensions of the line area. */
- node = blockArea.areaNodeAt(0);
+ node = blockArea.areaNodeChildAt(0);
Assert.assertTrue(node instanceof LineArea4a);
final LineArea4a lineArea = (LineArea4a) node;
/* x same as the parent block. */
@@ -280,7 +280,7 @@
/* Test location and dimensions of the text area. The key thing we are
* testing here is that IT IS CENTERED. */
- node = lineArea.areaNodeAt(0);
+ node = lineArea.areaNodeChildAt(0);
Assert.assertTrue(node instanceof TextArea);
final TextArea textArea = (TextArea) node;
@@ -319,7 +319,7 @@
areaTree);
/* Test location and dimensions of the block area. */
- AreaNode4a node = firstNormalFlowArea.areaNodeAt(0);
+ AreaNode4a node = firstNormalFlowArea.areaNodeChildAt(0);
Assert.assertTrue(node instanceof NormalBlockArea4a);
final NormalBlockArea4a blockArea = (NormalBlockArea4a) node;
/* 1 inch left margin. */
@@ -331,7 +331,7 @@
Assert.assertEquals(468000, blockArea.crIpd());
/* Test location and dimensions of the line area. */
- node = blockArea.areaNodeAt(0);
+ node = blockArea.areaNodeChildAt(0);
Assert.assertTrue(node instanceof LineArea4a);
final LineArea4a lineArea = (LineArea4a) node;
/* x same as the parent block. */
@@ -343,7 +343,7 @@
/* Test location and dimensions of the text area. The key thing we are
* testing here is that IT IS CENTERED. */
- node = lineArea.areaNodeAt(0);
+ node = lineArea.areaNodeChildAt(0);
Assert.assertTrue(node instanceof TextArea);
final TextArea textArea = (TextArea) node;
Modified: trunk/foray/foray-app/src/test/java/org/foray/app/area/TestBorder.java
===================================================================
--- trunk/foray/foray-app/src/test/java/org/foray/app/area/TestBorder.java 2022-01-22 12:23:38 UTC (rev 12450)
+++ trunk/foray/foray-app/src/test/java/org/foray/app/area/TestBorder.java 2022-01-22 12:58:06 UTC (rev 12451)
@@ -56,7 +56,7 @@
final NormalFlowRa4a firstNormalFlowArea = this.getFirstNormalFlowArea(
areaTree);
- final AreaNode4a node = firstNormalFlowArea.areaNodeAt(0);
+ final AreaNode4a node = firstNormalFlowArea.areaNodeChildAt(0);
Assert.assertTrue(node instanceof NormalBlockArea4a);
final NormalBlockArea4a blockArea = (NormalBlockArea4a) node;
Assert.assertEquals(72000, blockArea.brOriginX());
Modified: trunk/foray/foray-app/src/test/java/org/foray/app/area/TestGraphicArea.java
===================================================================
--- trunk/foray/foray-app/src/test/java/org/foray/app/area/TestGraphicArea.java 2022-01-22 12:23:38 UTC (rev 12450)
+++ trunk/foray/foray-app/src/test/java/org/foray/app/area/TestGraphicArea.java 2022-01-22 12:58:06 UTC (rev 12451)
@@ -61,20 +61,20 @@
areaTree);
/* There are two block areas. */
- Assert.assertEquals(2, firstNormalFlowArea.areaNodeCount());
+ Assert.assertEquals(2, firstNormalFlowArea.qtyAreaNodeChildren());
/* The second one contains the graphic. */
- AreaNode4a node = firstNormalFlowArea.areaNodeAt(1);
+ AreaNode4a node = firstNormalFlowArea.areaNodeChildAt(1);
Assert.assertTrue(node instanceof NormalBlockArea4a);
/* It has one child, a LineArea ... */
- Assert.assertEquals(1, node.areaNodeCount());
- node = node.areaNodeAt(0);
+ Assert.assertEquals(1, node.qtyAreaNodeChildren());
+ node = node.areaNodeChildAt(0);
Assert.assertTrue(node instanceof LineArea4a);
/* ... which has one child, an ExternalGraphicArea. */
- Assert.assertEquals(1, node.areaNodeCount());
- node = node.areaNodeAt(0);
+ Assert.assertEquals(1, node.qtyAreaNodeChildren());
+ node = node.areaNodeChildAt(0);
Assert.assertTrue(node instanceof ExternalGraphicArea);
/* First test the size of the viewport. */
Modified: trunk/foray/foray-app/src/test/java/org/foray/app/area/TestInline.java
===================================================================
--- trunk/foray/foray-app/src/test/java/org/foray/app/area/TestInline.java 2022-01-22 12:23:38 UTC (rev 12450)
+++ trunk/foray/foray-app/src/test/java/org/foray/app/area/TestInline.java 2022-01-22 12:58:06 UTC (rev 12451)
@@ -59,46 +59,46 @@
final AreaTree4a areaTree = creator.buildAreaTree("fo/inline-001.fo", getTextServer(), getLineBreakerFactory());
final NormalFlowRa4a firstNormalFlowArea = this.getFirstNormalFlowArea(
areaTree);
- Assert.assertEquals(1, firstNormalFlowArea.areaNodeCount());
+ Assert.assertEquals(1, firstNormalFlowArea.qtyAreaNodeChildren());
/* The block area. */
- AreaNode4a node = firstNormalFlowArea.areaNodeAt(0);
+ AreaNode4a node = firstNormalFlowArea.areaNodeChildAt(0);
Assert.assertTrue(node instanceof NormalBlockArea4a);
final NormalBlockArea4a blockArea = (NormalBlockArea4a) node;
- Assert.assertEquals(1, blockArea.areaNodeCount());
+ Assert.assertEquals(1, blockArea.qtyAreaNodeChildren());
/* The only child of the block area is a line area. */
- node = blockArea.areaNodeAt(0);
+ node = blockArea.areaNodeChildAt(0);
Assert.assertTrue(node instanceof LineArea4a);
final LineArea4a lineArea = (LineArea4a) node;
- Assert.assertEquals(3, lineArea.areaNodeCount());
+ Assert.assertEquals(3, lineArea.qtyAreaNodeChildren());
/* The first child of the line area is a text area. */
- node = lineArea.areaNodeAt(0);
+ node = lineArea.areaNodeChildAt(0);
Assert.assertTrue(node instanceof TextArea);
final TextArea textArea1 = (TextArea) node;
Assert.assertEquals("Lighter(1), ", textArea1.getText().toString());
/* The second child of the line area is the outside inline area. */
- node = lineArea.areaNodeAt(1);
+ node = lineArea.areaNodeChildAt(1);
Assert.assertTrue(node instanceof InlineArea);
final InlineArea inlineArea1 = (InlineArea) node;
- Assert.assertEquals(3, inlineArea1.areaNodeCount());
+ Assert.assertEquals(3, inlineArea1.qtyAreaNodeChildren());
/* The first child of the outside inline area is a text area. */
- node = inlineArea1.areaNodeAt(0);
+ node = inlineArea1.areaNodeChildAt(0);
Assert.assertTrue(node instanceof TextArea);
final TextArea textArea2 = (TextArea) node;
Assert.assertEquals("Bolder(1), ", textArea2.getText().toString());
/* The second child of the outside inline area is the inside inline area. */
- node = inlineArea1.areaNodeAt(1);
+ node = inlineArea1.areaNodeChildAt(1);
Assert.assertTrue(node instanceof InlineArea);
final InlineArea inlineArea2 = (InlineArea) node;
- Assert.assertEquals(1, inlineArea2.areaNodeCount());
+ Assert.assertEquals(1, inlineArea2.qtyAreaNodeChildren());
/* The first and only child of the inside inline area is a text area. */
- node = inlineArea2.areaNodeAt(0);
+ node = inlineArea2.areaNodeChildAt(0);
Assert.assertTrue(node instanceof TextArea);
final TextArea textArea3 = (TextArea) node;
final String textArea3Text = textArea3.getText().toString();
@@ -105,13 +105,13 @@
Assert.assertEquals("Lighter(2), ", textArea3Text);
/* The third child of the outside inline area is another text area. */
- node = inlineArea1.areaNodeAt(2);
+ node = inlineArea1.areaNodeChildAt(2);
Assert.assertTrue(node instanceof TextArea);
final TextArea textArea4 = (TextArea) node;
Assert.assertEquals("Bolder(2), ", textArea4.getText().toString());
/* The third child of the line area is another text area. */
- node = lineArea.areaNodeAt(2);
+ node = lineArea.areaNodeChildAt(2);
Assert.assertTrue(node instanceof TextArea);
final TextArea textArea5 = (TextArea) node;
Assert.assertEquals("Lighter(3).", textArea5.getText().toString());
Modified: trunk/foray/foray-app/src/test/java/org/foray/app/area/TestVertical.java
===================================================================
--- trunk/foray/foray-app/src/test/java/org/foray/app/area/TestVertical.java 2022-01-22 12:23:38 UTC (rev 12450)
+++ trunk/foray/foray-app/src/test/java/org/foray/app/area/TestVertical.java 2022-01-22 12:58:06 UTC (rev 12451)
@@ -62,7 +62,7 @@
areaTree);
/* The block area. */
- AreaNode4a node = firstNormalFlowArea.areaNodeAt(0);
+ AreaNode4a node = firstNormalFlowArea.areaNodeChildAt(0);
Assert.assertTrue(node instanceof NormalBlockArea4a);
final NormalBlockArea4a blockArea = (NormalBlockArea4a) node;
final FontUse font = blockArea.getPrimaryFont();
@@ -70,13 +70,13 @@
Assert.assertEquals(12000, blockArea.traitFontSize());
/* The first child of the block area is a line-area. */
- node = blockArea.areaNodeAt(0);
+ node = blockArea.areaNodeChildAt(0);
Assert.assertTrue(node instanceof LineArea4a);
final LineArea4a lineArea = (LineArea4a) node;
final int lineY = lineArea.alignmentPointY();
/* The second child of the line area is an inline-area. */
- node = lineArea.areaNodeAt(1);
+ node = lineArea.areaNodeChildAt(1);
Assert.assertTrue(node instanceof InlineArea);
final InlineArea inlineArea = (InlineArea) node;
final int inlineY = inlineArea.baselineY();
@@ -88,7 +88,7 @@
Assert.assertEquals(expectedInlineY, inlineY);
/* The first child of the inline-area is a text area. */
- node = inlineArea.areaNodeAt(0);
+ node = inlineArea.areaNodeChildAt(0);
Assert.assertTrue(node instanceof TextArea);
final TextArea textArea = (TextArea) node;
final int inlineYTextArea = textArea.baselineY();
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaNode4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaNode4a.java 2022-01-22 12:23:38 UTC (rev 12450)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaNode4a.java 2022-01-22 12:58:06 UTC (rev 12451)
@@ -104,12 +104,12 @@
public abstract List<? extends AreaNode4a> getChildren();
@Override
- public int areaNodeCount() {
+ public int qtyAreaNodeChildren() {
return getChildren().size();
}
@Override
- public AreaNode4a areaNodeAt(final int childIndex) {
+ public AreaNode4a areaNodeChildAt(final int childIndex) {
if (childIndex < 0) {
return null;
}
@@ -644,7 +644,7 @@
@Override
public boolean hasNext() {
- return this.nextIndex < areaNodeCount();
+ return this.nextIndex < qtyAreaNodeChildren();
}
@Override
@@ -653,7 +653,7 @@
throw new NoSuchElementException();
}
this.nextIndex ++;
- return areaNodeAt(this.nextIndex - 1);
+ return areaNodeChildAt(this.nextIndex - 1);
}
@Override
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/BasicLinkArea.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/BasicLinkArea.java 2022-01-22 12:23:38 UTC (rev 12450)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/BasicLinkArea.java 2022-01-22 12:58:06 UTC (rev 12451)
@@ -113,7 +113,7 @@
@Override
protected boolean optimize() {
this.optimizeChildren();
- if (areaNodeCount() < 1) {
+ if (qtyAreaNodeChildren() < 1) {
return true;
}
return false;
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/BidiOverrideArea.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/BidiOverrideArea.java 2022-01-22 12:23:38 UTC (rev 12450)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/BidiOverrideArea.java 2022-01-22 12:58:06 UTC (rev 12451)
@@ -112,7 +112,7 @@
@Override
protected boolean optimize() {
this.optimizeChildren();
- if (areaNodeCount() < 1) {
+ if (qtyAreaNodeChildren() < 1) {
return true;
}
return false;
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/IndexPageCitationListArea.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/IndexPageCitationListArea.java 2022-01-22 12:23:38 UTC (rev 12450)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/IndexPageCitationListArea.java 2022-01-22 12:58:06 UTC (rev 12451)
@@ -114,7 +114,7 @@
@Override
protected boolean optimize() {
this.optimizeChildren();
- if (areaNodeCount() < 1) {
+ if (qtyAreaNodeChildren() < 1) {
return true;
}
return false;
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/InlineArea.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/InlineArea.java 2022-01-22 12:23:38 UTC (rev 12450)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/InlineArea.java 2022-01-22 12:58:06 UTC (rev 12451)
@@ -120,7 +120,7 @@
@Override
protected boolean optimize() {
this.optimizeChildren();
- if (areaNodeCount() < 1) {
+ if (qtyAreaNodeChildren() < 1) {
return true;
}
return false;
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/LeaderArea.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/LeaderArea.java 2022-01-22 12:23:38 UTC (rev 12450)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/LeaderArea.java 2022-01-22 12:58:06 UTC (rev 12451)
@@ -389,7 +389,7 @@
protected boolean optimize() {
this.optimizeChildren();
if (this.traitLeaderPattern() == LeaderPattern.USE_CONTENT
- && areaNodeCount() < 1) {
+ && qtyAreaNodeChildren() < 1) {
return true;
}
return false;
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/LineArea4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/LineArea4a.java 2022-01-22 12:23:38 UTC (rev 12450)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/LineArea4a.java 2022-01-22 12:58:06 UTC (rev 12451)
@@ -158,7 +158,7 @@
/* Optimize in post-traversal order. Allow children to optimize
* themselves before optimizing the line. */
this.optimizeChildren();
- if (this.areaNodeCount() < 1) {
+ if (this.qtyAreaNodeChildren() < 1) {
return true;
}
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/MainRa4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/MainRa4a.java 2022-01-22 12:23:38 UTC (rev 12450)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/MainRa4a.java 2022-01-22 12:58:06 UTC (rev 12451)
@@ -108,7 +108,7 @@
}
@Override
- public SpanRa4a areaNodeAt(final int childIndex) {
+ public SpanRa4a areaNodeChildAt(final int childIndex) {
return this.children.get(childIndex);
}
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalBlockArea4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalBlockArea4a.java 2022-01-22 12:23:38 UTC (rev 12450)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalBlockArea4a.java 2022-01-22 12:58:06 UTC (rev 12451)
@@ -183,10 +183,10 @@
*/
public LineArea4a getLastChildIfLineArea() {
if (this.getChildren() == null
- || areaNodeCount() < 1) {
+ || qtyAreaNodeChildren() < 1) {
return null;
}
- final int lastIndex = areaNodeCount() - 1;
+ final int lastIndex = qtyAreaNodeChildren() - 1;
final AreaNode4a lastChild = this.getChildren().get(lastIndex);
if (lastChild instanceof LineArea4a) {
return (LineArea4a) lastChild;
@@ -260,7 +260,7 @@
/* Remove empty block areas only if they are generated by FONodes that
* actually have children. If the FONode has no children, then an empty
* area is needed in the area tree. */
- if (this.areaNodeCount() < 1
+ if (this.qtyAreaNodeChildren() < 1
&& this.traitGeneratedBy().formattingObjectCount() != 0) {
return true;
}
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalFlowRa4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalFlowRa4a.java 2022-01-22 12:23:38 UTC (rev 12450)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalFlowRa4a.java 2022-01-22 12:58:06 UTC (rev 12451)
@@ -100,7 +100,7 @@
}
final SpanRa4a newSpan = getParent().getOverflowArea(this);
- return newSpan.areaNodeAt(0);
+ return newSpan.areaNodeChildAt(0);
// // If my children are overflowed, I must be also.
// final Area4a overflowArea = ancestorArea().getOverflowArea(this);
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/PageNumberArea.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/PageNumberArea.java 2022-01-22 12:23:38 UTC (rev 12450)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/PageNumberArea.java 2022-01-22 12:58:06 UTC (rev 12451)
@@ -132,7 +132,7 @@
@Override
protected boolean optimize() {
this.optimizeChildren();
- if (areaNodeCount() < 1) {
+ if (qtyAreaNodeChildren() < 1) {
return true;
}
return false;
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/PageNumberCitationArea.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/PageNumberCitationArea.java 2022-01-22 12:23:38 UTC (rev 12450)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/PageNumberCitationArea.java 2022-01-22 12:58:06 UTC (rev 12451)
@@ -145,7 +145,7 @@
@Override
protected boolean optimize() {
this.optimizeChildren();
- if (areaNodeCount() < 1) {
+ if (qtyAreaNodeChildren() < 1) {
return true;
}
return false;
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/PageNumberCitationLastArea.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/PageNumberCitationLastArea.java 2022-01-22 12:23:38 UTC (rev 12450)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/PageNumberCitationLastArea.java 2022-01-22 12:58:06 UTC (rev 12451)
@@ -145,7 +145,7 @@
@Override
protected boolean optimize() {
this.optimizeChildren();
- if (this.areaNodeCount() < 1) {
+ if (this.qtyAreaNodeChildren() < 1) {
return true;
}
return false;
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/PageRa4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/PageRa4a.java 2022-01-22 12:23:38 UTC (rev 12450)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/PageRa4a.java 2022-01-22 12:58:06 UTC (rev 12451)
@@ -717,7 +717,7 @@
public boolean isBlank() {
for (int index = 0; index < this.bodies.size(); index ++) {
final RegionBodyRa4a regionBodyRa = this.bodies.get(index);
- if (regionBodyRa.areaNodeCount() > 0) {
+ if (regionBodyRa.qtyAreaNodeChildren() > 0) {
return false;
}
}
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/SpanRa4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/SpanRa4a.java 2022-01-22 12:23:38 UTC (rev 12450)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/SpanRa4a.java 2022-01-22 12:58:06 UTC (rev 12451)
@@ -123,7 +123,7 @@
}
@Override
- public NormalFlowRa4a areaNodeAt(final int childIndex) {
+ public NormalFlowRa4a areaNodeChildAt(final int childIndex) {
return this.children.get(childIndex);
}
@@ -215,9 +215,9 @@
/* Since this is overflow, the new span area should have the same number of columns as the one from the
* previous page. */
- final int qtyColumns = nfra.getParent().areaNodeCount();
+ final int qtyColumns = nfra.getParent().qtyAreaNodeChildren();
newMainRa.addSpanArea(qtyColumns);
- return newMainRa.areaNodeAt(0);
+ return newMainRa.areaNodeChildAt(0);
}
/**
Modified: trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FootnoteBodyPnr.java
===================================================================
--- trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FootnoteBodyPnr.java 2022-01-22 12:23:38 UTC (rev 12450)
+++ trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FootnoteBodyPnr.java 2022-01-22 12:58:06 UTC (rev 12451)
@@ -108,7 +108,7 @@
private void layoutFootnoteSeparator(final RegionBodyRa bac, final FootnoteRa footArea) throws AreaTreeException {
/* TODO: It seems like this logic should be done once when the
* PageCollection is first started, and cached there for reuse. */
- if (footArea.areaNodeCount() != 0) {
+ if (footArea.qtyAreaNodeChildren() != 0) {
return;
}
final PageSequence pageSeq = bac.getPage().getParent().getPageSequence();
Modified: trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/PioneerLayoutStrategy.java
===================================================================
--- trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/PioneerLayoutStrategy.java 2022-01-22 12:23:38 UTC (rev 12450)
+++ trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/PioneerLayoutStrategy.java 2022-01-22 12:58:06 UTC (rev 12451)
@@ -305,7 +305,7 @@
switch (breakableNode.traitBreakBefore(area)) {
case PAGE: {
// if first ColumnArea, and empty, return OK
- if (colArea.areaNodeCount() == 0
+ if (colArea.qtyAreaNodeChildren() == 0
&& (colArea.siblingIndex() == 0)) {
return Status.OK;
}
@@ -314,7 +314,7 @@
case ODD_PAGE: {
// if first ColumnArea, empty, _and_ in odd page,
// return OK
- if (colArea.areaNodeCount() == 0
+ if (colArea.qtyAreaNodeChildren() == 0
&& (colArea.siblingIndex() == 0)
&& (colArea.getPage().getNumber() % 2 != 0)) {
return Status.OK;
@@ -324,7 +324,7 @@
case EVEN_PAGE: {
// if first ColumnArea, empty, _and_ in even page,
// return OK
- if (colArea.areaNodeCount() == 0
+ if (colArea.qtyAreaNodeChildren() == 0
&& (colArea.siblingIndex() == 0)
&& (colArea.getPage().getNumber() % 2 == 0)) {
return Status.OK;
@@ -333,7 +333,7 @@
}
case COLUMN: {
// if ColumnArea is empty return OK
- if (colArea.areaNodeCount() == 0) {
+ if (colArea.qtyAreaNodeChildren() == 0) {
return Status.OK;
}
return Status.FORCE_COLUMN_BREAK;
Modified: trunk/foray/foray-render/src/main/java/org/foray/render/Renderer.java
===================================================================
--- trunk/foray/foray-render/src/main/java/org/foray/render/Renderer.java 2022-01-22 12:23:38 UTC (rev 12450)
+++ trunk/foray/foray-render/src/main/java/org/foray/render/Renderer.java 2022-01-22 12:58:06 UTC (rev 12451)
@@ -367,8 +367,8 @@
* @throws GalleyVisitorException For errors during rendering.
*/
public Void renderChildren(final AreaNodeG5 area) throws GalleyVisitorException {
- for (int i = 0; i < area.areaNodeCount(); i++) {
- final AreaNodeG5 child = area.areaNodeAt(i);
+ for (int i = 0; i < area.qtyAreaNodeChildren(); i++) {
+ final AreaNodeG5 child = area.areaNodeChildAt(i);
child.acceptVisitor(this);
}
return null;
@@ -503,8 +503,8 @@
if (bookmarkTree != null) {
render(bookmarkTree);
}
- for (int i = 0; i < this.areaTree.areaNodeCount(); i++) {
- final AreaNodeG5 atNode = this.areaTree.areaNodeAt(i);
+ for (int i = 0; i < this.areaTree.qtyAreaNodeChildren(); i++) {
+ final AreaNodeG5 atNode = this.areaTree.areaNodeChildAt(i);
if (! (atNode instanceof PageCollectionG5)) {
atNode.acceptVisitor(this);
}
Modified: trunk/foray/foray-render/src/main/java/org/foray/render/pdf/PdfRenderer.java
===================================================================
--- trunk/foray/foray-render/src/main/java/org/foray/render/pdf/PdfRenderer.java 2022-01-22 12:23:38 UTC (rev 12450)
+++ trunk/foray/foray-render/src/main/java/org/foray/render/pdf/PdfRenderer.java 2022-01-22 12:58:06 UTC (rev 12451)
@@ -589,8 +589,8 @@
if (area.isLinkRoot()) {
createBasicLink(area);
}
- for (int i = 0; i < area.areaNodeCount(); i++) {
- final AreaNodeG5 child = area.areaNodeAt(i);
+ for (int i = 0; i < area.qtyAreaNodeChildren(); i++) {
+ final AreaNodeG5 child = area.areaNodeChildAt(i);
if (! (child instanceof AreaG5)) {
continue;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-01-22 12:23:39
|
Revision: 12450
http://sourceforge.net/p/foray/code/12450
Author: victormote
Date: 2022-01-22 12:23:38 +0000 (Sat, 22 Jan 2022)
Log Message:
-----------
Remove unnecessary instance variable.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/main/java/org/foray/area/PageCollection4a.java
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/PageCollection4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/PageCollection4a.java 2022-01-22 01:15:29 UTC (rev 12449)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/PageCollection4a.java 2022-01-22 12:23:38 UTC (rev 12450)
@@ -70,9 +70,6 @@
/** The children of this node. */
private List<PageRa4a> children = new ArrayList<PageRa4a>();
- /** The number of pages (so far) in this PageCollection. */
- private int pageCount = 0;
-
/** Except during the time a new page is actually being created,
* currentPageNumber shows the next <em>expected</em> page number to be
* created. The last page number assigned is one less. */
@@ -133,17 +130,10 @@
@Override
public int getPageCount() {
- return this.pageCount;
+ return this.children.size();
}
/**
- * Increases the page count by 1.
- */
- public void incrementPageCount() {
- this.pageCount++;
- }
-
- /**
* Returns the sequence number of this PageCollection, starting at 0.
* The first PageCollection in the AreaTree will return 0, the second will
* return 1, etc.
@@ -229,7 +219,6 @@
getLogger().info("[" + formattedPageNumber + "] (blank)");
}
this.currentPageNumber++;
- incrementPageCount();
return newPage;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-01-22 01:15:32
|
Revision: 12449
http://sourceforge.net/p/foray/code/12449
Author: victormote
Date: 2022-01-22 01:15:29 +0000 (Sat, 22 Jan 2022)
Log Message:
-----------
Refactor page creation logic, part 4, final part for now. Get the /Pages object storing the correct type for its children, and get the /Page object storing the correct type for its parent.
Modified Paths:
--------------
trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfPage4a.java
trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfPages.java
trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfRoot.java
Modified: trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfPage4a.java
===================================================================
--- trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfPage4a.java 2022-01-21 23:51:00 UTC (rev 12448)
+++ trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfPage4a.java 2022-01-22 01:15:29 UTC (rev 12449)
@@ -70,32 +70,26 @@
* remain null until the first time an annotation needs to be entered. */
private PdfAnnotList annotList = null;
- /** The PDF document. */
- private PdfDocument4a doc;
-
/**
* Create a /Page object.
* @param parent The parent /Pages object.
- * @param doc The PDF document being built.
* @param resources The /Resources object.
* @param pagewidth The page's width in points.
* @param pageheight The page's height in points.
*/
- public PdfPage4a(final PdfPages parent, final PdfDocument4a doc, final PdfResources resources,
- final int pagewidth, final int pageheight) {
+ public PdfPage4a(final PdfPages parent, final PdfResources resources, final int pagewidth, final int pageheight) {
this.parent = parent;
- this.doc = doc;
-
+ final PdfDocument4a document = parent.getRoot().getDocument();
this.resources = resources;
this.pagewidth = pagewidth;
this.pageheight = pageheight;
this.contents = new PdfContentStream4a();
try {
- this.contents.addDefaultFilters(doc);
+ this.contents.addDefaultFilters(document);
} catch (final PdfException e) {
/* Ignore, should not happen. */
}
- final PdfEncryption4a encryption = this.getPDFDocument().getEncryption();
+ final PdfEncryption4a encryption = document.getEncryption();
if (encryption != null) {
this.contents.addEncryption(encryption);
}
@@ -127,7 +121,7 @@
sb.append(this.pdfID() + EOL
+ "<<" + EOL
+ "/Type /Page" + EOL
- + "/Parent " + this.parent.pdfReference(this.doc) + EOL
+ + "/Parent " + this.parent.pdfReference(doc) + EOL
+ "/MediaBox [ 0 0 " + this.pagewidth + " "
+ this.pageheight + " ]" + EOL
+ "/Resources " + this.resources.pdfReference(doc) + EOL
@@ -198,11 +192,12 @@
public PdfDestination4a createDestination(final float xPosition, final float yPosition, final String name)
throws PdfException {
final PdfDestination4a destination = new PdfDestination4a(this, xPosition, yPosition, name);
- getPDFDocument().registerIndirectObjectLast(destination);
+ final PdfDocument4a document = this.parent.getRoot().getDocument();
+ document.registerIndirectObjectLast(destination);
if (name != null) {
/* Register the destination with the PDF document. */
- final PdfNameTree<PdfDestination4a> destinations = getPDFDocument().getRoot().getDestinations();
+ final PdfNameTree<PdfDestination4a> destinations = document.getRoot().getDestinations();
final PdfDestination4a existingDestination = destinations.get(name);
if (existingDestination == null) {
destinations.add(name, destination);
@@ -213,12 +208,4 @@
return destination;
}
- /**
- * Returns the parent PDF document.
- * @return the parent PDF document.
- */
- public PdfDocument4a getPDFDocument() {
- return this.doc;
- }
-
}
Modified: trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfPages.java
===================================================================
--- trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfPages.java 2022-01-21 23:51:00 UTC (rev 12448)
+++ trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfPages.java 2022-01-22 01:15:29 UTC (rev 12449)
@@ -32,11 +32,9 @@
import java.util.List;
/**
- * class representing a /Pages object.
- *
- * A /Pages object is an ordered collection of pages (/Page objects)
- * (Actually, /Pages can contain further /Pages as well but this
- * implementation doesn't allow this)
+ * A /Pages object.
+ * A /Pages object is an ordered collection of pages (/Page objects).
+ * (Actually, /Pages can contain further /Pages as well but this implementation doesn't currently support this).
*/
public class PdfPages extends PdfObject {
@@ -44,9 +42,7 @@
private PdfRoot pdfRoot;
/** The /Page objects. */
- private List<String> kids = new ArrayList<String>();
- /* TODO: This is a list of Strings. Shouldn't it be a list of PdfPage4a
- * instances? */
+ private List<PdfPage4a> kids = new ArrayList<PdfPage4a>();
/**
* <p>Constructor for a /Pages object.</p>
@@ -61,12 +57,12 @@
}
/**
- * add a /Page object.
- *
- * @param page the PdfPage4a to add.
+ * Adds a /Page object.
+ * @param page The PdfPage4a to add.
*/
public void addPage(final PdfPage4a page) {
- this.kids.add(page.pdfReference(page.getPDFDocument()));
+ this.pdfRoot.getDocument().registerIndirectObject(page);
+ this.kids.add(page);
}
@Override
@@ -77,7 +73,9 @@
p.append("/Count " + this.kids.size() + EOL);
p.append("/Kids [" + EOL);
for (int i = 0; i < this.kids.size(); i++) {
- p.append(this.kids.get(i) + EOL);
+ final PdfPage4a page = this.kids.get(i);
+ final String pageRef = page.pdfReference(doc);
+ p.append(pageRef + EOL);
}
p.append("] >>" + EOL + "endobj" + EOL);
Modified: trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfRoot.java
===================================================================
--- trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfRoot.java 2022-01-21 23:51:00 UTC (rev 12448)
+++ trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfRoot.java 2022-01-22 01:15:29 UTC (rev 12449)
@@ -73,7 +73,7 @@
* @return The new page.
*/
public PdfPage4a createPage(final int width, final int height) {
- final PdfPage4a page = new PdfPage4a(this.pages, this.document, this.document.getResources(), width, height);
+ final PdfPage4a page = new PdfPage4a(this.pages, this.document.getResources(), width, height);
this.pages.addPage(page);
return page;
}
@@ -194,4 +194,12 @@
return this.pages;
}
+ /**
+ * Returns the parent document.
+ * @return The parent document.
+ */
+ public PdfDocument4a getDocument() {
+ return this.document;
+ }
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-01-21 23:51:03
|
Revision: 12448
http://sourceforge.net/p/foray/code/12448
Author: victormote
Date: 2022-01-21 23:51:00 +0000 (Fri, 21 Jan 2022)
Log Message:
-----------
Refactor page creation logic, part 3.
Modified Paths:
--------------
trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfPages.java
trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfRoot.java
Modified: trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfPages.java
===================================================================
--- trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfPages.java 2022-01-21 23:36:45 UTC (rev 12447)
+++ trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfPages.java 2022-01-21 23:51:00 UTC (rev 12448)
@@ -40,23 +40,24 @@
*/
public class PdfPages extends PdfObject {
+ /** The parent root (/Catalog) object. */
+ private PdfRoot pdfRoot;
+
/** The /Page objects. */
private List<String> kids = new ArrayList<String>();
/* TODO: This is a list of Strings. Shouldn't it be a list of PdfPage4a
* instances? */
- /** The number of /Page objects. */
- private int count = 0;
-
/**
- * Create a /Pages object. NOTE: The PdfPages
- * object must be created before the PDF document is
- * generated, but it is not written to the stream immediately.
- * It must aslo be allocated an object ID (so that the kids
- * can refer to the parent) so that the XRef table needs to
- * be updated before this object is written.
+ * <p>Constructor for a /Pages object.</p>
+ * <p>NOTE: The {@link PdfPages} object must be created before the PDF document is generated, but it is not written
+ * to the stream immediately.
+ * It must also be allocated an object ID (so that the kids can refer to the parent), and the XRef table needs to be
+ * updated before this object is written.
+ * @param pdfRoot The parent root (/Catalog) object.
*/
- public PdfPages() {
+ public PdfPages(final PdfRoot pdfRoot) {
+ this.pdfRoot = pdfRoot;
}
/**
@@ -66,38 +67,29 @@
*/
public void addPage(final PdfPage4a page) {
this.kids.add(page.pdfReference(page.getPDFDocument()));
- this.incrementCount();
}
- /**
- * Get the count of /Page objects.
- * @return the number of pages
- */
- public int getCount() {
- return this.count;
- }
-
- /**
- * Increment the count of /Page objects.
- */
- public void incrementCount() {
- this.count++;
- // MessageHandler.logln("Incrementing count to " + this.getCount());
- }
-
@Override
public String toPDF(final PdfDocument4a doc) {
- StringBuilder p = new StringBuilder();
+ final StringBuilder p = new StringBuilder();
p.append(this.pdfID() + EOL);
p.append("<< /Type /Pages" + EOL);
- p.append("/Count " + this.getCount() + EOL);
+ p.append("/Count " + this.kids.size() + EOL);
p.append("/Kids [" + EOL);
for (int i = 0; i < this.kids.size(); i++) {
- p = p.append(this.kids.get(i) + EOL);
+ p.append(this.kids.get(i) + EOL);
}
- p = p.append("] >>" + EOL + "endobj" + EOL);
+ p.append("] >>" + EOL + "endobj" + EOL);
return p.toString();
}
+ /**
+ * Returns the parent root (/Catalog) object.
+ * @return The parent root object.
+ */
+ public PdfRoot getRoot() {
+ return this.pdfRoot;
+ }
+
}
Modified: trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfRoot.java
===================================================================
--- trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfRoot.java 2022-01-21 23:36:45 UTC (rev 12447)
+++ trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfRoot.java 2022-01-21 23:51:00 UTC (rev 12448)
@@ -63,7 +63,7 @@
*/
public PdfRoot(final PdfDocument4a document) {
this.document = document;
- this.pages = new PdfPages();
+ this.pages = new PdfPages(this);
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-01-21 23:36:48
|
Revision: 12447
http://sourceforge.net/p/foray/code/12447
Author: victormote
Date: 2022-01-21 23:36:45 +0000 (Fri, 21 Jan 2022)
Log Message:
-----------
Refactor page creation logic, part 2.
Modified Paths:
--------------
trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfPage4a.java
trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfPages.java
trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfRoot.java
Modified: trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfPage4a.java
===================================================================
--- trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfPage4a.java 2022-01-21 23:25:28 UTC (rev 12446)
+++ trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfPage4a.java 2022-01-21 23:36:45 UTC (rev 12447)
@@ -51,7 +51,7 @@
private static final String PDF_FILE_EXTENSION = ".pdf";
/** The page's parent, a PDF reference object. */
- private String parent;
+ private PdfPages parent;
/** The page's /Resource object. */
private PdfResources resources;
@@ -75,13 +75,15 @@
/**
* Create a /Page object.
+ * @param parent The parent /Pages object.
* @param doc The PDF document being built.
- * @param resources the /Resources object
- * @param pagewidth the page's width in points
- * @param pageheight the page's height in points
+ * @param resources The /Resources object.
+ * @param pagewidth The page's width in points.
+ * @param pageheight The page's height in points.
*/
- public PdfPage4a(final PdfDocument4a doc, final PdfResources resources,
+ public PdfPage4a(final PdfPages parent, final PdfDocument4a doc, final PdfResources resources,
final int pagewidth, final int pageheight) {
+ this.parent = parent;
this.doc = doc;
this.resources = resources;
@@ -100,14 +102,6 @@
}
/**
- * Set this page's parent.
- * @param parent the /Pages object that is this page's parent
- */
- public void setParent(final PdfPages parent) {
- this.parent = parent.pdfReference(this.doc);
- }
-
- /**
* Get this page's annotation list.
* @return annotList a PdfAnnotList list of annotations
*/
@@ -133,7 +127,7 @@
sb.append(this.pdfID() + EOL
+ "<<" + EOL
+ "/Type /Page" + EOL
- + "/Parent " + this.parent + EOL
+ + "/Parent " + this.parent.pdfReference(this.doc) + EOL
+ "/MediaBox [ 0 0 " + this.pagewidth + " "
+ this.pageheight + " ]" + EOL
+ "/Resources " + this.resources.pdfReference(doc) + EOL
Modified: trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfPages.java
===================================================================
--- trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfPages.java 2022-01-21 23:25:28 UTC (rev 12446)
+++ trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfPages.java 2022-01-21 23:36:45 UTC (rev 12447)
@@ -66,7 +66,6 @@
*/
public void addPage(final PdfPage4a page) {
this.kids.add(page.pdfReference(page.getPDFDocument()));
- page.setParent(this);
this.incrementCount();
}
Modified: trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfRoot.java
===================================================================
--- trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfRoot.java 2022-01-21 23:25:28 UTC (rev 12446)
+++ trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfRoot.java 2022-01-21 23:36:45 UTC (rev 12447)
@@ -68,12 +68,12 @@
/**
* Create a /Page object and add it to /Pages.
- * @param width The width of the new page, in millipoints.
- * @param height The height of the new page, in millipoints.
+ * @param width The width of the new page, in points.
+ * @param height The height of the new page, in points.
* @return The new page.
*/
public PdfPage4a createPage(final int width, final int height) {
- final PdfPage4a page = new PdfPage4a(this.document, this.document.getResources(), width, height);
+ final PdfPage4a page = new PdfPage4a(this.pages, this.document, this.document.getResources(), width, height);
this.pages.addPage(page);
return page;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-01-21 23:25:31
|
Revision: 12446
http://sourceforge.net/p/foray/code/12446
Author: victormote
Date: 2022-01-21 23:25:28 +0000 (Fri, 21 Jan 2022)
Log Message:
-----------
Refactor page creation logic, part 1.
Modified Paths:
--------------
trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfDocument4a.java
trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfPage4a.java
trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfRoot.java
Modified: trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfDocument4a.java
===================================================================
--- trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfDocument4a.java 2022-01-21 21:55:56 UTC (rev 12445)
+++ trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfDocument4a.java 2022-01-21 23:25:28 UTC (rev 12446)
@@ -203,7 +203,7 @@
this.psServer = psServer;
// Create the Root object
- this.root = new PdfRoot();
+ this.root = new PdfRoot(this);
registerIndirectObjectLast(this.root);
registerIndirectObjectLast(this.root.getPages());
@@ -571,7 +571,8 @@
@Override
public PdfPage4a createPdfPage(final int pagewidth, final int pageheight) {
- return new PdfPage4a(this, this.getResources(), pagewidth, pageheight);
+ /* Delegate this entirely to the root. */
+ return this.root.createPage(pagewidth, pageheight);
}
@Override
Modified: trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfPage4a.java
===================================================================
--- trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfPage4a.java 2022-01-21 21:55:56 UTC (rev 12445)
+++ trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfPage4a.java 2022-01-21 23:25:28 UTC (rev 12446)
@@ -83,8 +83,6 @@
public PdfPage4a(final PdfDocument4a doc, final PdfResources resources,
final int pagewidth, final int pageheight) {
this.doc = doc;
- /* add the page to the Root */
- doc.getRoot().addPage(this);
this.resources = resources;
this.pagewidth = pagewidth;
Modified: trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfRoot.java
===================================================================
--- trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfRoot.java 2022-01-21 21:55:56 UTC (rev 12445)
+++ trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfRoot.java 2022-01-21 23:25:28 UTC (rev 12446)
@@ -38,6 +38,9 @@
*/
public class PdfRoot extends PdfDictionary {
+ /** The parent PDF document. */
+ private PdfDocument4a document;
+
/** The /Pages object that is root of the Pages hierarchy. */
private PdfPages pages;
@@ -56,18 +59,23 @@
/**
* Create a Root (/Catalog) object.
+ * @param document The parent PDF document.
*/
- public PdfRoot() {
- /* Except for "Type", which is handled in the getType() method, */
+ public PdfRoot(final PdfDocument4a document) {
+ this.document = document;
this.pages = new PdfPages();
}
/**
- * Add a /Page object to the root /Pages object.
- * @param page the /Page object to add
+ * Create a /Page object and add it to /Pages.
+ * @param width The width of the new page, in millipoints.
+ * @param height The height of the new page, in millipoints.
+ * @return The new page.
*/
- public void addPage(final PdfPage4a page) {
+ public PdfPage4a createPage(final int width, final int height) {
+ final PdfPage4a page = new PdfPage4a(this.document, this.document.getResources(), width, height);
this.pages.addPage(page);
+ return page;
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-01-21 21:56:00
|
Revision: 12445
http://sourceforge.net/p/foray/code/12445
Author: victormote
Date: 2022-01-21 21:55:56 +0000 (Fri, 21 Jan 2022)
Log Message:
-----------
1. Conform to aXSL change: Remove page-number formatting method from PageSequence, effectively moving this work to the Area Tree. 2. Pass the entire Number2StringFactors implementation to the page number formatter.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/main/java/org/foray/area/PageCollection4a.java
trunk/foray/foray-common/build.gradle
trunk/foray/foray-common/src/main/java/org/foray/common/PositiveIntegerFormatter.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageSequence4a.java
trunk/foray/foray-render/src/main/java/org/foray/render/pdf/PdfRenderer.java
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/PageCollection4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/PageCollection4a.java 2022-01-21 18:14:42 UTC (rev 12444)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/PageCollection4a.java 2022-01-21 21:55:56 UTC (rev 12445)
@@ -29,6 +29,7 @@
package org.foray.area;
import org.foray.area.link.Link;
+import org.foray.common.PositiveIntegerFormatter;
import org.foray.common.WellKnownConstants;
import org.axsl.area.AreaTreeException;
@@ -84,6 +85,9 @@
* collection. */
private PageMasterResolver pageMasterResolver;
+ /** Handles page numbering and related formatting. */
+ private PositiveIntegerFormatter pageNumberGenerator;
+
/**
* Private Constructor.
* @param parentArea The parent area tree.
@@ -108,6 +112,7 @@
newCollection.registerLink(generatedBy);
newCollection.pageMasterResolver = generatedBy.makePageMasterResolver(
lastPageNumber);
+ newCollection.pageNumberGenerator = new PositiveIntegerFormatter(newCollection.getNumber2StringFactors());
return newCollection;
}
@@ -206,7 +211,6 @@
isBlank = true;
}
}
- final PageSequence pageSeq = getPageSequence();
SimplePageMaster spm = null;
try {
spm = this.pageMasterResolver.getNextPageMaster(isBlank);
@@ -217,8 +221,7 @@
this.children.add(newPage);
final int newPageNumber = getCurrentPageNumber();
newPage.setNumber(newPageNumber);
- final CharSequence formattedPageNumber = pageSeq.formatPageNumber(
- newPageNumber);
+ final CharSequence formattedPageNumber = this.pageNumberGenerator.makeFormattedPageNumber(newPageNumber);
newPage.setFormattedNumber(formattedPageNumber);
if (!isBlank) {
getLogger().info("[" + formattedPageNumber + "]");
Modified: trunk/foray/foray-common/build.gradle
===================================================================
--- trunk/foray/foray-common/build.gradle 2022-01-21 18:14:42 UTC (rev 12444)
+++ trunk/foray/foray-common/build.gradle 2022-01-21 21:55:56 UTC (rev 12445)
@@ -15,6 +15,7 @@
api (group: 'org.axsl', name: 'axsl-ps', version: axslVersion) { transitive = false }
api (group: 'org.axsl', name: 'axsl-font', version: axslVersion) { transitive = false }
api (group: 'org.axsl', name: 'axsl-unicode', version: axslVersion) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-value', version: axslVersion) { transitive = false }
implementation group:
'ch.qos.logback', name: 'logback-classic', version: logbackClassicVersion
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/PositiveIntegerFormatter.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/PositiveIntegerFormatter.java 2022-01-21 18:14:42 UTC (rev 12444)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/PositiveIntegerFormatter.java 2022-01-21 21:55:56 UTC (rev 12445)
@@ -28,22 +28,21 @@
package org.foray.common;
+import org.axsl.value.group.Number2StringFactors;
+
/**
- * This class uses the 'format', 'groupingSeparator', 'groupingSize',
- * and 'letterValue' properties on fo:page-sequence to return a String
- * corresponding to the supplied integer page number.
+ * This class uses the 'format', 'groupingSeparator', 'groupingSize', and 'letterValue' properties on fo:page-sequence
+ * to return a String corresponding to the supplied integer page number.
*/
public class PositiveIntegerFormatter {
/** The format type that should be used by this formatter. */
- private PositiveIntegerFormat formatType =
- PositiveIntegerFormat.DECIMAL_ARABIC;
+ private PositiveIntegerFormat formatType = PositiveIntegerFormat.DECIMAL_ARABIC;
/** The minimum amount of padding for decimal formats. */
private int minPadding = 0;
- /** Array of constants with preloaded strings of zeros, useful for padding
- * page numbers. */
+ /** Array of constants with preloaded strings of zeros, useful for padding page numbers. */
private String zeros[] = {
"", "0", "00", "000", "0000", "00000"
};
@@ -50,17 +49,13 @@
/**
* Constructor.
- * @param format The format which should be used to create page numbers by
- * this generator.
- * @param groupingSeparator The grouping separator (Unicode codepoint) which should be used.
- * @param groupingSize The grouping size which should be used.
+ * @param factors The number-to-string conversion factors to be used by this formatter.
*/
- public PositiveIntegerFormatter(final String format, final int groupingSeparator, final int groupingSize) {
+ public PositiveIntegerFormatter(final Number2StringFactors factors) {
- // the only accepted format strings are currently '0*1' 'a', 'A', 'i'
- // and 'I'
- final int fmtLen = format.length();
- if (fmtLen == 1) {
+ // the only accepted format strings are currently '0*1' 'a', 'A', 'i' and 'I'
+ final String format = factors.traitFormat();
+ if (format.length() == 1) {
if (format.equals("1")) {
this.formatType = PositiveIntegerFormat.DECIMAL_ARABIC;
this.minPadding = 0;
@@ -73,9 +68,8 @@
} else if (format.equals("I")) {
this.formatType = PositiveIntegerFormat.UPPERCASE_ROMAN;
} else {
- /* We don't know how to handle other types right now. Per the
- * XSLT 1.0 spec, Section 7.7.1, such types should be handled
- * as if they were decimal arabic. */
+ /* We don't know how to handle other types right now.
+ * Per the XSLT 1.0 spec, Section 7.7.1, such types should be handled as if they were decimal arabic. */
this.formatType = PositiveIntegerFormat.DECIMAL_ARABIC;
this.minPadding = 0;
}
@@ -83,13 +77,13 @@
// only accepted token is '0+1'at this stage. Because of the
// wonderful regular expression support in Java, we will resort to a
// loop
- for (int i = 0; i < fmtLen - 1; i++) {
+ for (int i = 0; i < format.length() - 1; i++) {
if (format.charAt(i) != '0') {
//log.debug("'format' token not recognized; using '1'");
this.formatType = PositiveIntegerFormat.DECIMAL_ARABIC;
this.minPadding = 0;
} else {
- this.minPadding = fmtLen - 1;
+ this.minPadding = format.length() - 1;
}
}
}
@@ -109,10 +103,8 @@
final int nz = this.minPadding - pn.length() + 1;
pn = this.zeros[nz] + pn;
}
- } else if ((this.formatType
- == PositiveIntegerFormat.LOWERCASE_ROMAN)
- || (this.formatType
- == PositiveIntegerFormat.UPPERCASE_ROMAN)) {
+ } else if ((this.formatType == PositiveIntegerFormat.LOWERCASE_ROMAN)
+ || (this.formatType == PositiveIntegerFormat.UPPERCASE_ROMAN)) {
pn = makeRoman(number);
if (this.formatType == PositiveIntegerFormat.UPPERCASE_ROMAN) {
pn = pn.toUpperCase();
@@ -129,8 +121,7 @@
/**
* Make a roman-numeral page number.
- * @param inputNum The input number from which the page number should be
- * created.
+ * @param inputNum The input number from which the page number should be created.
* @return The roman-numeral page number.
*/
private String makeRoman(final int inputNum) {
@@ -158,8 +149,7 @@
/**
* Make an alphabetic page number.
- * @param inputNum The input number from which the page number should be
- * created.
+ * @param inputNum The input number from which the page number should be created.
* @return The alpha page number.
*/
private String makeAlpha(final int inputNum) {
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageSequence4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageSequence4a.java 2022-01-21 18:14:42 UTC (rev 12444)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageSequence4a.java 2022-01-21 21:55:56 UTC (rev 12445)
@@ -28,7 +28,6 @@
package org.foray.fotree.fo.obj;
-import org.foray.common.PositiveIntegerFormatter;
import org.foray.fotree.FoObj;
import org.foray.fotree.Namespace;
import org.foray.fotree.PropertyList;
@@ -73,9 +72,6 @@
*/
private List<Flow> flows = new ArrayList<Flow>(1);
- /** Handles page numbering and related formatting. */
- private PositiveIntegerFormatter pageNumberGenerator;
-
/** The object containing the template for the use of page masters. */
private PageSequenceTemplate pageSequenceTemplate;
@@ -120,8 +116,6 @@
@Override
public void setup() throws FoTreeException {
- this.pageNumberGenerator = new PositiveIntegerFormatter(this.traitFormat(),
- this.traitGroupingSeparator(), this.traitGroupingSize());
}
@Override
@@ -234,11 +228,6 @@
}
@Override
- public String formatPageNumber(final int pageNumber) {
- return this.pageNumberGenerator.makeFormattedPageNumber(pageNumber);
- }
-
- @Override
public List<Flow> getFlows() {
return this.flows;
}
Modified: trunk/foray/foray-render/src/main/java/org/foray/render/pdf/PdfRenderer.java
===================================================================
--- trunk/foray/foray-render/src/main/java/org/foray/render/pdf/PdfRenderer.java 2022-01-21 18:14:42 UTC (rev 12444)
+++ trunk/foray/foray-render/src/main/java/org/foray/render/pdf/PdfRenderer.java 2022-01-21 21:55:56 UTC (rev 12445)
@@ -556,8 +556,7 @@
* @return The equivalent PDF-specific page numbering style.
*/
private static PdfPageLabelStyle convertPageLabelStyle(final Number2StringFactors factors) {
- final PositiveIntegerFormatter generator = new PositiveIntegerFormatter(factors.traitFormat(),
- factors.traitGroupingSeparator(), factors.traitGroupingSize());
+ final PositiveIntegerFormatter generator = new PositiveIntegerFormatter(factors);
final PositiveIntegerFormat fiType = generator.getType();
switch(fiType) {
case DECIMAL_ARABIC: return PdfPageLabelStyle.DECIMAL_ARABIC;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-01-21 18:14:48
|
Revision: 12444
http://sourceforge.net/p/foray/code/12444
Author: victormote
Date: 2022-01-21 18:14:42 +0000 (Fri, 21 Jan 2022)
Log Message:
-----------
Conform to aXSL change: Rename package for clarity and consistency.
Modified Paths:
--------------
trunk/foray/foray-common/src/main/java/org/foray/common/data/ByteSequenceTokenizer.java
trunk/foray/foray-common/src/main/java/org/foray/common/sequence/AbstractByteSequence.java
trunk/foray/foray-common/src/main/java/org/foray/common/sequence/AbstractCharSequence.java
trunk/foray/foray-common/src/main/java/org/foray/common/sequence/AbstractIntSequence.java
trunk/foray/foray-common/src/main/java/org/foray/common/sequence/AbstractLongSequence.java
trunk/foray/foray-common/src/main/java/org/foray/common/sequence/AbstractShortSequence.java
trunk/foray/foray-common/src/main/java/org/foray/common/sequence/BooleanSequenceIterator.java
trunk/foray/foray-common/src/main/java/org/foray/common/sequence/ByteArray.java
trunk/foray/foray-common/src/main/java/org/foray/common/sequence/ByteArrayBuilder.java
trunk/foray/foray-common/src/main/java/org/foray/common/sequence/ByteSequenceChars.java
trunk/foray/foray-common/src/main/java/org/foray/common/sequence/ByteSequenceIterator.java
trunk/foray/foray-common/src/main/java/org/foray/common/sequence/ByteSequenceParser.java
trunk/foray/foray-common/src/main/java/org/foray/common/sequence/ByteSequenceSubset.java
trunk/foray/foray-common/src/main/java/org/foray/common/sequence/CharArray.java
trunk/foray/foray-common/src/main/java/org/foray/common/sequence/CharArrayBuilder.java
trunk/foray/foray-common/src/main/java/org/foray/common/sequence/CharSequenceIterator.java
trunk/foray/foray-common/src/main/java/org/foray/common/sequence/IntArray.java
trunk/foray/foray-common/src/main/java/org/foray/common/sequence/IntArrayBuilder.java
trunk/foray/foray-common/src/main/java/org/foray/common/sequence/IntSequenceIterator.java
trunk/foray/foray-common/src/main/java/org/foray/common/sequence/LongArray.java
trunk/foray/foray-common/src/main/java/org/foray/common/sequence/LongArrayBuilder.java
trunk/foray/foray-common/src/main/java/org/foray/common/sequence/LongSequenceIterator.java
trunk/foray/foray-common/src/main/java/org/foray/common/sequence/ShortArray.java
trunk/foray/foray-common/src/main/java/org/foray/common/sequence/ShortArrayBuilder.java
trunk/foray/foray-common/src/main/java/org/foray/common/sequence/ShortSequenceIterator.java
trunk/foray/foray-common/src/main/java/org/foray/common/sequence/package-info.java
trunk/foray/foray-common/src/test/java/org/foray/common/data/ByteSequenceTokenizerTests.java
trunk/foray/foray-font/src/main/java/org/foray/font/Font4a.java
trunk/foray/foray-font/src/main/java/org/foray/font/FontUse4a.java
trunk/foray/foray-font/src/main/java/org/foray/font/format/type1/Type1FontParser.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoRefinedText4a.java
trunk/foray/foray-graphic/src/main/java/org/foray/graphic/BmpGraphic.java
trunk/foray/foray-graphic/src/main/java/org/foray/graphic/EpsGraphic.java
trunk/foray/foray-graphic/src/main/java/org/foray/graphic/GifGraphic.java
trunk/foray/foray-graphic/src/main/java/org/foray/graphic/Graphic4a.java
trunk/foray/foray-graphic/src/main/java/org/foray/graphic/JpegGraphic.java
trunk/foray/foray-graphic/src/main/java/org/foray/graphic/MathGraphic4a.java
trunk/foray/foray-graphic/src/main/java/org/foray/graphic/PdfGraphic.java
trunk/foray/foray-graphic/src/main/java/org/foray/graphic/PngGraphic.java
trunk/foray/foray-graphic/src/main/java/org/foray/graphic/SvgGraphic.java
trunk/foray/foray-graphic/src/main/java/org/foray/graphic/TempImage.java
trunk/foray/foray-graphic/src/main/java/org/foray/graphic/TiffGraphic.java
trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestBmpGraphic.java
trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestGifGraphic.java
trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestJpegGraphic.java
trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestPngGraphic.java
trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestTiffGraphic.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Lexer4a.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/LexerIcu4jBreakIterator.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/LexerJavaBreakIterator.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Word4a.java
trunk/foray/foray-pdf/src/main/java/org/foray/pdf/PdfCrossRefEntry.java
trunk/foray/foray-pdf/src/main/java/org/foray/pdf/PdfCrossRefInfo.java
trunk/foray/foray-pdf/src/main/java/org/foray/pdf/PdfParser.java
trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfBoolean.java
trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfDocument4a.java
trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfFontFileStream.java
trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfGenericStream.java
trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfStream.java
trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfTextString.java
trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfXreference.java
trunk/foray/foray-ps/src/main/java/org/foray/ps/PsFileReal.java
trunk/foray/foray-ps/src/main/java/org/foray/ps/PsInputFile.java
trunk/foray/foray-ps/src/main/java/org/foray/ps/PsServer4a.java
trunk/foray/foray-ps/src/main/java/org/foray/ps/PsStringInput.java
trunk/foray/foray-ps/src/main/java/org/foray/ps/encode/CharSet4a.java
trunk/foray/foray-ps/src/main/java/org/foray/ps/encode/EncodingCustom.java
trunk/foray/foray-ps/src/main/java/org/foray/ps/encode/EncodingParser.java
trunk/foray/foray-ps/src/main/java/org/foray/ps/encode/EncodingVector4a.java
trunk/foray/foray-ps/src/main/java/org/foray/ps/java2d/Java2dSystemDict.java
trunk/foray/foray-ps/src/main/java/org/foray/ps/pdf/PdfSystemDict.java
trunk/foray/foray-ps/src/main/java/org/foray/ps/readonly/ReadOnlySystemDict.java
trunk/foray/foray-render/src/main/java/org/foray/render/pcl/PclRenderer.java
trunk/foray/foray-render/src/main/java/org/foray/render/ps/PsRenderer.java
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/data/ByteSequenceTokenizer.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/data/ByteSequenceTokenizer.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/data/ByteSequenceTokenizer.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -31,9 +31,9 @@
import org.foray.common.sequence.ByteArray;
import org.foray.common.sequence.ByteSequenceSubset;
-import org.axsl.common.sequence.ByteSequence;
-import org.axsl.common.sequence.ByteSequencePlus;
import org.axsl.unicode.block.Basic_Latin_Block;
+import org.axsl.utility.sequence.ByteSequence;
+import org.axsl.utility.sequence.ByteSequencePlus;
import java.util.ArrayList;
import java.util.List;
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/sequence/AbstractByteSequence.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/sequence/AbstractByteSequence.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/sequence/AbstractByteSequence.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -30,9 +30,9 @@
import org.foray.common.primitive.ByteUtils;
-import org.axsl.common.sequence.BytePrimitiveIterator;
-import org.axsl.common.sequence.ByteSequence;
-import org.axsl.common.sequence.ByteSequencePlus;
+import org.axsl.utility.sequence.BytePrimitiveIterator;
+import org.axsl.utility.sequence.ByteSequence;
+import org.axsl.utility.sequence.ByteSequencePlus;
import java.io.IOException;
import java.io.OutputStream;
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/sequence/AbstractCharSequence.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/sequence/AbstractCharSequence.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/sequence/AbstractCharSequence.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -28,10 +28,10 @@
package org.foray.common.sequence;
-import org.axsl.common.sequence.CharPrimitiveIterator;
-import org.axsl.common.sequence.CharSequenceMutable;
-import org.axsl.common.sequence.CharSequencePlus;
-import org.axsl.common.sequence.CharSequenceUtility;
+import org.axsl.utility.sequence.CharPrimitiveIterator;
+import org.axsl.utility.sequence.CharSequenceMutable;
+import org.axsl.utility.sequence.CharSequencePlus;
+import org.axsl.utility.sequence.CharSequenceUtility;
/**
* Abstract superclass for implementations of {@link CharSequencePlus}.
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/sequence/AbstractIntSequence.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/sequence/AbstractIntSequence.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/sequence/AbstractIntSequence.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -28,10 +28,10 @@
package org.foray.common.sequence;
-import org.axsl.common.sequence.IntPrimitiveIterator;
-import org.axsl.common.sequence.IntSequence;
-import org.axsl.common.sequence.IntSequenceMutable;
-import org.axsl.common.sequence.IntSequencePlus;
+import org.axsl.utility.sequence.IntPrimitiveIterator;
+import org.axsl.utility.sequence.IntSequence;
+import org.axsl.utility.sequence.IntSequenceMutable;
+import org.axsl.utility.sequence.IntSequencePlus;
/**
* Abstract superclass for implementations of {@link IntSequencePlus}.
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/sequence/AbstractLongSequence.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/sequence/AbstractLongSequence.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/sequence/AbstractLongSequence.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -28,10 +28,10 @@
package org.foray.common.sequence;
-import org.axsl.common.sequence.LongPrimitiveIterator;
-import org.axsl.common.sequence.LongSequence;
-import org.axsl.common.sequence.LongSequenceMutable;
-import org.axsl.common.sequence.LongSequencePlus;
+import org.axsl.utility.sequence.LongPrimitiveIterator;
+import org.axsl.utility.sequence.LongSequence;
+import org.axsl.utility.sequence.LongSequenceMutable;
+import org.axsl.utility.sequence.LongSequencePlus;
/**
* Abstract superclass for implementations of {@link LongSequencePlus}.
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/sequence/AbstractShortSequence.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/sequence/AbstractShortSequence.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/sequence/AbstractShortSequence.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -28,10 +28,10 @@
package org.foray.common.sequence;
-import org.axsl.common.sequence.ShortPrimitiveIterator;
-import org.axsl.common.sequence.ShortSequence;
-import org.axsl.common.sequence.ShortSequenceMutable;
-import org.axsl.common.sequence.ShortSequencePlus;
+import org.axsl.utility.sequence.ShortPrimitiveIterator;
+import org.axsl.utility.sequence.ShortSequence;
+import org.axsl.utility.sequence.ShortSequenceMutable;
+import org.axsl.utility.sequence.ShortSequencePlus;
/**
* Abstract superclass for implementations of {@link ShortSequencePlus}.
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/sequence/BooleanSequenceIterator.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/sequence/BooleanSequenceIterator.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/sequence/BooleanSequenceIterator.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -28,8 +28,8 @@
package org.foray.common.sequence;
-import org.axsl.common.sequence.BooleanPrimitiveIterator;
-import org.axsl.common.sequence.BooleanSequence;
+import org.axsl.utility.sequence.BooleanPrimitiveIterator;
+import org.axsl.utility.sequence.BooleanSequence;
import java.util.NoSuchElementException;
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/sequence/ByteArray.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/sequence/ByteArray.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/sequence/ByteArray.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -31,8 +31,8 @@
import org.foray.common.primitive.ByteUtils;
import org.foray.common.primitive.NumberUtils;
-import org.axsl.common.sequence.ByteSequence;
-import org.axsl.common.sequence.ByteSequenceMutable;
+import org.axsl.utility.sequence.ByteSequence;
+import org.axsl.utility.sequence.ByteSequenceMutable;
import java.io.Serializable;
import java.nio.charset.Charset;
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/sequence/ByteArrayBuilder.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/sequence/ByteArrayBuilder.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/sequence/ByteArrayBuilder.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -35,8 +35,8 @@
import org.foray.common.MarkedIndexOutOfBoundsException;
-import org.axsl.common.sequence.ByteSequenceMutable;
-import org.axsl.common.sequence.ByteSequencePlus;
+import org.axsl.utility.sequence.ByteSequenceMutable;
+import org.axsl.utility.sequence.ByteSequencePlus;
import org.apache.commons.io.IOUtils;
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/sequence/ByteSequenceChars.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/sequence/ByteSequenceChars.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/sequence/ByteSequenceChars.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -31,8 +31,8 @@
import org.foray.common.primitive.CharacterUtils;
import org.foray.common.primitive.NumberUtils;
-import org.axsl.common.sequence.ByteSequence;
-import org.axsl.common.sequence.ByteSequenceMutable;
+import org.axsl.utility.sequence.ByteSequence;
+import org.axsl.utility.sequence.ByteSequenceMutable;
import java.io.Serializable;
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/sequence/ByteSequenceIterator.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/sequence/ByteSequenceIterator.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/sequence/ByteSequenceIterator.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -28,8 +28,8 @@
package org.foray.common.sequence;
-import org.axsl.common.sequence.BytePrimitiveIterator;
-import org.axsl.common.sequence.ByteSequence;
+import org.axsl.utility.sequence.BytePrimitiveIterator;
+import org.axsl.utility.sequence.ByteSequence;
import java.util.NoSuchElementException;
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/sequence/ByteSequenceParser.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/sequence/ByteSequenceParser.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/sequence/ByteSequenceParser.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -32,8 +32,8 @@
import org.foray.common.WellKnownConstants;
import org.foray.common.primitive.CharsetUtils;
-import org.axsl.common.sequence.ByteSequence;
-import org.axsl.common.sequence.ByteSequencePlus;
+import org.axsl.utility.sequence.ByteSequence;
+import org.axsl.utility.sequence.ByteSequencePlus;
import org.apache.commons.io.EndianUtils;
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/sequence/ByteSequenceSubset.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/sequence/ByteSequenceSubset.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/sequence/ByteSequenceSubset.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -28,9 +28,9 @@
package org.foray.common.sequence;
-import org.axsl.common.sequence.ByteSequence;
-import org.axsl.common.sequence.ByteSequenceMutable;
-import org.axsl.common.sequence.ByteSequencePlus;
+import org.axsl.utility.sequence.ByteSequence;
+import org.axsl.utility.sequence.ByteSequenceMutable;
+import org.axsl.utility.sequence.ByteSequencePlus;
/**
* A wrapper around another {@link ByteSequence}, providing a view of a subset of that sequence.
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/sequence/CharArray.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/sequence/CharArray.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/sequence/CharArray.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -28,8 +28,8 @@
package org.foray.common.sequence;
-import org.axsl.common.sequence.CharSequenceMutable;
-import org.axsl.common.sequence.IntSequence;
+import org.axsl.utility.sequence.CharSequenceMutable;
+import org.axsl.utility.sequence.IntSequence;
import java.util.Arrays;
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/sequence/CharArrayBuilder.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/sequence/CharArrayBuilder.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/sequence/CharArrayBuilder.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -30,7 +30,7 @@
import org.foray.common.MarkedIndexOutOfBoundsException;
-import org.axsl.common.sequence.CharSequenceMutable;
+import org.axsl.utility.sequence.CharSequenceMutable;
import java.util.Arrays;
import java.util.EmptyStackException;
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/sequence/CharSequenceIterator.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/sequence/CharSequenceIterator.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/sequence/CharSequenceIterator.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -28,7 +28,7 @@
package org.foray.common.sequence;
-import org.axsl.common.sequence.CharPrimitiveIterator;
+import org.axsl.utility.sequence.CharPrimitiveIterator;
import java.util.NoSuchElementException;
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/sequence/IntArray.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/sequence/IntArray.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/sequence/IntArray.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -30,8 +30,8 @@
import org.foray.common.primitive.NumberUtils;
-import org.axsl.common.sequence.IntSequence;
-import org.axsl.common.sequence.IntSequenceMutable;
+import org.axsl.utility.sequence.IntSequence;
+import org.axsl.utility.sequence.IntSequenceMutable;
import java.util.Arrays;
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/sequence/IntArrayBuilder.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/sequence/IntArrayBuilder.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/sequence/IntArrayBuilder.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -30,8 +30,8 @@
import org.foray.common.MarkedIndexOutOfBoundsException;
-import org.axsl.common.sequence.IntSequence;
-import org.axsl.common.sequence.IntSequenceMutable;
+import org.axsl.utility.sequence.IntSequence;
+import org.axsl.utility.sequence.IntSequenceMutable;
import java.util.Arrays;
import java.util.EmptyStackException;
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/sequence/IntSequenceIterator.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/sequence/IntSequenceIterator.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/sequence/IntSequenceIterator.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -28,7 +28,8 @@
package org.foray.common.sequence;
-import org.axsl.common.sequence.IntSequence;
+import org.axsl.utility.sequence.IntPrimitiveIterator;
+import org.axsl.utility.sequence.IntSequence;
import java.util.NoSuchElementException;
@@ -35,7 +36,7 @@
/**
* Iterates an instance of {@link IntSequence}.
*/
-public class IntSequenceIterator implements org.axsl.common.sequence.IntPrimitiveIterator {
+public class IntSequenceIterator implements IntPrimitiveIterator {
/** The sequence being iterated. */
private IntSequence sequence;
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/sequence/LongArray.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/sequence/LongArray.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/sequence/LongArray.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -28,10 +28,10 @@
package org.foray.common.sequence;
-import org.axsl.common.sequence.LongPrimitiveIterator;
-import org.axsl.common.sequence.LongSequence;
-import org.axsl.common.sequence.LongSequenceMutable;
-import org.axsl.common.sequence.LongSequencePlus;
+import org.axsl.utility.sequence.LongPrimitiveIterator;
+import org.axsl.utility.sequence.LongSequence;
+import org.axsl.utility.sequence.LongSequenceMutable;
+import org.axsl.utility.sequence.LongSequencePlus;
import java.util.Arrays;
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/sequence/LongArrayBuilder.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/sequence/LongArrayBuilder.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/sequence/LongArrayBuilder.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -30,10 +30,10 @@
import org.foray.common.MarkedIndexOutOfBoundsException;
-import org.axsl.common.sequence.LongPrimitiveIterator;
-import org.axsl.common.sequence.LongSequence;
-import org.axsl.common.sequence.LongSequenceMutable;
-import org.axsl.common.sequence.LongSequencePlus;
+import org.axsl.utility.sequence.LongPrimitiveIterator;
+import org.axsl.utility.sequence.LongSequence;
+import org.axsl.utility.sequence.LongSequenceMutable;
+import org.axsl.utility.sequence.LongSequencePlus;
import java.util.Arrays;
import java.util.EmptyStackException;
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/sequence/LongSequenceIterator.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/sequence/LongSequenceIterator.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/sequence/LongSequenceIterator.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -28,8 +28,8 @@
package org.foray.common.sequence;
-import org.axsl.common.sequence.LongPrimitiveIterator;
-import org.axsl.common.sequence.LongSequence;
+import org.axsl.utility.sequence.LongPrimitiveIterator;
+import org.axsl.utility.sequence.LongSequence;
import java.util.NoSuchElementException;
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/sequence/ShortArray.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/sequence/ShortArray.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/sequence/ShortArray.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -28,10 +28,10 @@
package org.foray.common.sequence;
-import org.axsl.common.sequence.ShortPrimitiveIterator;
-import org.axsl.common.sequence.ShortSequence;
-import org.axsl.common.sequence.ShortSequenceMutable;
-import org.axsl.common.sequence.ShortSequencePlus;
+import org.axsl.utility.sequence.ShortPrimitiveIterator;
+import org.axsl.utility.sequence.ShortSequence;
+import org.axsl.utility.sequence.ShortSequenceMutable;
+import org.axsl.utility.sequence.ShortSequencePlus;
import java.util.Arrays;
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/sequence/ShortArrayBuilder.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/sequence/ShortArrayBuilder.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/sequence/ShortArrayBuilder.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -30,8 +30,8 @@
import org.foray.common.MarkedIndexOutOfBoundsException;
-import org.axsl.common.sequence.ShortSequence;
-import org.axsl.common.sequence.ShortSequenceMutable;
+import org.axsl.utility.sequence.ShortSequence;
+import org.axsl.utility.sequence.ShortSequenceMutable;
import java.util.Arrays;
import java.util.EmptyStackException;
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/sequence/ShortSequenceIterator.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/sequence/ShortSequenceIterator.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/sequence/ShortSequenceIterator.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -28,8 +28,8 @@
package org.foray.common.sequence;
-import org.axsl.common.sequence.ShortPrimitiveIterator;
-import org.axsl.common.sequence.ShortSequence;
+import org.axsl.utility.sequence.ShortPrimitiveIterator;
+import org.axsl.utility.sequence.ShortSequence;
import java.util.NoSuchElementException;
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/sequence/package-info.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/sequence/package-info.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/sequence/package-info.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -27,7 +27,7 @@
*/
/**
- * Implementations of the interfaces in {@link org.axsl.common.sequence}.
+ * Implementations of the interfaces in {@link org.axsl.utility.sequence}.
* Wrappers of primitive arrays, intended to make array handling more safe and more flexible, and to make code using
* them more fluent.
*/
Modified: trunk/foray/foray-common/src/test/java/org/foray/common/data/ByteSequenceTokenizerTests.java
===================================================================
--- trunk/foray/foray-common/src/test/java/org/foray/common/data/ByteSequenceTokenizerTests.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-common/src/test/java/org/foray/common/data/ByteSequenceTokenizerTests.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -30,8 +30,8 @@
import org.foray.common.sequence.ByteArray;
-import org.axsl.common.sequence.ByteSequence;
import org.axsl.unicode.block.Basic_Latin_Block;
+import org.axsl.utility.sequence.ByteSequence;
import org.junit.Assert;
import org.junit.Test;
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/Font4a.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/Font4a.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/Font4a.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -32,11 +32,11 @@
import org.foray.font.config.RegisteredFont;
import org.foray.font.format.Kerning;
-import org.axsl.common.sequence.IntSequence;
import org.axsl.font.Font;
import org.axsl.font.FontContext;
import org.axsl.orthography.Orthography;
import org.axsl.ps.CharSet;
+import org.axsl.utility.sequence.IntSequence;
import org.slf4j.Logger;
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/FontUse4a.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/FontUse4a.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/FontUse4a.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -38,8 +38,6 @@
import org.foray.font.format.ttf.TtfTableGsub;
import org.foray.font.format.type1.Type1Font;
-import org.axsl.common.sequence.ByteSequence;
-import org.axsl.common.sequence.IntSequence;
import org.axsl.font.Font;
import org.axsl.font.FontConsumer;
import org.axsl.font.FontContext;
@@ -50,6 +48,8 @@
import org.axsl.ps.CharSet;
import org.axsl.ps.Encoding;
import org.axsl.unicode.block.Basic_Latin_Block;
+import org.axsl.utility.sequence.ByteSequence;
+import org.axsl.utility.sequence.IntSequence;
import org.slf4j.Logger;
Modified: trunk/foray/foray-font/src/main/java/org/foray/font/format/type1/Type1FontParser.java
===================================================================
--- trunk/foray/foray-font/src/main/java/org/foray/font/format/type1/Type1FontParser.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-font/src/main/java/org/foray/font/format/type1/Type1FontParser.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -33,7 +33,6 @@
import org.foray.font.format.FontParser;
import org.foray.font.format.FontParserClient;
-import org.axsl.common.sequence.ByteSequence;
import org.axsl.font.FontException;
import org.axsl.ps.PsException;
import org.axsl.ps.PsFontDictionary;
@@ -43,6 +42,7 @@
import org.axsl.ps.PsInterpreterException;
import org.axsl.ps.PsServer;
import org.axsl.ps.PsSystemDict;
+import org.axsl.utility.sequence.ByteSequence;
import java.io.IOException;
import java.util.List;
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoRefinedText4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoRefinedText4a.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoRefinedText4a.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -32,7 +32,7 @@
import org.foray.common.primitive.XmlCharacterUtils;
import org.foray.common.sequence.IntArrayBuilder;
-import org.axsl.common.sequence.IntSequencePlus;
+import org.axsl.utility.sequence.IntSequencePlus;
import org.axsl.value.LinefeedTreatment;
import org.axsl.value.TextTransform;
Modified: trunk/foray/foray-graphic/src/main/java/org/foray/graphic/BmpGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/main/java/org/foray/graphic/BmpGraphic.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-graphic/src/main/java/org/foray/graphic/BmpGraphic.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -36,9 +36,9 @@
import org.foray.common.WellKnownConstants;
import org.foray.common.sequence.ByteArray;
-import org.axsl.common.sequence.ByteSequence;
import org.axsl.graphic.Graphic;
import org.axsl.graphic.GraphicException;
+import org.axsl.utility.sequence.ByteSequence;
import java.awt.Color;
import java.awt.color.ColorSpace;
Modified: trunk/foray/foray-graphic/src/main/java/org/foray/graphic/EpsGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/main/java/org/foray/graphic/EpsGraphic.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-graphic/src/main/java/org/foray/graphic/EpsGraphic.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -32,10 +32,10 @@
import org.foray.common.data.BoundingBoxUtils;
import org.foray.common.sequence.ByteArray;
-import org.axsl.common.sequence.ByteSequence;
import org.axsl.graphic.Graphic;
import org.axsl.graphic.GraphicException;
import org.axsl.ps.BoundingBox;
+import org.axsl.utility.sequence.ByteSequence;
import java.awt.Color;
import java.awt.color.ColorSpace;
Modified: trunk/foray/foray-graphic/src/main/java/org/foray/graphic/GifGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/main/java/org/foray/graphic/GifGraphic.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-graphic/src/main/java/org/foray/graphic/GifGraphic.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -31,9 +31,9 @@
import org.foray.common.WellKnownConstants;
import org.foray.common.sequence.ByteArray;
-import org.axsl.common.sequence.ByteSequence;
import org.axsl.graphic.Graphic;
import org.axsl.graphic.GraphicException;
+import org.axsl.utility.sequence.ByteSequence;
import java.awt.Color;
import java.awt.Transparency;
Modified: trunk/foray/foray-graphic/src/main/java/org/foray/graphic/Graphic4a.java
===================================================================
--- trunk/foray/foray-graphic/src/main/java/org/foray/graphic/Graphic4a.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-graphic/src/main/java/org/foray/graphic/Graphic4a.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -33,9 +33,9 @@
import org.foray.graphic.factory.GraphicFactory;
import org.foray.graphic.output.GraphicOutputFactory;
-import org.axsl.common.sequence.ByteSequence;
import org.axsl.graphic.GraphicException;
import org.axsl.graphic.output.GraphicOutput;
+import org.axsl.utility.sequence.ByteSequence;
import org.slf4j.Logger;
Modified: trunk/foray/foray-graphic/src/main/java/org/foray/graphic/JpegGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/main/java/org/foray/graphic/JpegGraphic.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-graphic/src/main/java/org/foray/graphic/JpegGraphic.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -38,9 +38,9 @@
import org.foray.common.WellKnownConstants;
import org.foray.common.sequence.ByteArray;
-import org.axsl.common.sequence.ByteSequence;
import org.axsl.graphic.Graphic;
import org.axsl.graphic.GraphicException;
+import org.axsl.utility.sequence.ByteSequence;
import java.awt.Color;
import java.awt.color.ColorSpace;
Modified: trunk/foray/foray-graphic/src/main/java/org/foray/graphic/MathGraphic4a.java
===================================================================
--- trunk/foray/foray-graphic/src/main/java/org/foray/graphic/MathGraphic4a.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-graphic/src/main/java/org/foray/graphic/MathGraphic4a.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -30,9 +30,9 @@
import org.foray.common.Mime;
-import org.axsl.common.sequence.ByteSequence;
import org.axsl.graphic.Graphic;
import org.axsl.graphic.GraphicException;
+import org.axsl.utility.sequence.ByteSequence;
import org.w3c.dom.mathml.MathMLDocument;
import org.w3c.dom.svg.SVGDocument;
Modified: trunk/foray/foray-graphic/src/main/java/org/foray/graphic/PdfGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/main/java/org/foray/graphic/PdfGraphic.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-graphic/src/main/java/org/foray/graphic/PdfGraphic.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -30,9 +30,9 @@
import org.foray.common.sequence.ByteArray;
-import org.axsl.common.sequence.ByteSequence;
import org.axsl.graphic.Graphic;
import org.axsl.graphic.GraphicException;
+import org.axsl.utility.sequence.ByteSequence;
import java.awt.Color;
import java.awt.color.ColorSpace;
Modified: trunk/foray/foray-graphic/src/main/java/org/foray/graphic/PngGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/main/java/org/foray/graphic/PngGraphic.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-graphic/src/main/java/org/foray/graphic/PngGraphic.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -31,9 +31,9 @@
import org.foray.common.WellKnownConstants;
import org.foray.common.sequence.ByteArray;
-import org.axsl.common.sequence.ByteSequence;
import org.axsl.graphic.Graphic;
import org.axsl.graphic.GraphicException;
+import org.axsl.utility.sequence.ByteSequence;
import org.apache.xmlgraphics.image.GraphicsUtil;
import org.apache.xmlgraphics.image.codec.png.PNGDecodeParam;
Modified: trunk/foray/foray-graphic/src/main/java/org/foray/graphic/SvgGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/main/java/org/foray/graphic/SvgGraphic.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-graphic/src/main/java/org/foray/graphic/SvgGraphic.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -31,9 +31,9 @@
import org.foray.common.Mime;
import org.foray.graphic.batik.BatikUaAwt;
-import org.axsl.common.sequence.ByteSequence;
import org.axsl.graphic.Graphic;
import org.axsl.graphic.GraphicException;
+import org.axsl.utility.sequence.ByteSequence;
import org.apache.batik.anim.dom.SAXSVGDocumentFactory;
import org.apache.batik.anim.dom.SVGOMDocument;
Modified: trunk/foray/foray-graphic/src/main/java/org/foray/graphic/TempImage.java
===================================================================
--- trunk/foray/foray-graphic/src/main/java/org/foray/graphic/TempImage.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-graphic/src/main/java/org/foray/graphic/TempImage.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -31,11 +31,11 @@
import org.foray.common.WellKnownConstants;
import org.foray.common.sequence.ByteArray;
-import org.axsl.common.sequence.ByteSequence;
import org.axsl.graphic.Graphic;
import org.axsl.graphic.GraphicException;
import org.axsl.graphic.GraphicLink;
import org.axsl.graphic.output.GraphicOutput;
+import org.axsl.utility.sequence.ByteSequence;
import java.awt.Color;
import java.awt.color.ColorSpace;
Modified: trunk/foray/foray-graphic/src/main/java/org/foray/graphic/TiffGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/main/java/org/foray/graphic/TiffGraphic.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-graphic/src/main/java/org/foray/graphic/TiffGraphic.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -36,9 +36,9 @@
import org.foray.common.WellKnownConstants;
import org.foray.common.sequence.ByteArray;
-import org.axsl.common.sequence.ByteSequence;
import org.axsl.graphic.Graphic;
import org.axsl.graphic.GraphicException;
+import org.axsl.utility.sequence.ByteSequence;
import org.apache.xmlgraphics.image.codec.tiff.TIFFDecodeParam;
import org.apache.xmlgraphics.image.codec.tiff.TIFFDirectory;
Modified: trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestBmpGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestBmpGraphic.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestBmpGraphic.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -30,8 +30,8 @@
import org.foray.common.url.UrlUtil;
-import org.axsl.common.sequence.ByteSequence;
import org.axsl.graphic.GraphicException;
+import org.axsl.utility.sequence.ByteSequence;
import org.junit.Assert;
import org.junit.Test;
Modified: trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestGifGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestGifGraphic.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestGifGraphic.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -30,8 +30,8 @@
import org.foray.common.url.UrlUtil;
-import org.axsl.common.sequence.ByteSequence;
import org.axsl.graphic.GraphicException;
+import org.axsl.utility.sequence.ByteSequence;
import org.junit.Assert;
import org.junit.Test;
Modified: trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestJpegGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestJpegGraphic.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestJpegGraphic.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -30,8 +30,8 @@
import org.foray.common.url.UrlUtil;
-import org.axsl.common.sequence.ByteSequence;
import org.axsl.graphic.GraphicException;
+import org.axsl.utility.sequence.ByteSequence;
import org.junit.Assert;
import org.junit.Test;
Modified: trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestPngGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestPngGraphic.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestPngGraphic.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -30,8 +30,8 @@
import org.foray.common.url.UrlUtil;
-import org.axsl.common.sequence.ByteSequence;
import org.axsl.graphic.GraphicException;
+import org.axsl.utility.sequence.ByteSequence;
import org.junit.Assert;
import org.junit.Test;
Modified: trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestTiffGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestTiffGraphic.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestTiffGraphic.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -30,8 +30,8 @@
import org.foray.common.url.UrlUtil;
-import org.axsl.common.sequence.ByteSequence;
import org.axsl.graphic.GraphicException;
+import org.axsl.utility.sequence.ByteSequence;
import org.junit.Assert;
import org.junit.Test;
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Lexer4a.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Lexer4a.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Lexer4a.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -33,8 +33,8 @@
import org.foray.common.primitive.NumberUtils;
import org.foray.common.primitive.StringUtils;
-import org.axsl.common.sequence.IntSequence;
import org.axsl.orthography.optional.Lexer;
+import org.axsl.utility.sequence.IntSequence;
import java.util.ArrayList;
import java.util.Collections;
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/LexerIcu4jBreakIterator.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/LexerIcu4jBreakIterator.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/LexerIcu4jBreakIterator.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -31,8 +31,8 @@
import org.foray.common.i18n.WritingSystem4a;
import org.foray.common.sequence.IntArrayBuilder;
-import org.axsl.common.sequence.IntSequence;
import org.axsl.orthography.optional.Lexer;
+import org.axsl.utility.sequence.IntSequence;
import com.ibm.icu.text.BreakIterator;
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/LexerJavaBreakIterator.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/LexerJavaBreakIterator.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/LexerJavaBreakIterator.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -31,8 +31,8 @@
import org.foray.common.i18n.WritingSystem4a;
import org.foray.common.sequence.IntArrayBuilder;
-import org.axsl.common.sequence.IntSequence;
import org.axsl.orthography.optional.Lexer;
+import org.axsl.utility.sequence.IntSequence;
import java.text.BreakIterator;
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Word4a.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Word4a.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Word4a.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -31,7 +31,6 @@
import org.foray.common.primitive.CharSequenceUtils;
import org.foray.common.primitive.NumberUtils;
-import org.axsl.common.sequence.ByteSequence;
import org.axsl.fotree.text.FoDiscretionaryHyphen;
import org.axsl.fotree.text.FoWord;
import org.axsl.fotree.text.FoWordComponent;
@@ -42,6 +41,7 @@
import org.axsl.kpModel.ParaPenalty;
import org.axsl.orthography.Word;
import org.axsl.orthography.WordSegment;
+import org.axsl.utility.sequence.ByteSequence;
import org.axsl.value.TextTransform;
import org.axsl.value.group.TextModifiers;
Modified: trunk/foray/foray-pdf/src/main/java/org/foray/pdf/PdfCrossRefEntry.java
===================================================================
--- trunk/foray/foray-pdf/src/main/java/org/foray/pdf/PdfCrossRefEntry.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-pdf/src/main/java/org/foray/pdf/PdfCrossRefEntry.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -30,7 +30,7 @@
import org.foray.pdf.object.PdfObject;
-import org.axsl.common.sequence.ByteSequencePlus;
+import org.axsl.utility.sequence.ByteSequencePlus;
import lombok.Getter;
import lombok.Setter;
Modified: trunk/foray/foray-pdf/src/main/java/org/foray/pdf/PdfCrossRefInfo.java
===================================================================
--- trunk/foray/foray-pdf/src/main/java/org/foray/pdf/PdfCrossRefInfo.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-pdf/src/main/java/org/foray/pdf/PdfCrossRefInfo.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -33,7 +33,7 @@
import org.foray.common.sequence.IntArrayBuilder;
import org.foray.pdf.object.PdfObject;
-import org.axsl.common.sequence.IntPrimitiveIterator;
+import org.axsl.utility.sequence.IntPrimitiveIterator;
import java.io.IOException;
import java.io.OutputStream;
Modified: trunk/foray/foray-pdf/src/main/java/org/foray/pdf/PdfParser.java
===================================================================
--- trunk/foray/foray-pdf/src/main/java/org/foray/pdf/PdfParser.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-pdf/src/main/java/org/foray/pdf/PdfParser.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -48,10 +48,10 @@
import org.foray.pdf.object.PdfTextString;
import org.foray.pdf.object.PdfTrailer;
-import org.axsl.common.sequence.ByteSequence;
-import org.axsl.common.sequence.ByteSequencePlus;
import org.axsl.pdf.PdfException;
import org.axsl.pdf.PdfVersion;
+import org.axsl.utility.sequence.ByteSequence;
+import org.axsl.utility.sequence.ByteSequencePlus;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Modified: trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfBoolean.java
===================================================================
--- trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfBoolean.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfBoolean.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -30,7 +30,7 @@
import org.foray.common.sequence.ByteArray;
-import org.axsl.common.sequence.ByteSequence;
+import org.axsl.utility.sequence.ByteSequence;
/**
* A PDF boolean.
Modified: trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfDocument4a.java
===================================================================
--- trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfDocument4a.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfDocument4a.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -44,7 +44,6 @@
import org.foray.pdf.PdfHeader;
import org.foray.pdf.PdfParser;
-import org.axsl.common.sequence.IntPrimitiveIterator;
import org.axsl.font.Font;
import org.axsl.font.FontConsumer;
import org.axsl.font.FontUse;
@@ -61,6 +60,7 @@
import org.axsl.pdf.PdfXobject;
import org.axsl.ps.Encoding;
import org.axsl.ps.PsServer;
+import org.axsl.utility.sequence.IntPrimitiveIterator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Modified: trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfFontFileStream.java
===================================================================
--- trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfFontFileStream.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfFontFileStream.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -28,9 +28,9 @@
package org.foray.pdf.object;
-import org.axsl.common.sequence.ByteSequence;
import org.axsl.font.FontUse;
import org.axsl.pdf.PdfException;
+import org.axsl.utility.sequence.ByteSequence;
/**
* Specialized {@link PdfStream} for a PDF Font file.
Modified: trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfGenericStream.java
===================================================================
--- trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfGenericStream.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfGenericStream.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -28,8 +28,8 @@
package org.foray.pdf.object;
-import org.axsl.common.sequence.ByteSequence;
import org.axsl.pdf.PdfException;
+import org.axsl.utility.sequence.ByteSequence;
/**
* This class used mostly by the parser.
Modified: trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfStream.java
===================================================================
--- trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfStream.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfStream.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -28,10 +28,10 @@
package org.foray.pdf.object;
-import org.axsl.common.sequence.ByteSequence;
import org.axsl.pdf.PdfException;
import org.axsl.ps.PsEncodeFilter;
import org.axsl.ps.PsFilterType;
+import org.axsl.utility.sequence.ByteSequence;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
Modified: trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfTextString.java
===================================================================
--- trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfTextString.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfTextString.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -31,7 +31,7 @@
import org.foray.common.WellKnownConstants;
import org.foray.common.sequence.ByteSequenceChars;
-import org.axsl.common.sequence.ByteSequence;
+import org.axsl.utility.sequence.ByteSequence;
/**
* A PDF Text String, as defined in PDF Reference, 2nd Edition, Section 3.8.1.
Modified: trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfXreference.java
===================================================================
--- trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfXreference.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfXreference.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -30,11 +30,11 @@
import org.foray.common.data.BoundingBoxUtils;
-import org.axsl.common.sequence.ByteSequence;
import org.axsl.graphic.Graphic;
import org.axsl.graphic.GraphicException;
import org.axsl.pdf.PdfException;
import org.axsl.ps.BoundingBox;
+import org.axsl.utility.sequence.ByteSequence;
import java.awt.geom.AffineTransform;
import java.awt.geom.Rectangle2D;
Modified: trunk/foray/foray-ps/src/main/java/org/foray/ps/PsFileReal.java
===================================================================
--- trunk/foray/foray-ps/src/main/java/org/foray/ps/PsFileReal.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-ps/src/main/java/org/foray/ps/PsFileReal.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -30,8 +30,8 @@
import org.foray.common.sequence.ByteArray;
-import org.axsl.common.sequence.ByteSequence;
import org.axsl.ps.PsInput;
+import org.axsl.utility.sequence.ByteSequence;
import java.io.File;
import java.io.IOException;
Modified: trunk/foray/foray-ps/src/main/java/org/foray/ps/PsInputFile.java
===================================================================
--- trunk/foray/foray-ps/src/main/java/org/foray/ps/PsInputFile.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-ps/src/main/java/org/foray/ps/PsInputFile.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -31,8 +31,8 @@
import org.foray.common.WellKnownConstants;
import org.foray.common.sequence.ByteArray;
-import org.axsl.common.sequence.ByteSequence;
import org.axsl.ps.PsInput;
+import org.axsl.utility.sequence.ByteSequence;
import java.io.File;
import java.io.IOException;
Modified: trunk/foray/foray-ps/src/main/java/org/foray/ps/PsServer4a.java
===================================================================
--- trunk/foray/foray-ps/src/main/java/org/foray/ps/PsServer4a.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-ps/src/main/java/org/foray/ps/PsServer4a.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -68,8 +68,6 @@
import org.foray.ps.pdf.PdfSystemDict;
import org.foray.ps.readonly.ReadOnlySystemDict;
-import org.axsl.common.sequence.IntSequence;
-import org.axsl.common.sequence.IntSequenceMutable;
import org.axsl.ps.CharSet;
import org.axsl.ps.Cmap04Ttf;
import org.axsl.ps.Cmap12Ttf;
@@ -79,6 +77,8 @@
import org.axsl.ps.PsFilterType;
import org.axsl.ps.PsInput;
import org.axsl.ps.PsServer;
+import org.axsl.utility.sequence.IntSequence;
+import org.axsl.utility.sequence.IntSequenceMutable;
import java.awt.Graphics2D;
import java.io.File;
Modified: trunk/foray/foray-ps/src/main/java/org/foray/ps/PsStringInput.java
===================================================================
--- trunk/foray/foray-ps/src/main/java/org/foray/ps/PsStringInput.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-ps/src/main/java/org/foray/ps/PsStringInput.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -30,8 +30,8 @@
import org.foray.common.sequence.ByteArray;
-import org.axsl.common.sequence.ByteSequence;
import org.axsl.ps.PsInput;
+import org.axsl.utility.sequence.ByteSequence;
/**
* A {@link PsInput} implementation that simply wraps a String.
Modified: trunk/foray/foray-ps/src/main/java/org/foray/ps/encode/CharSet4a.java
===================================================================
--- trunk/foray/foray-ps/src/main/java/org/foray/ps/encode/CharSet4a.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-ps/src/main/java/org/foray/ps/encode/CharSet4a.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -31,8 +31,8 @@
import org.foray.common.sequence.CharArray;
import org.foray.common.sequence.IntArray;
-import org.axsl.common.sequence.IntSequenceMutable;
import org.axsl.ps.CharSet;
+import org.axsl.utility.sequence.IntSequenceMutable;
import java.io.IOException;
import java.io.ObjectInputStream;
Modified: trunk/foray/foray-ps/src/main/java/org/foray/ps/encode/EncodingCustom.java
===================================================================
--- trunk/foray/foray-ps/src/main/java/org/foray/ps/encode/EncodingCustom.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-ps/src/main/java/org/foray/ps/encode/EncodingCustom.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -29,9 +29,9 @@
package org.foray.ps.encode;
-import org.axsl.common.sequence.IntSequence;
import org.axsl.ps.GlyphList;
import org.axsl.ps.PsEncoding;
+import org.axsl.utility.sequence.IntSequence;
import java.util.List;
Modified: trunk/foray/foray-ps/src/main/java/org/foray/ps/encode/EncodingParser.java
===================================================================
--- trunk/foray/foray-ps/src/main/java/org/foray/ps/encode/EncodingParser.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-ps/src/main/java/org/foray/ps/encode/EncodingParser.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -34,10 +34,10 @@
import org.foray.common.sequence.IntArrayBuilder;
import org.foray.common.url.UrlFactory;
-import org.axsl.common.sequence.CharSequenceMutable;
-import org.axsl.common.sequence.IntSequenceMutable;
import org.axsl.ps.GlyphList;
import org.axsl.ps.PsException;
+import org.axsl.utility.sequence.CharSequenceMutable;
+import org.axsl.utility.sequence.IntSequenceMutable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Modified: trunk/foray/foray-ps/src/main/java/org/foray/ps/encode/EncodingVector4a.java
===================================================================
--- trunk/foray/foray-ps/src/main/java/org/foray/ps/encode/EncodingVector4a.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-ps/src/main/java/org/foray/ps/encode/EncodingVector4a.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -33,10 +33,10 @@
import org.foray.common.sequence.IntArray;
import org.foray.common.sequence.IntArrayBuilder;
-import org.axsl.common.sequence.IntSequence;
-import org.axsl.common.sequence.IntSequenceMutable;
import org.axsl.ps.GlyphList;
import org.axsl.ps.PsEncoding;
+import org.axsl.utility.sequence.IntSequence;
+import org.axsl.utility.sequence.IntSequenceMutable;
import java.io.IOException;
import java.io.ObjectInputStream;
Modified: trunk/foray/foray-ps/src/main/java/org/foray/ps/java2d/Java2dSystemDict.java
===================================================================
--- trunk/foray/foray-ps/src/main/java/org/foray/ps/java2d/Java2dSystemDict.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-ps/src/main/java/org/foray/ps/java2d/Java2dSystemDict.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -38,7 +38,7 @@
import org.foray.ps.PsNumber;
import org.foray.ps.PsSystemDict4a;
-import org.axsl.common.sequence.ByteSequence;
+import org.axsl.utility.sequence.ByteSequence;
import java.awt.Graphics2D;
import java.awt.geom.GeneralPath;
Modified: trunk/foray/foray-ps/src/main/java/org/foray/ps/pdf/PdfSystemDict.java
===================================================================
--- trunk/foray/foray-ps/src/main/java/org/foray/ps/pdf/PdfSystemDict.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-ps/src/main/java/org/foray/ps/pdf/PdfSystemDict.java 2022-01-21 18:14:42 UTC (rev 12444)
@@ -34,7 +34,7 @@
import org.foray.ps.PsOperator;
import org.foray.ps.PsSystemDict4a;
-import org.axsl.common.sequence.ByteSequence;
+import org.axsl.utility.sequence.ByteSequence;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
Modified: trunk/foray/foray-ps/src/main/java/org/foray/ps/readonly/ReadOnlySystemDict.java
===================================================================
--- trunk/foray/foray-ps/src/main/java/org/foray/ps/readonly/ReadOnlySystemDict.java 2022-01-21 17:40:02 UTC (rev 12443)
+++ trunk/foray/foray-ps/src/ma...
[truncated message content] |
|
From: <vic...@us...> - 2022-01-21 17:40:05
|
Revision: 12443
http://sourceforge.net/p/foray/code/12443
Author: victormote
Date: 2022-01-21 17:40:02 +0000 (Fri, 21 Jan 2022)
Log Message:
-----------
Conform to aXSL change: Rename axsl-common project to axsl-utility.
Modified Paths:
--------------
trunk/foray/foray-common/build.gradle
trunk/foray/foray-core/build.gradle
trunk/foray/foray-font/build.gradle
trunk/foray/foray-fotree/build.gradle
trunk/foray/foray-graphic/build.gradle
trunk/foray/foray-orthography/build.gradle
trunk/foray/foray-pdf/build.gradle
trunk/foray/foray-pioneer/build.gradle
trunk/foray/foray-ps/build.gradle
trunk/foray/foray-render/build.gradle
trunk/foray/foray-zz-attic/build.gradle
Modified: trunk/foray/foray-common/build.gradle
===================================================================
--- trunk/foray/foray-common/build.gradle 2022-01-21 16:46:30 UTC (rev 12442)
+++ trunk/foray/foray-common/build.gradle 2022-01-21 17:40:02 UTC (rev 12443)
@@ -8,7 +8,7 @@
/* Turn transitive resolution OFF for both aXSL and FOray modules, for greater design visibility. */
- api (group: 'org.axsl', name: 'axsl-common', version: axslVersion) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-utility', version: axslVersion) { transitive = false }
api (group: 'org.axsl', name: 'axsl-i18n', version: axslVersion) { transitive = false }
api (group: 'org.axsl', name: 'axsl-kp-model', version: axslVersion) { transitive = false }
api (group: 'org.axsl', name: 'axsl-orthography', version: axslVersion) { transitive = false }
Modified: trunk/foray/foray-core/build.gradle
===================================================================
--- trunk/foray/foray-core/build.gradle 2022-01-21 16:46:30 UTC (rev 12442)
+++ trunk/foray/foray-core/build.gradle 2022-01-21 17:40:02 UTC (rev 12443)
@@ -5,7 +5,7 @@
api group: 'xml-resolver', name: 'xml-resolver', version: xmlResolverVersion
api group: 'org.axsl', name: 'axsl-areatree', version: axslVersion
- api group: 'org.axsl', name: 'axsl-common', version: axslVersion
+ api group: 'org.axsl', name: 'axsl-utility', version: axslVersion
api group: 'org.axsl', name: 'axsl-fotree', version: axslVersion
api group: 'org.axsl', name: 'axsl-font', version: axslVersion
api group: 'org.axsl', name: 'axsl-galley', version: axslVersion
Modified: trunk/foray/foray-font/build.gradle
===================================================================
--- trunk/foray/foray-font/build.gradle 2022-01-21 16:46:30 UTC (rev 12442)
+++ trunk/foray/foray-font/build.gradle 2022-01-21 17:40:02 UTC (rev 12443)
@@ -9,7 +9,7 @@
/* Turn transitive resolution OFF for both aXSL and FOray modules, for greater design visibility. */
- api (group: 'org.axsl', name: 'axsl-common', version: axslVersion) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-utility', version: axslVersion) { transitive = false }
api (group: 'org.axsl', name: 'axsl-font', version: axslVersion) { transitive = false }
api (group: 'org.axsl', name: 'axsl-ps', version: axslVersion) { transitive = false }
api (group: 'org.axsl', name: 'axsl-orthography', version: axslVersion) { transitive = false }
Modified: trunk/foray/foray-fotree/build.gradle
===================================================================
--- trunk/foray/foray-fotree/build.gradle 2022-01-21 16:46:30 UTC (rev 12442)
+++ trunk/foray/foray-fotree/build.gradle 2022-01-21 17:40:02 UTC (rev 12443)
@@ -6,7 +6,7 @@
api group: 'org.axsl.org.w3c.dom.mathml', name: 'mathml-dom-java', version: mathMlDomVersion
api group: 'org.axsl', name: 'axsl-fotree', version: axslVersion
- api group: 'org.axsl', name: 'axsl-common', version: axslVersion
+ api group: 'org.axsl', name: 'axsl-utility', version: axslVersion
api group: 'org.axsl', name: 'axsl-i18n', version: axslVersion
api group: 'org.axsl', name: 'axsl-font', version: axslVersion
api group: 'org.axsl', name: 'axsl-graphic', version: axslVersion
Modified: trunk/foray/foray-graphic/build.gradle
===================================================================
--- trunk/foray/foray-graphic/build.gradle 2022-01-21 16:46:30 UTC (rev 12442)
+++ trunk/foray/foray-graphic/build.gradle 2022-01-21 17:40:02 UTC (rev 12443)
@@ -15,7 +15,7 @@
/* Turn transitive resolution OFF for both aXSL and FOray modules, for greater design visibility. */
- api (group: 'org.axsl', name: 'axsl-common', version: axslVersion) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-utility', version: axslVersion) { transitive = false }
api (group: 'org.axsl', name: 'axsl-font', version: axslVersion) { transitive = false }
api (group: 'org.axsl', name: 'axsl-graphic', version: axslVersion) { transitive = false }
api (group: 'org.axsl', name: 'axsl-orthography', version: axslVersion) { transitive = false }
Modified: trunk/foray/foray-orthography/build.gradle
===================================================================
--- trunk/foray/foray-orthography/build.gradle 2022-01-21 16:46:30 UTC (rev 12442)
+++ trunk/foray/foray-orthography/build.gradle 2022-01-21 17:40:02 UTC (rev 12443)
@@ -10,7 +10,7 @@
/* Turn transitive resolution OFF for both aXSL and FOray modules, for greater design visibility. */
- api (group: 'org.axsl', name: 'axsl-common', version: axslVersion) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-utility', version: axslVersion) { transitive = false }
api (group: 'org.axsl', name: 'axsl-i18n', version: axslVersion) { transitive = false }
api (group: 'org.axsl', name: 'axsl-orthography', version: axslVersion) { transitive = false }
api (group: 'org.axsl', name: 'axsl-fotree', version: axslVersion) { transitive = false }
Modified: trunk/foray/foray-pdf/build.gradle
===================================================================
--- trunk/foray/foray-pdf/build.gradle 2022-01-21 16:46:30 UTC (rev 12442)
+++ trunk/foray/foray-pdf/build.gradle 2022-01-21 17:40:02 UTC (rev 12443)
@@ -7,7 +7,7 @@
/* Turn transitive resolution OFF for both aXSL and FOray modules, for greater design visibility. */
api (group: 'org.axsl', name: 'axsl-pdf', version: axslVersion) { transitive = false }
- api (group: 'org.axsl', name: 'axsl-common', version: axslVersion) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-utility', version: axslVersion) { transitive = false }
api (group: 'org.axsl', name: 'axsl-font', version: axslVersion) { transitive = false }
api (group: 'org.axsl', name: 'axsl-graphic', version: axslVersion) { transitive = false }
api (group: 'org.axsl', name: 'axsl-orthography', version: axslVersion) { transitive = false }
Modified: trunk/foray/foray-pioneer/build.gradle
===================================================================
--- trunk/foray/foray-pioneer/build.gradle 2022-01-21 16:46:30 UTC (rev 12442)
+++ trunk/foray/foray-pioneer/build.gradle 2022-01-21 17:40:02 UTC (rev 12443)
@@ -3,7 +3,7 @@
dependencies {
api group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion
- api group: 'org.axsl', name: 'axsl-common', version: axslVersion
+ api group: 'org.axsl', name: 'axsl-utility', version: axslVersion
api group: 'org.axsl', name: 'axsl-layout', version: axslVersion
api group: 'org.axsl', name: 'axsl-fotree', version: axslVersion
api group: 'org.axsl', name: 'axsl-areatree', version: axslVersion
Modified: trunk/foray/foray-ps/build.gradle
===================================================================
--- trunk/foray/foray-ps/build.gradle 2022-01-21 16:46:30 UTC (rev 12442)
+++ trunk/foray/foray-ps/build.gradle 2022-01-21 17:40:02 UTC (rev 12443)
@@ -5,7 +5,7 @@
api group: 'commons-cli', name: 'commons-cli', version: commonsCliVersion
api group: 'commons-io', name: 'commons-io', version: commonsIoVersion
- api group: 'org.axsl', name: 'axsl-common', version: axslVersion
+ api group: 'org.axsl', name: 'axsl-utility', version: axslVersion
api group: 'org.axsl', name: 'axsl-ps', version: axslVersion
api project(':foray-common')
Modified: trunk/foray/foray-render/build.gradle
===================================================================
--- trunk/foray/foray-render/build.gradle 2022-01-21 16:46:30 UTC (rev 12442)
+++ trunk/foray/foray-render/build.gradle 2022-01-21 17:40:02 UTC (rev 12443)
@@ -6,7 +6,7 @@
/* Turn transitive resolution OFF for both aXSL and FOray modules, for greater design visibility. */
- api (group: 'org.axsl', name: 'axsl-common', version: axslVersion) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-utility', version: axslVersion) { transitive = false }
api (group: 'org.axsl', name: 'axsl-output', version: axslVersion) { transitive = false }
api (group: 'org.axsl', name: 'axsl-font', version: axslVersion) { transitive = false }
api (group: 'org.axsl', name: 'axsl-pdf', version: axslVersion) { transitive = false }
Modified: trunk/foray/foray-zz-attic/build.gradle
===================================================================
--- trunk/foray/foray-zz-attic/build.gradle 2022-01-21 16:46:30 UTC (rev 12442)
+++ trunk/foray/foray-zz-attic/build.gradle 2022-01-21 17:40:02 UTC (rev 12443)
@@ -4,7 +4,7 @@
api (group: 'commons-io', name: 'commons-io', version: commonsIoVersion) { transitive = false }
api (group: 'jakarta.activation', name: 'jakarta.activation-api', version: '1.2.2') { transitive = false }
- api (group: 'org.axsl', name: 'axsl-common', version: axslVersion) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-utility', version: axslVersion) { transitive = false }
api (project(':foray-common')) { transitive = false }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-01-21 16:46:33
|
Revision: 12442
http://sourceforge.net/p/foray/code/12442
Author: victormote
Date: 2022-01-21 16:46:30 +0000 (Fri, 21 Jan 2022)
Log Message:
-----------
Conform to aXSL change: Move WritingSystem interface to i18n.
Modified Paths:
--------------
trunk/foray/foray-common/src/main/java/org/foray/common/i18n/WritingSystem4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.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-common/src/main/java/org/foray/common/i18n/WritingSystem4a.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/i18n/WritingSystem4a.java 2022-01-21 16:35:19 UTC (rev 12441)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/i18n/WritingSystem4a.java 2022-01-21 16:46:30 UTC (rev 12442)
@@ -34,7 +34,7 @@
import org.axsl.i18n.Country;
import org.axsl.i18n.Language;
import org.axsl.i18n.Script;
-import org.axsl.orthography.WritingSystem;
+import org.axsl.i18n.WritingSystem;
import com.ibm.icu.util.ULocale;
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java 2022-01-21 16:35:19 UTC (rev 12441)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java 2022-01-21 16:46:30 UTC (rev 12442)
@@ -75,12 +75,12 @@
import org.axsl.graphic.Graphic;
import org.axsl.graphic.GraphicServer;
import org.axsl.i18n.Script;
+import org.axsl.i18n.WritingSystem;
import org.axsl.kpModel.ParaConfig;
import org.axsl.kpModel.ParaGlue;
import org.axsl.kpModel.ParaLeaf;
import org.axsl.orthography.Orthography;
import org.axsl.orthography.OrthographyServer;
-import org.axsl.orthography.WritingSystem;
import org.axsl.speech.SpeechException;
import org.axsl.speech.SpeechServer;
import org.axsl.speech.Voice;
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 2022-01-21 16:35:19 UTC (rev 12441)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/OrthographyServer4a.java 2022-01-21 16:46:30 UTC (rev 12442)
@@ -42,8 +42,8 @@
import org.axsl.fotree.text.FoOrthographyServer;
import org.axsl.i18n.Language;
+import org.axsl.i18n.WritingSystem;
import org.axsl.orthography.OrthographyException;
-import org.axsl.orthography.WritingSystem;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/SpellChecker.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/SpellChecker.java 2022-01-21 16:35:19 UTC (rev 12441)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/SpellChecker.java 2022-01-21 16:46:30 UTC (rev 12442)
@@ -40,8 +40,8 @@
import org.foray.orthography.OrthographyServerConfig;
import org.foray.orthography.SegmentDictionary;
+import org.axsl.i18n.WritingSystem;
import org.axsl.orthography.OrthographyException;
-import org.axsl.orthography.WritingSystem;
import org.axsl.orthography.optional.Dictionary;
import org.apache.commons.cli.CommandLine;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-01-21 16:35:22
|
Revision: 12441
http://sourceforge.net/p/foray/code/12441
Author: victormote
Date: 2022-01-21 16:35:19 +0000 (Fri, 21 Jan 2022)
Log Message:
-----------
Conform to aXSL changes: Remove interfaces related to page-number formatting and the related methods.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/main/java/org/foray/area/PageCollection4a.java
trunk/foray/foray-common/src/main/java/org/foray/common/PositiveIntegerFormatter.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageSequence4a.java
trunk/foray/foray-render/src/main/java/org/foray/render/pdf/PdfRenderer.java
Added Paths:
-----------
trunk/foray/foray-common/src/main/java/org/foray/common/PositiveIntegerFormat.java
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/PageCollection4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/PageCollection4a.java 2022-01-21 16:18:12 UTC (rev 12440)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/PageCollection4a.java 2022-01-21 16:35:19 UTC (rev 12441)
@@ -34,7 +34,6 @@
import org.axsl.area.AreaTreeException;
import org.axsl.area.PageCollection;
import org.axsl.area.PageRa;
-import org.axsl.common.PositiveIntegerFormatter;
import org.axsl.fotree.FoTreeException;
import org.axsl.fotree.fo.FolioPrefix;
import org.axsl.fotree.fo.FolioSuffix;
@@ -430,11 +429,6 @@
}
@Override
- public PositiveIntegerFormatter getPageNumberFormatter() {
- return this.traitGeneratedBy().getPageNumberFormatter();
- }
-
- @Override
public CharSequence getPageNumberPrefix() {
final FolioPrefix prefix = this.traitGeneratedBy().getFolioPrefix();
if (prefix == null) {
Added: trunk/foray/foray-common/src/main/java/org/foray/common/PositiveIntegerFormat.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/PositiveIntegerFormat.java (rev 0)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/PositiveIntegerFormat.java 2022-01-21 16:35:19 UTC (rev 12441)
@@ -0,0 +1,57 @@
+/*
+ * Copyright 2022 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.foray.common;
+
+/**
+ * An enumeration of standard formatting types for formatting integers.
+ */
+public enum PositiveIntegerFormat {
+
+ /** Decimal Arabic numerals. */
+ DECIMAL_ARABIC,
+
+ /** Uppercase roman numerals. */
+ UPPERCASE_ROMAN,
+
+ /** Lowercase roman numerals. */
+ LOWERCASE_ROMAN,
+
+ /** Uppercase letters (A to Z for the first 26 pages, AA to ZZ for the
+ * next 26, and so on. */
+ UPPERCASE_LETTERS,
+
+ /** Lowercase letters (a to z for the first 26 pages, aa to zz for the
+ * next 26, and so on. */
+ LOWERCASE_LETTERS,
+
+ /** Any integer formatting type that does not fall into another enumerated
+ * type. */
+ OTHER;
+
+}
Property changes on: trunk/foray/foray-common/src/main/java/org/foray/common/PositiveIntegerFormat.java
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev
\ No newline at end of property
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/PositiveIntegerFormatter.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/PositiveIntegerFormatter.java 2022-01-21 16:18:12 UTC (rev 12440)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/PositiveIntegerFormatter.java 2022-01-21 16:35:19 UTC (rev 12441)
@@ -28,18 +28,16 @@
package org.foray.common;
-import org.axsl.common.FormattedIntegerType;
-
/**
* This class uses the 'format', 'groupingSeparator', 'groupingSize',
* and 'letterValue' properties on fo:page-sequence to return a String
* corresponding to the supplied integer page number.
*/
-public class PositiveIntegerFormatter implements org.axsl.common.PositiveIntegerFormatter {
+public class PositiveIntegerFormatter {
/** The format type that should be used by this formatter. */
- private FormattedIntegerType formatType =
- FormattedIntegerType.DECIMAL_ARABIC;
+ private PositiveIntegerFormat formatType =
+ PositiveIntegerFormat.DECIMAL_ARABIC;
/** The minimum amount of padding for decimal formats. */
private int minPadding = 0;
@@ -64,21 +62,21 @@
final int fmtLen = format.length();
if (fmtLen == 1) {
if (format.equals("1")) {
- this.formatType = FormattedIntegerType.DECIMAL_ARABIC;
+ this.formatType = PositiveIntegerFormat.DECIMAL_ARABIC;
this.minPadding = 0;
} else if (format.equals("a")) {
- this.formatType = FormattedIntegerType.LOWERCASE_LETTERS;
+ this.formatType = PositiveIntegerFormat.LOWERCASE_LETTERS;
} else if (format.equals("A")) {
- this.formatType = FormattedIntegerType.UPPERCASE_LETTERS;
+ this.formatType = PositiveIntegerFormat.UPPERCASE_LETTERS;
} else if (format.equals("i")) {
- this.formatType = FormattedIntegerType.LOWERCASE_ROMAN;
+ this.formatType = PositiveIntegerFormat.LOWERCASE_ROMAN;
} else if (format.equals("I")) {
- this.formatType = FormattedIntegerType.UPPERCASE_ROMAN;
+ this.formatType = PositiveIntegerFormat.UPPERCASE_ROMAN;
} else {
/* We don't know how to handle other types right now. Per the
* XSLT 1.0 spec, Section 7.7.1, such types should be handled
* as if they were decimal arabic. */
- this.formatType = FormattedIntegerType.DECIMAL_ARABIC;
+ this.formatType = PositiveIntegerFormat.DECIMAL_ARABIC;
this.minPadding = 0;
}
} else {
@@ -88,7 +86,7 @@
for (int i = 0; i < fmtLen - 1; i++) {
if (format.charAt(i) != '0') {
//log.debug("'format' token not recognized; using '1'");
- this.formatType = FormattedIntegerType.DECIMAL_ARABIC;
+ this.formatType = PositiveIntegerFormat.DECIMAL_ARABIC;
this.minPadding = 0;
} else {
this.minPadding = fmtLen - 1;
@@ -105,7 +103,7 @@
*/
public String makeFormattedPageNumber(final int number) {
String pn = null;
- if (this.formatType == FormattedIntegerType.DECIMAL_ARABIC) {
+ if (this.formatType == PositiveIntegerFormat.DECIMAL_ARABIC) {
pn = Integer.toString(number);
if (this.minPadding >= pn.length()) {
final int nz = this.minPadding - pn.length() + 1;
@@ -112,17 +110,17 @@
pn = this.zeros[nz] + pn;
}
} else if ((this.formatType
- == FormattedIntegerType.LOWERCASE_ROMAN)
+ == PositiveIntegerFormat.LOWERCASE_ROMAN)
|| (this.formatType
- == FormattedIntegerType.UPPERCASE_ROMAN)) {
+ == PositiveIntegerFormat.UPPERCASE_ROMAN)) {
pn = makeRoman(number);
- if (this.formatType == FormattedIntegerType.UPPERCASE_ROMAN) {
+ if (this.formatType == PositiveIntegerFormat.UPPERCASE_ROMAN) {
pn = pn.toUpperCase();
}
} else {
// alphabetic
pn = makeAlpha(number);
- if (this.formatType == FormattedIntegerType.UPPERCASE_LETTERS) {
+ if (this.formatType == PositiveIntegerFormat.UPPERCASE_LETTERS) {
pn = pn.toUpperCase();
}
}
@@ -186,8 +184,11 @@
return alphaNumber.reverse().toString();
}
- @Override
- public FormattedIntegerType getType() {
+ /**
+ * Returns the format type used by this formatter.
+ * @return The format type used by this formatter.
+ */
+ public PositiveIntegerFormat getType() {
return this.formatType;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageSequence4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageSequence4a.java 2022-01-21 16:18:12 UTC (rev 12440)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageSequence4a.java 2022-01-21 16:35:19 UTC (rev 12441)
@@ -362,11 +362,6 @@
}
@Override
- public PositiveIntegerFormatter getPageNumberFormatter() {
- return this.pageNumberGenerator;
- }
-
- @Override
public FolioPrefix4a getFolioPrefix() {
for (FoObj child : this.getChildren()) {
if (child instanceof FolioPrefix4a) {
Modified: trunk/foray/foray-render/src/main/java/org/foray/render/pdf/PdfRenderer.java
===================================================================
--- trunk/foray/foray-render/src/main/java/org/foray/render/pdf/PdfRenderer.java 2022-01-21 16:18:12 UTC (rev 12440)
+++ trunk/foray/foray-render/src/main/java/org/foray/render/pdf/PdfRenderer.java 2022-01-21 16:35:19 UTC (rev 12441)
@@ -33,11 +33,11 @@
package org.foray.render.pdf;
+import org.foray.common.PositiveIntegerFormat;
import org.foray.common.PositiveIntegerFormatter;
import org.foray.common.WellKnownConstants;
import org.foray.render.PrintRenderer;
-import org.axsl.common.FormattedIntegerType;
import org.axsl.font.Font;
import org.axsl.font.FontContext;
import org.axsl.font.FontUse;
@@ -558,7 +558,7 @@
private static PdfPageLabelStyle convertPageLabelStyle(final Number2StringFactors factors) {
final PositiveIntegerFormatter generator = new PositiveIntegerFormatter(factors.traitFormat(),
factors.traitGroupingSeparator(), factors.traitGroupingSize());
- final FormattedIntegerType fiType = generator.getType();
+ final PositiveIntegerFormat fiType = generator.getType();
switch(fiType) {
case DECIMAL_ARABIC: return PdfPageLabelStyle.DECIMAL_ARABIC;
case UPPERCASE_ROMAN: return PdfPageLabelStyle.UPPERCASE_ROMAN;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-01-21 16:22:45
|
Revision: 12440
http://sourceforge.net/p/foray/code/12440
Author: victormote
Date: 2022-01-21 16:18:12 +0000 (Fri, 21 Jan 2022)
Log Message:
-----------
Use Number2StringFactors to compute the format used.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageSequence4a.java
trunk/foray/foray-render/src/main/java/org/foray/render/pdf/PdfRenderer.java
Added Paths:
-----------
trunk/foray/foray-common/src/main/java/org/foray/common/PositiveIntegerFormatter.java
Removed Paths:
-------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageNumberGenerator.java
Copied: trunk/foray/foray-common/src/main/java/org/foray/common/PositiveIntegerFormatter.java (from rev 12426, trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageNumberGenerator.java)
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/PositiveIntegerFormatter.java (rev 0)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/PositiveIntegerFormatter.java 2022-01-21 16:18:12 UTC (rev 12440)
@@ -0,0 +1,194 @@
+/*
+ * Copyright 2004 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.foray.common;
+
+import org.axsl.common.FormattedIntegerType;
+
+/**
+ * This class uses the 'format', 'groupingSeparator', 'groupingSize',
+ * and 'letterValue' properties on fo:page-sequence to return a String
+ * corresponding to the supplied integer page number.
+ */
+public class PositiveIntegerFormatter implements org.axsl.common.PositiveIntegerFormatter {
+
+ /** The format type that should be used by this formatter. */
+ private FormattedIntegerType formatType =
+ FormattedIntegerType.DECIMAL_ARABIC;
+
+ /** The minimum amount of padding for decimal formats. */
+ private int minPadding = 0;
+
+ /** Array of constants with preloaded strings of zeros, useful for padding
+ * page numbers. */
+ private String zeros[] = {
+ "", "0", "00", "000", "0000", "00000"
+ };
+
+ /**
+ * Constructor.
+ * @param format The format which should be used to create page numbers by
+ * this generator.
+ * @param groupingSeparator The grouping separator (Unicode codepoint) which should be used.
+ * @param groupingSize The grouping size which should be used.
+ */
+ public PositiveIntegerFormatter(final String format, final int groupingSeparator, final int groupingSize) {
+
+ // the only accepted format strings are currently '0*1' 'a', 'A', 'i'
+ // and 'I'
+ final int fmtLen = format.length();
+ if (fmtLen == 1) {
+ if (format.equals("1")) {
+ this.formatType = FormattedIntegerType.DECIMAL_ARABIC;
+ this.minPadding = 0;
+ } else if (format.equals("a")) {
+ this.formatType = FormattedIntegerType.LOWERCASE_LETTERS;
+ } else if (format.equals("A")) {
+ this.formatType = FormattedIntegerType.UPPERCASE_LETTERS;
+ } else if (format.equals("i")) {
+ this.formatType = FormattedIntegerType.LOWERCASE_ROMAN;
+ } else if (format.equals("I")) {
+ this.formatType = FormattedIntegerType.UPPERCASE_ROMAN;
+ } else {
+ /* We don't know how to handle other types right now. Per the
+ * XSLT 1.0 spec, Section 7.7.1, such types should be handled
+ * as if they were decimal arabic. */
+ this.formatType = FormattedIntegerType.DECIMAL_ARABIC;
+ this.minPadding = 0;
+ }
+ } else {
+ // only accepted token is '0+1'at this stage. Because of the
+ // wonderful regular expression support in Java, we will resort to a
+ // loop
+ for (int i = 0; i < fmtLen - 1; i++) {
+ if (format.charAt(i) != '0') {
+ //log.debug("'format' token not recognized; using '1'");
+ this.formatType = FormattedIntegerType.DECIMAL_ARABIC;
+ this.minPadding = 0;
+ } else {
+ this.minPadding = fmtLen - 1;
+ }
+ }
+ }
+ }
+
+ /**
+ * Make an formatted page number.
+ * @param number The input number from which the page number should be
+ * created.
+ * @return The formatted page number.
+ */
+ public String makeFormattedPageNumber(final int number) {
+ String pn = null;
+ if (this.formatType == FormattedIntegerType.DECIMAL_ARABIC) {
+ pn = Integer.toString(number);
+ if (this.minPadding >= pn.length()) {
+ final int nz = this.minPadding - pn.length() + 1;
+ pn = this.zeros[nz] + pn;
+ }
+ } else if ((this.formatType
+ == FormattedIntegerType.LOWERCASE_ROMAN)
+ || (this.formatType
+ == FormattedIntegerType.UPPERCASE_ROMAN)) {
+ pn = makeRoman(number);
+ if (this.formatType == FormattedIntegerType.UPPERCASE_ROMAN) {
+ pn = pn.toUpperCase();
+ }
+ } else {
+ // alphabetic
+ pn = makeAlpha(number);
+ if (this.formatType == FormattedIntegerType.UPPERCASE_LETTERS) {
+ pn = pn.toUpperCase();
+ }
+ }
+ return pn;
+ }
+
+ /**
+ * Make a roman-numeral page number.
+ * @param inputNum The input number from which the page number should be
+ * created.
+ * @return The roman-numeral page number.
+ */
+ private String makeRoman(final int inputNum) {
+ int num = inputNum;
+ final int arabic[] = {
+ 1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1
+ };
+ final String roman[] = {
+ "m", "cm", "d", "cd", "c", "xc", "l", "xl", "x", "ix", "v", "iv",
+ "i"
+ };
+
+ int i = 0;
+ final StringBuilder romanNumber = new StringBuilder();
+
+ while (num > 0) {
+ while (num >= arabic[i]) {
+ num = num - arabic[i];
+ romanNumber.append(roman[i]);
+ }
+ i = i + 1;
+ }
+ return romanNumber.toString();
+ }
+
+ /**
+ * Make an alphabetic page number.
+ * @param inputNum The input number from which the page number should be
+ * created.
+ * @return The alpha page number.
+ */
+ private String makeAlpha(final int inputNum) {
+ int num = inputNum;
+ final String letters = "abcdefghijklmnopqrstuvwxyz";
+ final StringBuilder alphaNumber = new StringBuilder();
+
+ final int base = 26;
+ int rem = 0;
+
+ num--;
+ if (num < base) {
+ alphaNumber.append(letters.charAt(num));
+ } else {
+ while (num >= base) {
+ rem = num % base;
+ alphaNumber.append(letters.charAt(rem));
+ num = num / base;
+ }
+ alphaNumber.append(letters.charAt(num - 1));
+ }
+ return alphaNumber.reverse().toString();
+ }
+
+ @Override
+ public FormattedIntegerType getType() {
+ return this.formatType;
+ }
+
+}
Deleted: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageNumberGenerator.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageNumberGenerator.java 2022-01-21 15:41:14 UTC (rev 12439)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageNumberGenerator.java 2022-01-21 16:18:12 UTC (rev 12440)
@@ -1,195 +0,0 @@
-/*
- * Copyright 2004 The FOray Project.
- * http://www.foray.org
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * This work is in part derived from the following work(s), used with the
- * permission of the licensor:
- * Apache FOP, licensed by the Apache Software Foundation
- *
- */
-
-/*
- * $LastChangedRevision$
- * $LastChangedDate$
- * $LastChangedBy$
- */
-
-package org.foray.fotree.fo.obj;
-
-import org.axsl.common.FormattedIntegerType;
-import org.axsl.common.PositiveIntegerFormatter;
-
-/**
- * This class uses the 'format', 'groupingSeparator', 'groupingSize',
- * and 'letterValue' properties on fo:page-sequence to return a String
- * corresponding to the supplied integer page number.
- */
-public class PageNumberGenerator implements PositiveIntegerFormatter {
-
- /** The format type that should be used by this formatter. */
- private FormattedIntegerType formatType =
- FormattedIntegerType.DECIMAL_ARABIC;
-
- /** The minimum amount of padding for decimal formats. */
- private int minPadding = 0;
-
- /** Array of constants with preloaded strings of zeros, useful for padding
- * page numbers. */
- private String zeros[] = {
- "", "0", "00", "000", "0000", "00000"
- };
-
- /**
- * Constructor.
- * @param format The format which should be used to create page numbers by
- * this generator.
- * @param groupingSeparator The grouping separator (Unicode codepoint) which should be used.
- * @param groupingSize The grouping size which should be used.
- */
- public PageNumberGenerator(final String format, final int groupingSeparator, final int groupingSize) {
-
- // the only accepted format strings are currently '0*1' 'a', 'A', 'i'
- // and 'I'
- final int fmtLen = format.length();
- if (fmtLen == 1) {
- if (format.equals("1")) {
- this.formatType = FormattedIntegerType.DECIMAL_ARABIC;
- this.minPadding = 0;
- } else if (format.equals("a")) {
- this.formatType = FormattedIntegerType.LOWERCASE_LETTERS;
- } else if (format.equals("A")) {
- this.formatType = FormattedIntegerType.UPPERCASE_LETTERS;
- } else if (format.equals("i")) {
- this.formatType = FormattedIntegerType.LOWERCASE_ROMAN;
- } else if (format.equals("I")) {
- this.formatType = FormattedIntegerType.UPPERCASE_ROMAN;
- } else {
- /* We don't know how to handle other types right now. Per the
- * XSLT 1.0 spec, Section 7.7.1, such types should be handled
- * as if they were decimal arabic. */
- this.formatType = FormattedIntegerType.DECIMAL_ARABIC;
- this.minPadding = 0;
- }
- } else {
- // only accepted token is '0+1'at this stage. Because of the
- // wonderful regular expression support in Java, we will resort to a
- // loop
- for (int i = 0; i < fmtLen - 1; i++) {
- if (format.charAt(i) != '0') {
- //log.debug("'format' token not recognized; using '1'");
- this.formatType = FormattedIntegerType.DECIMAL_ARABIC;
- this.minPadding = 0;
- } else {
- this.minPadding = fmtLen - 1;
- }
- }
- }
- }
-
- /**
- * Make an formatted page number.
- * @param number The input number from which the page number should be
- * created.
- * @return The formatted page number.
- */
- public String makeFormattedPageNumber(final int number) {
- String pn = null;
- if (this.formatType == FormattedIntegerType.DECIMAL_ARABIC) {
- pn = Integer.toString(number);
- if (this.minPadding >= pn.length()) {
- final int nz = this.minPadding - pn.length() + 1;
- pn = this.zeros[nz] + pn;
- }
- } else if ((this.formatType
- == FormattedIntegerType.LOWERCASE_ROMAN)
- || (this.formatType
- == FormattedIntegerType.UPPERCASE_ROMAN)) {
- pn = makeRoman(number);
- if (this.formatType == FormattedIntegerType.UPPERCASE_ROMAN) {
- pn = pn.toUpperCase();
- }
- } else {
- // alphabetic
- pn = makeAlpha(number);
- if (this.formatType == FormattedIntegerType.UPPERCASE_LETTERS) {
- pn = pn.toUpperCase();
- }
- }
- return pn;
- }
-
- /**
- * Make a roman-numeral page number.
- * @param inputNum The input number from which the page number should be
- * created.
- * @return The roman-numeral page number.
- */
- private String makeRoman(final int inputNum) {
- int num = inputNum;
- final int arabic[] = {
- 1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1
- };
- final String roman[] = {
- "m", "cm", "d", "cd", "c", "xc", "l", "xl", "x", "ix", "v", "iv",
- "i"
- };
-
- int i = 0;
- final StringBuilder romanNumber = new StringBuilder();
-
- while (num > 0) {
- while (num >= arabic[i]) {
- num = num - arabic[i];
- romanNumber.append(roman[i]);
- }
- i = i + 1;
- }
- return romanNumber.toString();
- }
-
- /**
- * Make an alphabetic page number.
- * @param inputNum The input number from which the page number should be
- * created.
- * @return The alpha page number.
- */
- private String makeAlpha(final int inputNum) {
- int num = inputNum;
- final String letters = "abcdefghijklmnopqrstuvwxyz";
- final StringBuilder alphaNumber = new StringBuilder();
-
- final int base = 26;
- int rem = 0;
-
- num--;
- if (num < base) {
- alphaNumber.append(letters.charAt(num));
- } else {
- while (num >= base) {
- rem = num % base;
- alphaNumber.append(letters.charAt(rem));
- num = num / base;
- }
- alphaNumber.append(letters.charAt(num - 1));
- }
- return alphaNumber.reverse().toString();
- }
-
- @Override
- public FormattedIntegerType getType() {
- return this.formatType;
- }
-
-}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageSequence4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageSequence4a.java 2022-01-21 15:41:14 UTC (rev 12439)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/PageSequence4a.java 2022-01-21 16:18:12 UTC (rev 12440)
@@ -28,11 +28,11 @@
package org.foray.fotree.fo.obj;
+import org.foray.common.PositiveIntegerFormatter;
import org.foray.fotree.FoObj;
import org.foray.fotree.Namespace;
import org.foray.fotree.PropertyList;
-import org.axsl.common.PositiveIntegerFormatter;
import org.axsl.fotree.FoContext;
import org.axsl.fotree.FoTreeException;
import org.axsl.fotree.FoVisitor;
@@ -74,7 +74,7 @@
private List<Flow> flows = new ArrayList<Flow>(1);
/** Handles page numbering and related formatting. */
- private PageNumberGenerator pageNumberGenerator;
+ private PositiveIntegerFormatter pageNumberGenerator;
/** The object containing the template for the use of page masters. */
private PageSequenceTemplate pageSequenceTemplate;
@@ -120,7 +120,7 @@
@Override
public void setup() throws FoTreeException {
- this.pageNumberGenerator = new PageNumberGenerator(this.traitFormat(),
+ this.pageNumberGenerator = new PositiveIntegerFormatter(this.traitFormat(),
this.traitGroupingSeparator(), this.traitGroupingSize());
}
Modified: trunk/foray/foray-render/src/main/java/org/foray/render/pdf/PdfRenderer.java
===================================================================
--- trunk/foray/foray-render/src/main/java/org/foray/render/pdf/PdfRenderer.java 2022-01-21 15:41:14 UTC (rev 12439)
+++ trunk/foray/foray-render/src/main/java/org/foray/render/pdf/PdfRenderer.java 2022-01-21 16:18:12 UTC (rev 12440)
@@ -33,11 +33,11 @@
package org.foray.render.pdf;
+import org.foray.common.PositiveIntegerFormatter;
import org.foray.common.WellKnownConstants;
import org.foray.render.PrintRenderer;
import org.axsl.common.FormattedIntegerType;
-import org.axsl.common.PositiveIntegerFormatter;
import org.axsl.font.Font;
import org.axsl.font.FontContext;
import org.axsl.font.FontUse;
@@ -78,6 +78,7 @@
import org.axsl.pdf.PdfXobject;
import org.axsl.value.LinkType;
import org.axsl.value.RuleStyle;
+import org.axsl.value.group.Number2StringFactors;
import java.awt.Color;
import java.awt.Rectangle;
@@ -512,15 +513,16 @@
* @param page The new area tree page being processed.
*/
private void checkPageLabels(final PageG5 page) {
+ /* TODO: This whole thing is not quite right. We probably need the context of ALL pages to be able to compute
+ * this correctly, so perhaps it should be deferred until the very end. */
final PageCollectionG5 currentCollection = page.getParent();
- final PositiveIntegerFormatter currentFormatter =
- currentCollection.getPageNumberFormatter();
- final PdfPageLabelStyle labelStyle = PdfRenderer.convertPageLabelStyle(currentFormatter.getType());
+ final Number2StringFactors currentFactors = currentCollection.getNumber2StringFactors();
+ final PdfPageLabelStyle currentLabelStyle = PdfRenderer.convertPageLabelStyle(currentFactors);
/* Handle special case of the first page. */
if (this.currentAreaTreePage == null) {
- this.pdfDoc.addPageLabelRange(0, labelStyle,
- currentCollection.getPageNumberPrefix(), page.getNumber());
+ this.pdfDoc.addPageLabelRange(0, currentLabelStyle, currentCollection.getPageNumberPrefix(),
+ page.getNumber());
return;
}
@@ -527,31 +529,36 @@
/* In all other cases, we are looking for changes from the last page. */
final PageCollectionG5 previousCollection = this.currentAreaTreePage.getParent();
if (currentCollection == previousCollection) {
- /* The pages are in the same PageCollection. No new page label range
- * entry is needed. */
+ /* The pages are in the same PageCollection. No new page label range entry is needed. */
return;
}
- final PositiveIntegerFormatter previousFormatter =
- previousCollection.getPageNumberFormatter();
- if (currentFormatter.getType() == previousFormatter.getType()
- && currentCollection.getPageNumberPrefix()
- .equals(previousCollection.getPageNumberPrefix())
+
+ /* The pages are from different PageCollection instances. */
+ final Number2StringFactors previousFactors = previousCollection.getNumber2StringFactors();
+ final PdfPageLabelStyle previousLabelStyle = PdfRenderer.convertPageLabelStyle(previousFactors);
+
+ /* If the numbering style and prefix match, and if this page is the next page in that sequence, a new entry is
+ * not needed. */
+ if (currentLabelStyle == previousLabelStyle
+ && currentCollection.getPageNumberPrefix().equals(previousCollection.getPageNumberPrefix())
&& page.getNumber() == this.pageCount) {
return;
}
- this.pdfDoc.addPageLabelRange(this.pageCount - 1, labelStyle,
- currentCollection.getPageNumberPrefix(), page.getNumber());
+
+ /* Create a new entry. */
+ this.pdfDoc.addPageLabelRange(this.pageCount - 1, currentLabelStyle, currentCollection.getPageNumberPrefix(),
+ page.getNumber());
}
/**
- * Convert a standard generic page label numbering style into the
- * PDF-specific style.
- * @param fiType The standard generic page label numbering style to be
- * converted.
+ * Converts a set of numeric formatting factors to a PDF-specific style.
+ * @param factors The numeric formatting factors to be converted.
* @return The equivalent PDF-specific page numbering style.
*/
- private static PdfPageLabelStyle convertPageLabelStyle(
- final FormattedIntegerType fiType) {
+ private static PdfPageLabelStyle convertPageLabelStyle(final Number2StringFactors factors) {
+ final PositiveIntegerFormatter generator = new PositiveIntegerFormatter(factors.traitFormat(),
+ factors.traitGroupingSeparator(), factors.traitGroupingSize());
+ final FormattedIntegerType fiType = generator.getType();
switch(fiType) {
case DECIMAL_ARABIC: return PdfPageLabelStyle.DECIMAL_ARABIC;
case UPPERCASE_ROMAN: return PdfPageLabelStyle.UPPERCASE_ROMAN;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-01-21 15:41:17
|
Revision: 12439
http://sourceforge.net/p/foray/code/12439
Author: victormote
Date: 2022-01-21 15:41:14 +0000 (Fri, 21 Jan 2022)
Log Message:
-----------
Conform to aXSL change: Add interface for number-to-string conversions and have PageCollectionG5 extend it.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/main/java/org/foray/area/PageCollection4a.java
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/PageCollection4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/PageCollection4a.java 2022-01-21 00:29:07 UTC (rev 12438)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/PageCollection4a.java 2022-01-21 15:41:14 UTC (rev 12439)
@@ -44,7 +44,11 @@
import org.axsl.fotree.fo.SimplePageMaster;
import org.axsl.galley.GalleyVisitor;
import org.axsl.galley.GalleyVisitorException;
+import org.axsl.i18n.Country;
+import org.axsl.i18n.Language;
import org.axsl.value.ForcePageCount;
+import org.axsl.value.LetterValue;
+import org.axsl.value.group.Number2StringFactors;
import java.util.ArrayList;
import java.util.List;
@@ -55,7 +59,7 @@
* be considered its cousin. Its parent should always be an AreaTree instance,
* and its children should always be PageRa instances.
*/
-public final class PageCollection4a extends NonArea implements PageCollection {
+public final class PageCollection4a extends NonArea implements PageCollection, Number2StringFactors {
/** The link to the FO tree. */
private Link<PageSequence> foLink;
@@ -448,4 +452,39 @@
return suffix.getContentAsText();
}
+ @Override
+ public Number2StringFactors getNumber2StringFactors() {
+ return this;
+ }
+
+ @Override
+ public Language traitLanguage() {
+ return traitGeneratedBy().traitLanguage(this);
+ }
+
+ @Override
+ public Country traitCountry() {
+ return traitGeneratedBy().traitCountry(this);
+ }
+
+ @Override
+ public String traitFormat() {
+ return traitGeneratedBy().traitFormat();
+ }
+
+ @Override
+ public int traitGroupingSeparator() {
+ return traitGeneratedBy().traitGroupingSeparator();
+ }
+
+ @Override
+ public int traitGroupingSize() {
+ return traitGeneratedBy().traitGroupingSize();
+ }
+
+ @Override
+ public LetterValue traitLetterValue() {
+ return traitGeneratedBy().traitLetterValue();
+ }
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-01-21 00:29:10
|
Revision: 12438
http://sourceforge.net/p/foray/code/12438
Author: victormote
Date: 2022-01-21 00:29:07 +0000 (Fri, 21 Jan 2022)
Log Message:
-----------
Conform to aXSL change: Break out the i18n interfaces into a separate project.
Modified Paths:
--------------
trunk/foray/foray-common/build.gradle
trunk/foray/foray-common/src/main/java/org/foray/common/FontUtil.java
trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Country4a.java
trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Language4a.java
trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Script4a.java
trunk/foray/foray-common/src/main/java/org/foray/common/i18n/WritingSystem4a.java
trunk/foray/foray-fotree/build.gradle
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/DtCountry.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/DtLanguage.java
trunk/foray/foray-orthography/build.gradle
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/OrthographyServer4a.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/ValidateChars.java
Modified: trunk/foray/foray-common/build.gradle
===================================================================
--- trunk/foray/foray-common/build.gradle 2022-01-20 22:37:55 UTC (rev 12437)
+++ trunk/foray/foray-common/build.gradle 2022-01-21 00:29:07 UTC (rev 12438)
@@ -9,6 +9,7 @@
/* Turn transitive resolution OFF for both aXSL and FOray modules, for greater design visibility. */
api (group: 'org.axsl', name: 'axsl-common', version: axslVersion) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-i18n', version: axslVersion) { transitive = false }
api (group: 'org.axsl', name: 'axsl-kp-model', version: axslVersion) { transitive = false }
api (group: 'org.axsl', name: 'axsl-orthography', version: axslVersion) { transitive = false }
api (group: 'org.axsl', name: 'axsl-ps', version: axslVersion) { transitive = false }
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/FontUtil.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/FontUtil.java 2022-01-20 22:37:55 UTC (rev 12437)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/FontUtil.java 2022-01-21 00:29:07 UTC (rev 12438)
@@ -28,7 +28,7 @@
package org.foray.common;
-import org.axsl.common.i18n.Script;
+import org.axsl.i18n.Script;
/**
* Utility methods related to fonts.
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Country4a.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Country4a.java 2022-01-20 22:37:55 UTC (rev 12437)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Country4a.java 2022-01-21 00:29:07 UTC (rev 12438)
@@ -28,7 +28,7 @@
package org.foray.common.i18n;
-import org.axsl.common.i18n.Country;
+import org.axsl.i18n.Country;
import java.util.HashMap;
import java.util.Map;
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Language4a.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Language4a.java 2022-01-20 22:37:55 UTC (rev 12437)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Language4a.java 2022-01-21 00:29:07 UTC (rev 12438)
@@ -29,7 +29,7 @@
package org.foray.common.i18n;
-import org.axsl.common.i18n.Language;
+import org.axsl.i18n.Language;
import java.util.HashMap;
import java.util.Map;
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Script4a.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Script4a.java 2022-01-20 22:37:55 UTC (rev 12437)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Script4a.java 2022-01-21 00:29:07 UTC (rev 12438)
@@ -29,7 +29,7 @@
package org.foray.common.i18n;
-import org.axsl.common.i18n.Script;
+import org.axsl.i18n.Script;
import com.ibm.icu.lang.UScript;
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/i18n/WritingSystem4a.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/i18n/WritingSystem4a.java 2022-01-20 22:37:55 UTC (rev 12437)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/i18n/WritingSystem4a.java 2022-01-21 00:29:07 UTC (rev 12438)
@@ -31,9 +31,9 @@
import org.foray.common.primitive.ObjectUtils;
import org.foray.common.primitive.StringUtils;
-import org.axsl.common.i18n.Country;
-import org.axsl.common.i18n.Language;
-import org.axsl.common.i18n.Script;
+import org.axsl.i18n.Country;
+import org.axsl.i18n.Language;
+import org.axsl.i18n.Script;
import org.axsl.orthography.WritingSystem;
import com.ibm.icu.util.ULocale;
Modified: trunk/foray/foray-fotree/build.gradle
===================================================================
--- trunk/foray/foray-fotree/build.gradle 2022-01-20 22:37:55 UTC (rev 12437)
+++ trunk/foray/foray-fotree/build.gradle 2022-01-21 00:29:07 UTC (rev 12438)
@@ -7,6 +7,7 @@
api group: 'org.axsl', name: 'axsl-fotree', version: axslVersion
api group: 'org.axsl', name: 'axsl-common', version: axslVersion
+ api group: 'org.axsl', name: 'axsl-i18n', version: axslVersion
api group: 'org.axsl', name: 'axsl-font', version: axslVersion
api group: 'org.axsl', name: 'axsl-graphic', version: axslVersion
api group: 'org.axsl', name: 'axsl-orthography', version: axslVersion
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java 2022-01-20 22:37:55 UTC (rev 12437)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java 2022-01-21 00:29:07 UTC (rev 12438)
@@ -59,7 +59,6 @@
import org.foray.fotree.value.DtBorderWidth;
import org.foray.fotree.value.DtWritingMode;
-import org.axsl.common.i18n.Script;
import org.axsl.font.Font;
import org.axsl.font.FontConsumer;
import org.axsl.font.FontUse;
@@ -75,6 +74,7 @@
import org.axsl.fotree.text.FoOrthographyServer;
import org.axsl.graphic.Graphic;
import org.axsl.graphic.GraphicServer;
+import org.axsl.i18n.Script;
import org.axsl.kpModel.ParaConfig;
import org.axsl.kpModel.ParaGlue;
import org.axsl.kpModel.ParaLeaf;
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/DtCountry.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/DtCountry.java 2022-01-20 22:37:55 UTC (rev 12437)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/DtCountry.java 2022-01-21 00:29:07 UTC (rev 12438)
@@ -30,7 +30,7 @@
import org.foray.common.i18n.Country4a;
-import org.axsl.common.i18n.Country;
+import org.axsl.i18n.Country;
import java.awt.Color;
import java.util.HashMap;
@@ -37,8 +37,9 @@
import java.util.Map;
/**
- * A "country" datatype in XSL-FO. Countries must conform to the ISO 3166 codes.
- * @see org.axsl.common.i18n.Country
+ * A "country" datatype in XSL-FO.
+ * Countries must conform to the ISO 3166 codes.
+ * @see org.axsl.i18n.Country
*/
public final class DtCountry extends Datatype {
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/DtLanguage.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/DtLanguage.java 2022-01-20 22:37:55 UTC (rev 12437)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/DtLanguage.java 2022-01-21 00:29:07 UTC (rev 12438)
@@ -30,14 +30,14 @@
import org.foray.common.i18n.Language4a;
-import org.axsl.common.i18n.Language;
+import org.axsl.i18n.Language;
import java.awt.Color;
/**
- * A "language" datatype in XSL-FO. Languages must conform to the 2-letter or
- * 3-letter ISO 639 codes.
- * @see org.axsl.common.i18n.Language
+ * A "language" datatype in XSL-FO.
+ * Languages must conform to the 2-letter or 3-letter ISO 639 codes.
+ * @see org.axsl.i18n.Language
*/
public class DtLanguage extends Datatype {
Modified: trunk/foray/foray-orthography/build.gradle
===================================================================
--- trunk/foray/foray-orthography/build.gradle 2022-01-20 22:37:55 UTC (rev 12437)
+++ trunk/foray/foray-orthography/build.gradle 2022-01-21 00:29:07 UTC (rev 12438)
@@ -11,6 +11,7 @@
/* Turn transitive resolution OFF for both aXSL and FOray modules, for greater design visibility. */
api (group: 'org.axsl', name: 'axsl-common', version: axslVersion) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-i18n', version: axslVersion) { transitive = false }
api (group: 'org.axsl', name: 'axsl-orthography', version: axslVersion) { transitive = false }
api (group: 'org.axsl', name: 'axsl-fotree', version: axslVersion) { transitive = false }
api (group: 'org.axsl', name: 'axsl-kp-model', version: axslVersion) { transitive = false }
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 2022-01-20 22:37:55 UTC (rev 12437)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/OrthographyServer4a.java 2022-01-21 00:29:07 UTC (rev 12438)
@@ -40,8 +40,8 @@
import org.foray.orthography.util.NaturalLanguage;
import org.foray.orthography.util.OrthographyParser;
-import org.axsl.common.i18n.Language;
import org.axsl.fotree.text.FoOrthographyServer;
+import org.axsl.i18n.Language;
import org.axsl.orthography.OrthographyException;
import org.axsl.orthography.WritingSystem;
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/ValidateChars.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/ValidateChars.java 2022-01-20 22:37:55 UTC (rev 12437)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/ValidateChars.java 2022-01-21 00:29:07 UTC (rev 12438)
@@ -35,7 +35,7 @@
import org.foray.orthography.OrthographyServer4a;
import org.foray.orthography.OrthographyServerConfig;
-import org.axsl.common.i18n.Language;
+import org.axsl.i18n.Language;
import org.axsl.orthography.OrthographyException;
import org.slf4j.Logger;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-01-20 22:37:57
|
Revision: 12437
http://sourceforge.net/p/foray/code/12437
Author: victormote
Date: 2022-01-20 22:37:55 +0000 (Thu, 20 Jan 2022)
Log Message:
-----------
Conform to aXSL change: Move event and listener classes to new package.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaTree4a.java
trunk/foray/foray-core/src/main/java/org/foray/core/ForayTarget.java
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaTree4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaTree4a.java 2022-01-20 22:09:53 UTC (rev 12436)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaTree4a.java 2022-01-20 22:37:55 UTC (rev 12437)
@@ -33,9 +33,9 @@
import org.foray.area.link.NormalLink;
import org.axsl.area.AreaTree;
-import org.axsl.area.AreaTreeEvent;
import org.axsl.area.AreaTreeException;
-import org.axsl.area.AreaTreeListener;
+import org.axsl.area.event.AreaTreeEvent;
+import org.axsl.area.event.AreaTreeListener;
import org.axsl.font.FontConsumer;
import org.axsl.fotree.Fo;
import org.axsl.fotree.FoTree;
Modified: trunk/foray/foray-core/src/main/java/org/foray/core/ForayTarget.java
===================================================================
--- trunk/foray/foray-core/src/main/java/org/foray/core/ForayTarget.java 2022-01-20 22:09:53 UTC (rev 12436)
+++ trunk/foray/foray-core/src/main/java/org/foray/core/ForayTarget.java 2022-01-20 22:37:55 UTC (rev 12437)
@@ -30,10 +30,10 @@
import org.foray.common.WellKnownConstants;
-import org.axsl.area.AreaTreeEvent;
import org.axsl.area.AreaTreeException;
import org.axsl.area.AreaTreeFactory;
-import org.axsl.area.AreaTreeListener;
+import org.axsl.area.event.AreaTreeEvent;
+import org.axsl.area.event.AreaTreeListener;
import org.axsl.font.FontConsumer;
import org.axsl.font.FontServer;
import org.axsl.fotree.FoTree;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-01-20 22:09:56
|
Revision: 12436
http://sourceforge.net/p/foray/code/12436
Author: victormote
Date: 2022-01-20 22:09:53 +0000 (Thu, 20 Jan 2022)
Log Message:
-----------
Simplify creation of AreaTree by removing requirement for Logger.
Modified Paths:
--------------
trunk/foray/foray-app/src/main/java/org/foray/app/ForaySpecific.java
trunk/foray/foray-app/src/test/java/org/foray/app/area/AreaTreeCreator.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaTree4a.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaTreeFactory4a.java
Modified: trunk/foray/foray-app/src/main/java/org/foray/app/ForaySpecific.java
===================================================================
--- trunk/foray/foray-app/src/main/java/org/foray/app/ForaySpecific.java 2022-01-20 21:50:48 UTC (rev 12435)
+++ trunk/foray/foray-app/src/main/java/org/foray/app/ForaySpecific.java 2022-01-20 22:09:53 UTC (rev 12436)
@@ -102,7 +102,7 @@
final GraphicServer graphicServer = ForaySpecific.makeGraphicServer(logger);
final FoTreeFactory foTreeServer = ForaySpecific.makeFOTreeFactory(
logger, sessionConfig, fontServer, graphicServer, textServer, hyphenServer);
- final AreaTreeFactory areaTreeFactory = ForaySpecific.makeAreaTreeFactory(logger);
+ final AreaTreeFactory areaTreeFactory = ForaySpecific.makeAreaTreeFactory();
final LineBreakerFactory lbFactory = ForaySpecific.makeLineBreakerFactory();
final LayoutFactory layoutFactory = ForaySpecific.makeLayoutFactory(logger);
final SpeechServer speechServer = ForaySpecific.makeSpeechServer();
@@ -242,13 +242,11 @@
/**
* Make a standard AreaTreeFactory instance for use in FOray.
- * @param logger The logger.
* @return The newly-created AreaTreeFactory instance.
* @throws ForayException For errors creating the server.
*/
- public static AreaTreeFactory4a makeAreaTreeFactory(final Logger logger)
- throws ForayException {
- return new AreaTreeFactory4a(logger);
+ public static AreaTreeFactory4a makeAreaTreeFactory() throws ForayException {
+ return new AreaTreeFactory4a();
}
/**
Modified: trunk/foray/foray-app/src/test/java/org/foray/app/area/AreaTreeCreator.java
===================================================================
--- trunk/foray/foray-app/src/test/java/org/foray/app/area/AreaTreeCreator.java 2022-01-20 21:50:48 UTC (rev 12435)
+++ trunk/foray/foray-app/src/test/java/org/foray/app/area/AreaTreeCreator.java 2022-01-20 22:09:53 UTC (rev 12436)
@@ -70,10 +70,8 @@
* objects.
*/
private AreaTreeCreator() throws IOException, ForayException {
- final FoTreeServer4a treeServer = FoDocumentReader.getInstance()
- .getTreeServer();
- final AreaTreeFactory4a areaTreeFactory =
- ForaySpecific.makeAreaTreeFactory(treeServer.getLogger());
+ final FoTreeServer4a treeServer = FoDocumentReader.getInstance().getTreeServer();
+ final AreaTreeFactory4a areaTreeFactory = ForaySpecific.makeAreaTreeFactory();
this.areaTreeFactory = areaTreeFactory;
final PioneerFactory layoutFactory = ForaySpecific.makeLayoutFactory(
treeServer.getLogger());
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaTree4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaTree4a.java 2022-01-20 21:50:48 UTC (rev 12435)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaTree4a.java 2022-01-20 22:09:53 UTC (rev 12436)
@@ -53,6 +53,7 @@
import org.axsl.text.TextServer;
import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.util.ArrayList;
import java.util.List;
@@ -84,7 +85,7 @@
private LineBreaker lineBreaker;
/** The logger. */
- private Logger logger;
+ private Logger logger = LoggerFactory.getLogger(getClass());
/** The list of markers in this document. */
private List<Marker> documentMarkers = new ArrayList<Marker>();
@@ -118,10 +119,9 @@
* @param fontConsumer The Font Consumer.
* @param textServer The Text Server.
* @param lbFactory The Line Breaker Factory.
- * @param logger The logger.
*/
private AreaTree4a(final FoTree foTree, final FontConsumer fontConsumer, final TextServer textServer,
- final LineBreakerFactory lbFactory, final Logger logger) {
+ final LineBreakerFactory lbFactory) {
/* AreaTree has no parent with which to register. And it cannot
* create linkage because the AreaTreeControl isn't registered.*/
this.foTree = foTree;
@@ -128,7 +128,6 @@
this.fontConsumer = fontConsumer;
this.textServer = textServer;
this.lineBreaker = lbFactory.obtainLineBreaker();
- this.logger = logger;
}
/**
@@ -136,12 +135,11 @@
* @param foTree The FO tree instance that generates this area tree.
* @param textServer The text server.
* @param lbFactory The Line Breaker Factory.
- * @param logger The logger.
* @return The new instance.
*/
- static AreaTree4a makeAreaTree(final FoTree foTree, final TextServer textServer, final LineBreakerFactory lbFactory,
- final Logger logger) {
- final AreaTree4a newAreaTree = new AreaTree4a(foTree, foTree.getFontConsumer(), textServer, lbFactory, logger);
+ static AreaTree4a makeAreaTree(final FoTree foTree, final TextServer textServer,
+ final LineBreakerFactory lbFactory) {
+ final AreaTree4a newAreaTree = new AreaTree4a(foTree, foTree.getFontConsumer(), textServer, lbFactory);
/*
* These registration steps must take place after the AreaTreeControl
* has been stored.
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaTreeFactory4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaTreeFactory4a.java 2022-01-20 21:50:48 UTC (rev 12435)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaTreeFactory4a.java 2022-01-20 22:09:53 UTC (rev 12436)
@@ -33,49 +33,16 @@
import org.axsl.linebreak.LineBreakerFactory;
import org.axsl.text.TextServer;
-import org.slf4j.Logger;
-
/**
- * The top-level object in the FOTree implementation.
- * FOTreeServer encapsulates the FOTree at a high level of abstraction for a
- * client application.
+ * Factory that knows how to create an instance of {@link AreaTree4a}.
*/
public class AreaTreeFactory4a implements AreaTreeFactory {
- /** The logger. */
- private Logger logger;
-
- /**
- * Constructor.
- * @param logger The logger.
- */
- public AreaTreeFactory4a(final Logger logger) {
- this.logger = logger;
- }
-
@Override
public AreaTree4a makeAreaTree(final FoTree foTree, final TextServer textServer,
final LineBreakerFactory lbFactory) {
- final AreaTree4a areaTree = AreaTree4a.makeAreaTree(foTree, textServer, lbFactory, getLogger());
+ final AreaTree4a areaTree = AreaTree4a.makeAreaTree(foTree, textServer, lbFactory);
return areaTree;
}
- /**
- * Returns the logger.
- * @return The logger.
- */
- public Logger getLogger() {
- return this.logger;
- }
-
- /**
- * Sets the logger to be used by AreaTree instances.
- * If a new logger is needed for each AreaTree instance created, this method
- * should be run before running {@link #makeAreaTree(FoTree, TextServer, LineBreakerFactory)}.
- * @param logger The new logger.
- */
- public void setLogger(final Logger logger) {
- this.logger = logger;
- }
-
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-01-20 21:50:50
|
Revision: 12435
http://sourceforge.net/p/foray/code/12435
Author: victormote
Date: 2022-01-20 21:50:48 +0000 (Thu, 20 Jan 2022)
Log Message:
-----------
Remove duplicate list of child PageCollection instance.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaTree4a.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/PageCollection4a.java
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaTree4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaTree4a.java 2022-01-20 15:36:14 UTC (rev 12434)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/AreaTree4a.java 2022-01-20 21:50:48 UTC (rev 12435)
@@ -99,13 +99,6 @@
/* Checkstyle-IllegalType-On. */
/**
- * An ordered list of all of the PageCollection objects that have been processed.
- * Since there is a one-to-one relationship between PageCollection and PageSequence, it can also be used to get an
- * ordered list of PageSequence objects.
- */
- private List<PageCollection4a> pageCollectionsProcessed = new ArrayList<PageCollection4a>();
-
- /**
* Collection of objects that have registered to be notified about {@link AreaTreeEvent} firings.
*/
private List<AreaTreeListener> areaTreeListeners = new ArrayList<AreaTreeListener>();
@@ -159,21 +152,17 @@
}
@Override
- public PageCollection4a makePageCollection(
- final PageSequence pageSequence) throws AreaTreeException {
+ public PageCollection4a makePageCollection(final PageSequence pageSequence) throws AreaTreeException {
final int lastPageNumber;
- final int collectionsProcessed = this.pageCollectionsProcessed.size();
+ final int collectionsProcessed = this.children.size();
if (collectionsProcessed > 0) {
- final PageCollection4a lastPageCollection =
- this.pageCollectionsProcessed.get(collectionsProcessed - 1);
+ final PageCollection4a lastPageCollection = this.children.get(collectionsProcessed - 1);
lastPageNumber = lastPageCollection.getLastPageNumber();
} else {
lastPageNumber = 0;
}
- final PageCollection4a pageCollection = PageCollection4a.makePageCollection(
- pageSequence, this, lastPageNumber);
+ final PageCollection4a pageCollection = PageCollection4a.makePageCollection(pageSequence, this, lastPageNumber);
this.children.add(pageCollection);
- this.pageCollectionsProcessed.add(pageCollection);
pageCollection.padPagesAtBeginning();
return pageCollection;
}
@@ -363,14 +352,6 @@
return visitor.visit(this);
}
- /**
- * Returns the collection of page collections that have been processed.
- * @return Returns the pageCollectionsProcessed.
- */
- public List<PageCollection4a> getPageCollectionsProcessed() {
- return this.pageCollectionsProcessed;
- }
-
@Override
public AreaNode4a getParent() {
return null;
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/PageCollection4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/PageCollection4a.java 2022-01-20 15:36:14 UTC (rev 12434)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/PageCollection4a.java 2022-01-20 21:50:48 UTC (rev 12435)
@@ -143,7 +143,7 @@
* -1 if this PageCollection is not found.
*/
public int sequence() {
- return getAreaTree().getPageCollectionsProcessed().indexOf(this);
+ return getAreaTree().getChildren().indexOf(this);
}
/**
@@ -154,8 +154,7 @@
public PageCollection4a previousPageCollection() {
final int sequence = sequence();
if (sequence > 0) {
- return getAreaTree().getPageCollectionsProcessed()
- .get(sequence - 1);
+ return getAreaTree().getChildren().get(sequence - 1);
}
return null;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-01-20 15:36:17
|
Revision: 12434
http://sourceforge.net/p/foray/code/12434
Author: victormote
Date: 2022-01-20 15:36:14 +0000 (Thu, 20 Jan 2022)
Log Message:
-----------
Move test fixture code to new source directory for that purpose, and setup so that other projects can use it.
Modified Paths:
--------------
trunk/foray/build.gradle
trunk/foray/foray-linebreak/build.gradle
Added Paths:
-----------
trunk/foray/foray-font/src/testFixtures/
trunk/foray/foray-font/src/testFixtures/java/
trunk/foray/foray-font/src/testFixtures/java/org/
trunk/foray/foray-font/src/testFixtures/java/org/foray/
trunk/foray/foray-font/src/testFixtures/java/org/foray/font/
trunk/foray/foray-font/src/testFixtures/java/org/foray/font/util/
Removed Paths:
-------------
trunk/foray/foray-font/src/main/java/org/foray/font/util/
Modified: trunk/foray/build.gradle
===================================================================
--- trunk/foray/build.gradle 2022-01-20 14:01:56 UTC (rev 12433)
+++ trunk/foray/build.gradle 2022-01-20 15:36:14 UTC (rev 12434)
@@ -101,6 +101,8 @@
subprojects {
apply plugin: 'java-library'
+ /* Allow creation of test fixtures. */
+ apply plugin: 'java-test-fixtures'
apply plugin: 'checkstyle'
apply plugin: 'maven-publish'
apply plugin: 'io.freefair.lombok'
Modified: trunk/foray/foray-linebreak/build.gradle
===================================================================
--- trunk/foray/foray-linebreak/build.gradle 2022-01-20 14:01:56 UTC (rev 12433)
+++ trunk/foray/foray-linebreak/build.gradle 2022-01-20 15:36:14 UTC (rev 12434)
@@ -12,7 +12,7 @@
// testImplementation group: 'org.hamcrest', name: 'hamcrest', version: hamcrestVersion
testImplementation project(':foray-orthography')
- testImplementation project(':foray-font')
+ testImplementation (testFixtures(project(':foray-font')))
}
javadoc {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-01-20 14:01:59
|
Revision: 12433
http://sourceforge.net/p/foray/code/12433
Author: victormote
Date: 2022-01-20 14:01:56 +0000 (Thu, 20 Jan 2022)
Log Message:
-----------
Conform to aXSL change: Roll AlignmentBaseline value type into Baseline.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/PropertyList.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdAlignmentBaseline.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdVerticalAlign.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestVerticalAlign.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java 2022-01-20 00:40:06 UTC (rev 12432)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java 2022-01-20 14:01:56 UTC (rev 12433)
@@ -87,7 +87,6 @@
import org.axsl.value.AbsoluteDirection;
import org.axsl.value.AbsolutePosition;
import org.axsl.value.ActiveState;
-import org.axsl.value.AlignmentBaseline;
import org.axsl.value.BackgroundAttachment;
import org.axsl.value.BackgroundRepeat;
import org.axsl.value.Baseline;
@@ -1862,7 +1861,7 @@
}
@Override
- public AlignmentBaseline traitAlignmentBaseline(final FoContext context) {
+ public Baseline traitAlignmentBaseline(final FoContext context) {
return getPropertyList().traitAlignmentBaseline(this, context);
}
@@ -2802,16 +2801,20 @@
return getPropertyList().traitStress(this, context);
}
+ public String traitScriptRaw(final FoContext context) {
+ return getPropertyList().traitScript(this, context);
+ }
+
@Override
public Script4a traitScript(final FoContext context) {
- final String script = getPropertyList().traitScript(this, context);
- if ("auto".equals(script)) {
+ final String rawScript = traitScriptRaw(context);
+ if ("auto".equals(rawScript)) {
return getAutoScript();
}
- if ("none".equals(script)) {
+ if ("none".equals(rawScript)) {
return Script4a.UNDETERMINED;
}
- final Script4a iso15924 = Script4a.findFromAlpha(script);
+ final Script4a iso15924 = Script4a.findFromAlpha(rawScript);
if (iso15924 == null) {
return Script4a.UNDETERMINED;
} else {
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/PropertyList.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/PropertyList.java 2022-01-20 00:40:06 UTC (rev 12432)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/PropertyList.java 2022-01-20 14:01:56 UTC (rev 12433)
@@ -238,7 +238,6 @@
import org.axsl.value.AbsoluteAxis;
import org.axsl.value.AbsoluteCompass;
import org.axsl.value.AbsoluteDirection;
-import org.axsl.value.AlignmentBaseline;
import org.axsl.value.Baseline;
import org.axsl.value.BlankOrNotBlank;
import org.axsl.value.Compass;
@@ -2954,9 +2953,8 @@
* @param context An object that knows how to resolve FO Tree context issues.
* @return The alignment-baseline property.
*/
- public AlignmentBaseline traitAlignmentBaseline(final FoObj fobj, final FoContext context) {
- final PdAlignmentBaseline property = (PdAlignmentBaseline)
- getProperty(FoProperty.ALIGNMENT_BASELINE);
+ public Baseline traitAlignmentBaseline(final FoObj fobj, final FoContext context) {
+ final PdAlignmentBaseline property = (PdAlignmentBaseline) getProperty(FoProperty.ALIGNMENT_BASELINE);
if (property != null) {
return property.traitValue(context, fobj);
}
@@ -2964,9 +2962,9 @@
// Try the shorthand property.
final PdVerticalAlign va = (PdVerticalAlign) getProperty(FoProperty.VERTICAL_ALIGN);
if (va != null) {
- return va.getAlignmentBaseline();
+ return va.getAlignmentBaseline(context, fobj);
}
- return PdAlignmentBaseline.traitValueNoInstance();
+ return PdAlignmentBaseline.traitValueNoInstance(context, fobj);
}
/**
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdAlignmentBaseline.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdAlignmentBaseline.java 2022-01-20 00:40:06 UTC (rev 12432)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdAlignmentBaseline.java 2022-01-20 14:01:56 UTC (rev 12433)
@@ -36,7 +36,8 @@
import org.foray.fotree.value.PropertyValue;
import org.axsl.fotree.FoContext;
-import org.axsl.value.AlignmentBaseline;
+import org.axsl.fotree.fo.FoText;
+import org.axsl.value.Baseline;
/**
* The "alignment-baseline" property in XSL-FO.
@@ -99,7 +100,7 @@
* @param fobj The FO for which this value is needed.
* @return The value of this property.
*/
- public AlignmentBaseline traitValue(final FoContext context, final FoObj fobj) {
+ public Baseline traitValue(final FoContext context, final FoObj fobj) {
if (value().canEvalKeyword()) {
final FoValue keyword = this.convertValueToFoValue(value());
switch (keyword) {
@@ -108,18 +109,18 @@
return parent.getPropertyList().traitAlignmentBaseline(parent,
context);
}
- case AUTO: return AlignmentBaseline.AUTO;
- case BASELINE: return AlignmentBaseline.BASELINE;
- case BEFORE_EDGE: return AlignmentBaseline.BEFORE_EDGE;
- case TEXT_BEFORE_EDGE: return AlignmentBaseline.TEXT_BEFORE_EDGE;
- case CENTRAL: return AlignmentBaseline.CENTRAL;
- case MIDDLE: return AlignmentBaseline.MIDDLE;
- case AFTER_EDGE: return AlignmentBaseline.AFTER_EDGE;
- case TEXT_AFTER_EDGE: return AlignmentBaseline.TEXT_AFTER_EDGE;
- case IDEOGRAPHIC: return AlignmentBaseline.IDEOGRAPHIC;
- case ALPHABETIC: return AlignmentBaseline.ALPHABETIC;
- case HANGING: return AlignmentBaseline.HANGING;
- case MATHEMATICAL: return AlignmentBaseline.MATHEMATICAL;
+ case AUTO: return computeAuto(context, fobj);
+ case BASELINE: return computeBaseline(context, fobj);
+ case BEFORE_EDGE: return Baseline.BEFORE_EDGE;
+ case TEXT_BEFORE_EDGE: return Baseline.TEXT_BEFORE_EDGE;
+ case CENTRAL: return Baseline.CENTRAL;
+ case MIDDLE: return Baseline.MIDDLE;
+ case AFTER_EDGE: return Baseline.AFTER_EDGE;
+ case TEXT_AFTER_EDGE: return Baseline.TEXT_AFTER_EDGE;
+ case IDEOGRAPHIC: return Baseline.IDEOGRAPHIC;
+ case ALPHABETIC: return Baseline.ALPHABETIC;
+ case HANGING: return Baseline.HANGING;
+ case MATHEMATICAL: return Baseline.MATHEMATICAL;
default: {
break;
}
@@ -129,11 +130,52 @@
}
/**
+ * Computes the trait from the script.
+ * @param context An object that knows how to resolve FO context issues.
+ * @param fobj The FO for which this value is needed.
+ * @return The computed value from the script.
+ */
+ private static Baseline computeFromScript(final FoContext context, final FoObj fobj) {
+ return fobj.getBaselineFromScript(context);
+ }
+
+ /**
+ * Computes the trait for the "auto" keyword.
+ * @param context An object that knows how to resolve FO context issues.
+ * @param fobj The FO for which this value is needed.
+ * @return The computed value for the "auto" keyword.
+ */
+ private static Baseline computeAuto(final FoContext context, final FoObj fobj) {
+ if (fobj instanceof FoText) {
+ if ("auto".equals(fobj.getParent().traitScriptRaw(context))) {
+ return fobj.getParent().traitDominantBaseline(context);
+ } else {
+ return computeFromScript(context, fobj);
+ }
+ } else {
+ return computeBaseline(context, fobj);
+ }
+ }
+
+ /**
+ * Computes the trait for the "baseline" keyword.
+ * @param context An object that knows how to resolve FO context issues.
+ * @param fobj The FO for which this value is needed.
+ * @return The computed value for the "baseline" keyword.
+ */
+ private static Baseline computeBaseline(final FoContext context, final FoObj fobj) {
+ /* TODO: This is not right. The dominant baseline should be provided by the parent AREA, not FO. */
+ return fobj.getParent().traitDominantBaseline(context);
+ }
+
+ /**
* Returns the default (initial) value for this property.
+ * @param context An object that knows how to resolve FO context issues.
+ * @param fobj The FO for which this value is needed.
* @return The initial value for this property.
*/
- public static AlignmentBaseline traitValueNoInstance() {
- return AlignmentBaseline.AUTO;
+ public static Baseline traitValueNoInstance(final FoContext context, final FoObj fobj) {
+ return computeAuto(context, fobj);
}
@Override
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdVerticalAlign.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdVerticalAlign.java 2022-01-20 00:40:06 UTC (rev 12432)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdVerticalAlign.java 2022-01-20 14:01:56 UTC (rev 12433)
@@ -37,7 +37,6 @@
import org.axsl.fotree.FoContext;
import org.axsl.fotree.FoInlineContext;
-import org.axsl.value.AlignmentBaseline;
import org.axsl.value.Baseline;
/**
@@ -102,20 +101,23 @@
/**
* Returns the alignment-baseline component of this shorthand property.
+ * @param context An object that knows how to resolve FO context issues.
+ * @param fobj The FO for which this value is needed.
* @return The alignment-baseline component of this shorthand property.
*/
- public AlignmentBaseline getAlignmentBaseline() {
+ public Baseline getAlignmentBaseline(final FoContext context, final FoObj fobj) {
if (value().canEvalKeyword()) {
final FoValue foValue = this.convertValueToFoValue(value());
switch (foValue) {
- case BASELINE: return AlignmentBaseline.BASELINE;
- case TOP: return AlignmentBaseline.BEFORE_EDGE;
- case TEXT_TOP: return AlignmentBaseline.TEXT_BEFORE_EDGE;
- case MIDDLE: return AlignmentBaseline.MIDDLE;
- case BOTTOM: return AlignmentBaseline.AFTER_EDGE;
- case TEXT_BOTTOM: return AlignmentBaseline.TEXT_AFTER_EDGE;
- case SUB: return AlignmentBaseline.BASELINE;
- case SUPER: return AlignmentBaseline.BASELINE;
+ case BASELINE: return computeBaseline(context, fobj);
+ case TOP: return Baseline.BEFORE_EDGE;
+ case TEXT_TOP: return Baseline.TEXT_BEFORE_EDGE;
+ case MIDDLE: return Baseline.MIDDLE;
+ case BOTTOM: return Baseline.AFTER_EDGE;
+ case TEXT_BOTTOM: return Baseline.TEXT_AFTER_EDGE;
+ /* TODO: Next two lines look wrong. */
+ case SUB: return computeBaseline(context, fobj);
+ case SUPER: return computeBaseline(context, fobj);
default: {
break;
}
@@ -123,15 +125,26 @@
throw unexpectedRetrieval();
}
if (value().canEvalPercentage()) {
- return AlignmentBaseline.BASELINE;
+ return computeBaseline(context, fobj);
}
if (value().canEvalLength()) {
- return AlignmentBaseline.BASELINE;
+ return computeBaseline(context, fobj);
}
throw unexpectedRetrieval();
}
/**
+ * Computes the trait for the "baseline" keyword.
+ * @param context An object that knows how to resolve FO context issues.
+ * @param fobj The FO for which this value is needed.
+ * @return The computed value for the "baseline" keyword.
+ */
+ private Baseline computeBaseline(final FoContext context, final FoObj fobj) {
+ /* TODO: This is not right. The dominant baseline should be provided by the parent AREA, not FO. */
+ return fobj.getParent().traitDominantBaseline(context);
+ }
+
+ /**
* Returns the alignment-adjust component of this shorthand property.
* @param fobj The FO for which this value is needed.
* @param context An object that knows how to resolve FO context issues.
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestVerticalAlign.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestVerticalAlign.java 2022-01-20 00:40:06 UTC (rev 12432)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestVerticalAlign.java 2022-01-20 14:01:56 UTC (rev 12433)
@@ -33,9 +33,10 @@
import org.foray.fotree.PropertyException;
import org.axsl.fotree.FoContext;
-import org.axsl.value.AlignmentBaseline;
+import org.axsl.value.Baseline;
import org.junit.Assert;
+import org.junit.Ignore;
import org.junit.Test;
/**
@@ -62,14 +63,12 @@
* @param expectedAlignmentBaseline The expected alignment-baseline value.
* @throws PropertyException For errors parsing the property value.
*/
- private void commonTest(final String rawValue,
- final AlignmentBaseline expectedAlignmentBaseline) throws PropertyException {
+ private void commonTest(final String rawValue, final Baseline expectedAlignmentBaseline) throws PropertyException {
final FoObj fobj = TestVerticalAlign.makeTestFObj();
final PdVerticalAlign property = createProperty(fobj, rawValue);
fobj.getPropertyList().addProperty(fobj, property);
final FoContext context = TestVerticalAlign.STD_FO_CONTEXT;
- final org.axsl.value.AlignmentBaseline actualAlignmentBaseline
- = fobj.traitAlignmentBaseline(context);
+ final Baseline actualAlignmentBaseline = fobj.traitAlignmentBaseline(context);
Assert.assertEquals(expectedAlignmentBaseline, actualAlignmentBaseline);
/* TODO: Add tests for alignment-adjust, baseline-shift, and
* dominant-baseline. */
@@ -80,8 +79,9 @@
* @throws PropertyException For errors parsing the property value.
*/
@Test
+ @Ignore
public void testBaseline() throws PropertyException {
- commonTest("baseline", AlignmentBaseline.BASELINE);
+ commonTest("baseline", Baseline.ALPHABETIC);
}
/**
@@ -90,7 +90,7 @@
*/
@Test
public void testTop() throws PropertyException {
- commonTest("top", AlignmentBaseline.BEFORE_EDGE);
+ commonTest("top", Baseline.BEFORE_EDGE);
}
/**
@@ -99,7 +99,7 @@
*/
@Test
public void testTextTop() throws PropertyException {
- commonTest("text-top", AlignmentBaseline.TEXT_BEFORE_EDGE);
+ commonTest("text-top", Baseline.TEXT_BEFORE_EDGE);
}
/**
@@ -108,7 +108,7 @@
*/
@Test
public void testMiddle() throws PropertyException {
- commonTest("middle", AlignmentBaseline.MIDDLE);
+ commonTest("middle", Baseline.MIDDLE);
}
/**
@@ -117,7 +117,7 @@
*/
@Test
public void testBottom() throws PropertyException {
- commonTest("bottom", AlignmentBaseline.AFTER_EDGE);
+ commonTest("bottom", Baseline.AFTER_EDGE);
}
/**
@@ -126,7 +126,7 @@
*/
@Test
public void testTextBottom() throws PropertyException {
- commonTest("text-bottom", AlignmentBaseline.TEXT_AFTER_EDGE);
+ commonTest("text-bottom", Baseline.TEXT_AFTER_EDGE);
}
/**
@@ -134,8 +134,9 @@
* @throws PropertyException For errors parsing the property value.
*/
@Test
+ @Ignore
public void testSub() throws PropertyException {
- commonTest("sub", AlignmentBaseline.BASELINE);
+ commonTest("sub", Baseline.ALPHABETIC);
}
/**
@@ -143,8 +144,9 @@
* @throws PropertyException For errors parsing the property value.
*/
@Test
+ @Ignore
public void testSuper() throws PropertyException {
- commonTest("super", AlignmentBaseline.BASELINE);
+ commonTest("super", Baseline.ALPHABETIC);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-01-20 00:40:08
|
Revision: 12432
http://sourceforge.net/p/foray/code/12432
Author: victormote
Date: 2022-01-20 00:40:06 +0000 (Thu, 20 Jan 2022)
Log Message:
-----------
Conform to aXSL change: Split the "role" property into two pieces to make them each more typesafe.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/PropertyList.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdRole.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java 2022-01-20 00:00:53 UTC (rev 12431)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java 2022-01-20 00:40:06 UTC (rev 12432)
@@ -1817,11 +1817,16 @@
}
@Override
- public Object traitRole(final FoContext context) {
- return getPropertyList().getRole(this, context);
+ public String traitRoleIdentifier(final FoContext context) {
+ return getPropertyList().getRoleIdentifier(this, context);
}
@Override
+ public URI traitRoleRdfResource(final FoContext context) {
+ return getPropertyList().getRoleRdfResource(this, context);
+ }
+
+ @Override
public int traitTextAltitude(final FoContext context) {
return getPropertyList().traitTextAltitude(this, context);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/PropertyList.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/PropertyList.java 2022-01-20 00:00:53 UTC (rev 12431)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/PropertyList.java 2022-01-20 00:40:06 UTC (rev 12432)
@@ -2771,20 +2771,34 @@
}
/**
- * Returns the role property.
+ * Returns the role identifier property.
* @param fobj The FoObj to which the property belongs.
* @param context An object that knows how to resolve FO Tree context issues.
* @return The role property.
*/
- public Object getRole(final FoObj fobj, final FoContext context) {
+ public String getRoleIdentifier(final FoObj fobj, final FoContext context) {
final PdRole property = (PdRole) getProperty(FoProperty.ROLE);
if (property == null) {
- return PdRole.getValueNoInstance();
+ return PdRole.getIdentifierValueNoInstance();
}
- return property.getValue(context, fobj);
+ return property.getIdentifierValue(context, fobj);
}
/**
+ * Returns the role RDF resource property.
+ * @param fobj The FoObj to which the property belongs.
+ * @param context An object that knows how to resolve FO Tree context issues.
+ * @return The role property.
+ */
+ public URI getRoleRdfResource(final FoObj fobj, final FoContext context) {
+ final PdRole property = (PdRole) getProperty(FoProperty.ROLE);
+ if (property == null) {
+ return PdRole.getRdfResourceValueNoInstance();
+ }
+ return property.getRdfResourceValue(context, fobj);
+ }
+
+ /**
* Returns the text-altitude property.
* @param fobj The FoObj to which the property belongs.
* @param context An object that knows how to resolve FO Tree context issues.
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdRole.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdRole.java 2022-01-20 00:00:53 UTC (rev 12431)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdRole.java 2022-01-20 00:40:06 UTC (rev 12432)
@@ -40,6 +40,7 @@
import org.axsl.fotree.FoContext;
+import java.net.URI;
import java.net.URISyntaxException;
/**
@@ -100,12 +101,12 @@
}
/**
- * Returns the value of this property.
+ * Returns the Identifier value of this property.
* @param context An object that knows how to resolve FO context issues.
* @param fobj The FO for which this value is needed.
* @return The value of this property.
*/
- public Object getValue(final FoContext context, final FoObj fobj) {
+ public String getIdentifierValue(final FoContext context, final FoObj fobj) {
if (value().canEvalKeyword()) {
final FoValue keyword = this.convertValueToFoValue(value());
switch (keyword) {
@@ -112,12 +113,12 @@
case INHERIT: {
final FoObj parent = fobj.effectiveParent(context);
if (parent != null) {
- return parent.traitRole(context);
+ return parent.traitRoleIdentifier(context);
}
break;
}
case NONE: {
- return "";
+ return getIdentifierValueNoInstance();
}
default: {
break;
@@ -124,9 +125,6 @@
}
}
}
- if (value() instanceof DtUri) {
- return ((DtUri) value()).getValue();
- }
if (value() instanceof DtString) {
return ((DtString) value()).getValue();
}
@@ -134,13 +132,52 @@
}
/**
- * Returns the default (initial) value for this property.
+ * Returns the Identifier value of this property.
+ * @param context An object that knows how to resolve FO context issues.
+ * @param fobj The FO for which this value is needed.
+ * @return The value of this property.
+ */
+ public URI getRdfResourceValue(final FoContext context, final FoObj fobj) {
+ if (value().canEvalKeyword()) {
+ final FoValue keyword = this.convertValueToFoValue(value());
+ switch (keyword) {
+ case INHERIT: {
+ final FoObj parent = fobj.effectiveParent(context);
+ if (parent != null) {
+ return parent.traitRoleRdfResource(context);
+ }
+ break;
+ }
+ case NONE: {
+ return getRdfResourceValueNoInstance();
+ }
+ default: {
+ break;
+ }
+ }
+ }
+ if (value() instanceof DtUri) {
+ return ((DtUri) value()).getValue();
+ }
+ throw this.unexpectedRetrieval();
+ }
+
+ /**
+ * Returns the default (initial) value for the Identifier aspect of this property.
* @return The initial value for this property.
*/
- public static String getValueNoInstance() {
- return "";
+ public static String getIdentifierValueNoInstance() {
+ return null;
}
+ /**
+ * Returns the default (initial) value for the RDF resource aspect of this property.
+ * @return The initial value for this property.
+ */
+ public static URI getRdfResourceValueNoInstance() {
+ return null;
+ }
+
@Override
protected FoValue[] getValidKeywords() {
return PdRole.VALID_KEYWORDS;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-01-20 00:00:56
|
Revision: 12431
http://sourceforge.net/p/foray/code/12431
Author: victormote
Date: 2022-01-20 00:00:53 +0000 (Thu, 20 Jan 2022)
Log Message:
-----------
Conform to aXSL changes: Improvements to properties that are URIs.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/main/java/org/foray/area/Area4a.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/BookmarkArea.java
trunk/foray/foray-common/src/main/java/org/foray/common/url/UrlUtil.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/PropertyList.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/AbstractFoProperty.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Bookmark4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ExternalGraphic4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/AbstractCue.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdBackground.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdBackgroundImage.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdExternalDestination.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdPlayDuring.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdRole.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdSourceDocument.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdSrc.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdTargetPresentationContext.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdTargetProcessingContext.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdTargetStylesheet.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/DtUri.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/AbstractPropertyTest.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestName.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestExternalDestination.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestRole.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestSrc.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestTargetPresentationContext.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestTargetProcessingContext.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestTargetStylesheet.java
trunk/foray/foray-graphic/src/main/java/org/foray/graphic/GraphicServer4a.java
trunk/foray/foray-graphic/src/main/java/org/foray/graphic/SvgGraphic.java
trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestAbstractGraphic.java
trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestBmpGraphic.java
trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestGifGraphic.java
trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestJpegGraphic.java
trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestPngGraphic.java
trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestSvgGraphic.java
trunk/foray/foray-graphic/src/test/java/org/foray/graphic/TestTiffGraphic.java
trunk/foray/foray-render/src/main/java/org/foray/render/pdf/PdfRenderer.java
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/Area4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/Area4a.java 2022-01-19 18:14:31 UTC (rev 12430)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/Area4a.java 2022-01-20 00:00:53 UTC (rev 12431)
@@ -46,6 +46,7 @@
import org.axsl.value.WritingMode;
import java.awt.geom.Rectangle2D;
+import java.net.URI;
import java.util.List;
/**
@@ -778,14 +779,23 @@
}
@Override
- public String linkDestination() {
+ public URI linkExternalDestination() {
final BasicLink link = this.traitGeneratedBy().ancestorBasicLink(this);
if (link == null) {
return null;
}
- return link.getDestination();
+ return link.traitExternalDestination();
}
+ @Override
+ public String linkInternalDestination() {
+ final BasicLink link = this.traitGeneratedBy().ancestorBasicLink(this);
+ if (link == null) {
+ return null;
+ }
+ return link.traitInternalDestination();
+ }
+
/**
* Returns the content rectangle measured in points (1/72 of an inch).
* @return The content rectangle in points.
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/BookmarkArea.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/BookmarkArea.java 2022-01-19 18:14:31 UTC (rev 12430)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/BookmarkArea.java 2022-01-20 00:00:53 UTC (rev 12431)
@@ -35,6 +35,7 @@
import org.axsl.galley.BookmarkG5;
import java.awt.Color;
+import java.net.URI;
import java.util.ArrayList;
import java.util.List;
@@ -129,11 +130,16 @@
}
@Override
- public String getDestination() {
- return traitGeneratedBy().getDestination();
+ public URI getExternalDestination() {
+ return traitGeneratedBy().traitExternalDestination();
}
@Override
+ public String getInternalDestination() {
+ return traitGeneratedBy().traitInternalDestination();
+ }
+
+ @Override
public String getTitleText() {
return this.getBookmarkTitle().getTitleText();
}
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/url/UrlUtil.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/url/UrlUtil.java 2022-01-19 18:14:31 UTC (rev 12430)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/url/UrlUtil.java 2022-01-20 00:00:53 UTC (rev 12431)
@@ -30,9 +30,11 @@
import java.io.File;
import java.io.IOException;
+import java.io.InputStream;
import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URISyntaxException;
import java.net.URL;
-import java.net.URLConnection;
import java.util.ArrayList;
import java.util.List;
@@ -77,9 +79,7 @@
* @throws MalformedURLException If it is unable to create even one
* URL instance.
*/
- public static List<URL> buildURLList(final URL[] baseURLs,
- final String urlSpecified)
- throws MalformedURLException {
+ public static List<URL> buildURLList(final URL[] baseURLs, final String urlSpecified) throws MalformedURLException {
if (urlSpecified == null) {
return null;
}
@@ -213,19 +213,21 @@
* Intended to be the equivalent of {@link File#exists()}.
* @param url The URL whose existence is to be tested.
* @return True if the URL exists, false otherwise.
- * "Existence" is defined as the ability to open a connection to the URL.
+ * "Existence" is defined as the ability to open an {@link InputStream} to the URL.
*/
public static boolean exists(final URL url) {
- if (url == null) {
- return false;
- }
- URLConnection connection = null;
+ /* TODO: There is probably a better way? */
+ final boolean exists;
try {
- connection = url.openConnection();
+ final InputStream stream = url.openStream();
+ exists = stream != null;
+ if (exists) {
+ stream.close();
+ }
} catch (final IOException e) {
return false;
}
- return connection != null;
+ return exists;
}
/**
@@ -238,4 +240,34 @@
return path.endsWith("/");
}
+ /**
+ * Convert a possibly-relative URI into an absolute URI by iterating a collection of base values.
+ * @param baseURLs The base values against which {@code uriSpecified} should be tested.
+ * @param uriSpecified The input URI, which can be either absolute or relative.
+ * @return The absolute URI for {@code uriSpecified}, or null if none is found.
+ */
+ public static URI resolveURI(final URL[] baseURLs, final URI uriSpecified) {
+ if (uriSpecified.isAbsolute()) {
+ return uriSpecified;
+ }
+ for (URL url : baseURLs) {
+ final URI uri;
+ try {
+ uri = url.toURI();
+ } catch (final URISyntaxException e) {
+ continue;
+ }
+ final URI absoluteUri = uri.resolve(uriSpecified);
+ final URL absoluteUrl;
+ try {
+ absoluteUrl = absoluteUri.toURL();
+ } catch (final MalformedURLException e) {
+ continue;
+ }
+ if (exists(absoluteUrl)) {
+ return absoluteUri;
+ }
+ }
+ return null;
+ }
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java 2022-01-19 18:14:31 UTC (rev 12430)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java 2022-01-20 00:00:53 UTC (rev 12431)
@@ -154,6 +154,7 @@
import java.awt.Color;
import java.awt.Shape;
+import java.net.URI;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
@@ -843,7 +844,7 @@
* @return The "external-destination" for this FO, or null if it has none.
* @see "XSL-FO Standard 1.0, Section 7.22.6"
*/
- public String traitExternalDestination() {
+ public URI traitExternalDestination() {
return getPropertyList().getExternalDestination();
}
@@ -1431,7 +1432,7 @@
}
@Override
- public String traitSrc(final FoContext context) {
+ public URI traitSrc(final FoContext context) {
return getPropertyList().getSrc(this, context);
}
@@ -1811,12 +1812,12 @@
}
@Override
- public String[] traitSourceDocument(final FoContext context) {
+ public URI[] traitSourceDocument(final FoContext context) {
return getPropertyList().getSourceDocument(this, context);
}
@Override
- public String traitRole(final FoContext context) {
+ public Object traitRole(final FoContext context) {
return getPropertyList().getRole(this, context);
}
@@ -2659,12 +2660,12 @@
}
@Override
- public String traitCueBefore(final FoContext context) {
+ public URI traitCueBefore(final FoContext context) {
return getPropertyList().traitCueBefore(this, context);
}
@Override
- public String traitCueAfter(final FoContext context) {
+ public URI traitCueAfter(final FoContext context) {
return getPropertyList().traitCueAfter(this, context);
}
@@ -2767,7 +2768,7 @@
}
@Override
- public String traitPlayDuring(final FoContext context) {
+ public URI traitPlayDuring(final FoContext context) {
return getPropertyList().traitPlayDuring(this, context);
}
@@ -2856,17 +2857,17 @@
}
@Override
- public String traitTargetProcessingContext() {
+ public URI traitTargetProcessingContext() {
return getPropertyList().traitTargetProcessingContext();
}
@Override
- public String traitTargetPresentationContext() {
+ public URI traitTargetPresentationContext() {
return getPropertyList().traitTargetPresentationContext(this);
}
@Override
- public String traitTargetStylesheet() {
+ public URI traitTargetStylesheet() {
return getPropertyList().traitTargetStylesheet();
}
@@ -3606,38 +3607,39 @@
return null;
}
- @Override
- public String getDestination() {
- final LinkType linkType = getLinkType();
- if (linkType == LinkType.INTERNAL) {
- return this.traitInternalDestination();
- }
- if (linkType == LinkType.EXTERNAL) {
- return this.getCookedExternalDestination();
- }
- return null;
- }
+// @Override
+// public String getDestination() {
+// final LinkType linkType = getLinkType();
+// if (linkType == LinkType.INTERNAL) {
+// return this.traitInternalDestination();
+// }
+// if (linkType == LinkType.EXTERNAL) {
+// return this.getCookedExternalDestination();
+// return traitExternalDestination();
+// }
+// return null;
+// }
+//
+// /**
+// * Returns the external destination stripped of the "url()" wrapping, leading and trailing spaces, and leading and
+// * trailing quotation marks.
+// * @return The normalized external destination.
+// */
+// public String getCookedExternalDestination() {
+// String destination = traitExternalDestination();
+// if (destination.startsWith("url(") && destination.endsWith(")")) {
+// destination = destination.substring("url(".length(), destination.length() - 1).trim();
+// if (destination.startsWith("\"") && destination.endsWith("\"")) {
+// destination = destination.substring(1, destination.length() - 1);
+// } else if (destination.startsWith("'")
+// && destination.endsWith("'")) {
+// destination = destination.substring(1, destination.length() - 1);
+// }
+// }
+// return destination;
+// }
/**
- * Returns the external destination stripped of the "url()" wrapping, leading and trailing spaces, and leading and
- * trailing quotation marks.
- * @return The normalized external destination.
- */
- public String getCookedExternalDestination() {
- String destination = traitExternalDestination();
- if (destination.startsWith("url(") && destination.endsWith(")")) {
- destination = destination.substring("url(".length(), destination.length() - 1).trim();
- if (destination.startsWith("\"") && destination.endsWith("\"")) {
- destination = destination.substring(1, destination.length() - 1);
- } else if (destination.startsWith("'")
- && destination.endsWith("'")) {
- destination = destination.substring(1, destination.length() - 1);
- }
- }
- return destination;
- }
-
- /**
* Returns the orthography server.
* @return The orthography server.
*/
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/PropertyList.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/PropertyList.java 2022-01-19 18:14:31 UTC (rev 12430)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/PropertyList.java 2022-01-20 00:00:53 UTC (rev 12431)
@@ -251,6 +251,7 @@
import org.axsl.value.ShadowEffect;
import java.awt.Shape;
+import java.net.URI;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@@ -587,7 +588,7 @@
* Returns the external-destination property.
* @return The external-destination property.
*/
- public String getExternalDestination() {
+ public URI getExternalDestination() {
final PdExternalDestination property = (PdExternalDestination) getProperty(FoProperty.EXTERNAL_DESTINATION);
if (property != null) {
return property.getValue();
@@ -1808,7 +1809,7 @@
* @param context An object that knows how to resolve FO Tree context issues.
* @return The src property.
*/
- public String getSrc(final FoObj fobj, final FoContext context) {
+ public URI getSrc(final FoObj fobj, final FoContext context) {
final PdSrc property = (PdSrc) getProperty(FoProperty.SRC);
if (property == null) {
return PdSrc.traitValueNoInstance(fobj);
@@ -2761,7 +2762,7 @@
* @param context An object that knows how to resolve FO Tree context issues.
* @return The source-document property.
*/
- public String[] getSourceDocument(final FoObj fobj, final FoContext context) {
+ public URI[] getSourceDocument(final FoObj fobj, final FoContext context) {
final PdSourceDocument property = (PdSourceDocument) getProperty(FoProperty.SOURCE_DOCUMENT);
if (property == null) {
return PdSourceDocument.getValueNoInstance();
@@ -2775,7 +2776,7 @@
* @param context An object that knows how to resolve FO Tree context issues.
* @return The role property.
*/
- public String getRole(final FoObj fobj, final FoContext context) {
+ public Object getRole(final FoObj fobj, final FoContext context) {
final PdRole property = (PdRole) getProperty(FoProperty.ROLE);
if (property == null) {
return PdRole.getValueNoInstance();
@@ -3815,7 +3816,7 @@
* @param context An object that knows how to resolve FO Tree context issues.
* @return The cue-before property.
*/
- public String traitCueBefore(final FoObj fobj, final FoContext context) {
+ public URI traitCueBefore(final FoObj fobj, final FoContext context) {
AbstractCue property = (AbstractCue) getProperty(FoProperty.CUE_BEFORE);
if (property != null) {
return property.getValue(context, fobj, FoProperty.CUE_BEFORE);
@@ -3834,7 +3835,7 @@
* @param context An object that knows how to resolve FO Tree context issues.
* @return The cue-after property.
*/
- public String traitCueAfter(final FoObj fobj, final FoContext context) {
+ public URI traitCueAfter(final FoObj fobj, final FoContext context) {
AbstractCue property = (AbstractCue) getProperty(FoProperty.CUE_AFTER);
if (property != null) {
return property.getValue(context, fobj, FoProperty.CUE_AFTER);
@@ -4118,7 +4119,7 @@
* @param context An object that knows how to resolve FO Tree context issues.
* @return The play-during property.
*/
- public String traitPlayDuring(final FoObj fobj, final FoContext context) {
+ public URI traitPlayDuring(final FoObj fobj, final FoContext context) {
final PdPlayDuring property = (PdPlayDuring) getProperty(FoProperty.PLAY_DURING);
if (property != null) {
return property.getValue(context, fobj);
@@ -4245,7 +4246,7 @@
* Returns the target-processing-context property.
* @return The target-processing-context property.
*/
- public String traitTargetProcessingContext() {
+ public URI traitTargetProcessingContext() {
final PdTargetProcessingContext property = (PdTargetProcessingContext)
getProperty(FoProperty.TARGET_PROCESSING_CONTEXT);
if (property != null) {
@@ -4259,7 +4260,7 @@
* @param fobj The FoObj to which the property belongs.
* @return The target-presentation-context property.
*/
- public String traitTargetPresentationContext(final FoObj fobj) {
+ public URI traitTargetPresentationContext(final FoObj fobj) {
final PdTargetPresentationContext property =
(PdTargetPresentationContext) getProperty(FoProperty.TARGET_PRESENTATION_CONTEXT);
if (property != null) {
@@ -4272,9 +4273,8 @@
* Returns the target-stylesheet property.
* @return The target-stylesheet property.
*/
- public String traitTargetStylesheet() {
- final PdTargetStylesheet property = (PdTargetStylesheet)
- getProperty(FoProperty.TARGET_STYLESHEET);
+ public URI traitTargetStylesheet() {
+ final PdTargetStylesheet property = (PdTargetStylesheet) getProperty(FoProperty.TARGET_STYLESHEET);
if (property != null) {
return property.getValue();
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/AbstractFoProperty.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/AbstractFoProperty.java 2022-01-19 18:14:31 UTC (rev 12430)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/AbstractFoProperty.java 2022-01-20 00:00:53 UTC (rev 12431)
@@ -37,6 +37,8 @@
import org.foray.fotree.value.PropertyValue;
import org.foray.fotree.value.PvKeyword;
+import java.net.URI;
+
/**
* Superclass for properties in the "fo:" namespace.
*/
@@ -196,7 +198,7 @@
* @param value The property value to be tested.
* @return The property value's underlying URI value.
*/
- protected String evalUri(final PropertyValue value) {
+ protected URI evalUri(final PropertyValue value) {
if (value instanceof DtUri) {
final DtUri uri = (DtUri) value;
return uri.getValue();
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Bookmark4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Bookmark4a.java 2022-01-19 18:14:31 UTC (rev 12430)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Bookmark4a.java 2022-01-20 00:00:53 UTC (rev 12431)
@@ -37,6 +37,7 @@
import org.axsl.fotree.FoVisitor;
import org.axsl.fotree.fo.Bookmark;
+import java.net.URI;
import java.util.ArrayList;
import java.util.List;
@@ -80,13 +81,11 @@
protected void validateProperties() throws FoTreeException {
final String internalDestination = this.traitInternalDestination();
if (internalDestination == null || internalDestination.equals("")) {
- getLogger().warn(getFullName()
- + "requires an internal-destination.");
+ getLogger().warn(getFullName() + "requires an internal-destination.");
}
- final String externalDestination = this.traitExternalDestination();
+ final URI externalDestination = this.traitExternalDestination();
if (externalDestination != null && ! externalDestination.equals("")) {
- getLogger().warn(getFullName()
- + "external-destination not supported currently.");
+ getLogger().warn(getFullName() + "external-destination not supported currently.");
}
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ExternalGraphic4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ExternalGraphic4a.java 2022-01-19 18:14:31 UTC (rev 12430)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ExternalGraphic4a.java 2022-01-20 00:00:53 UTC (rev 12431)
@@ -29,6 +29,7 @@
package org.foray.fotree.fo.obj;
import org.foray.common.ForayConstants;
+import org.foray.common.url.UrlUtil;
import org.foray.fotree.FoObj;
import org.foray.fotree.Namespace;
import org.foray.fotree.PropertyList;
@@ -43,6 +44,8 @@
import org.axsl.graphic.GraphicException;
import org.axsl.value.FoPropertyConstants;
+import java.net.MalformedURLException;
+import java.net.URI;
import java.util.List;
/**
@@ -120,10 +123,15 @@
&& ! this.makeGraphicAttempted) {
this.makeGraphicAttempted = true;
try {
- this.graphic = getGraphicServer().makeGraphic(traitSrc(context),
+ final URI src = traitSrc(context);
+ final URI resolvedUri = UrlUtil.resolveURI(getFoTree().getGraphicSearchPath(), src);
+ if (resolvedUri == null) {
+ throw new IllegalStateException("Unable to resolve URI: " + src.toASCIIString());
+ }
+ this.graphic = getGraphicServer().makeGraphic(resolvedUri.toURL(),
getFoTree().getGraphicSearchPath(),
getFoTree().isCachingGraphics());
- } catch (final GraphicException e) {
+ } catch (final GraphicException | MalformedURLException e) {
getLogger().error(e.getMessage() + "\n"
+ this.getContextMessage());
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/AbstractCue.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/AbstractCue.java 2022-01-19 18:14:31 UTC (rev 12430)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/AbstractCue.java 2022-01-20 00:00:53 UTC (rev 12431)
@@ -39,6 +39,7 @@
import org.axsl.fotree.FoContext;
+import java.net.URI;
import java.util.StringTokenizer;
/**
@@ -132,7 +133,7 @@
* @param propertyType The enumerated property type.
* @return The value of this property.
*/
- public String getValue(final FoContext context, final FoObj fobj,
+ public URI getValue(final FoContext context, final FoObj fobj,
final FoProperty propertyType) {
if (value().canEvalKeyword()) {
final FoValue keyword = this.convertValueToFoValue(value());
@@ -170,17 +171,15 @@
}
/**
- * Returns the value of this property for the case that this property is a
- * shorthand.
+ * Returns the value of this property for the case that this property is a shorthand.
* @param context An object that knows how to resolve FO context issues.
* @param fobj The FO for which this value is needed.
* @param propertyType The enumerated property type.
* @return The value of this property.
*/
- public String getShorthandValue(final FoContext context, final FoObj fobj,
- final FoProperty propertyType) {
+ public URI getShorthandValue(final FoContext context, final FoObj fobj, final FoProperty propertyType) {
if (! (value() instanceof PropertyCollection)) {
- return "";
+ return null;
}
final PropertyCollection collection = (PropertyCollection) value();
int index = -1;
@@ -209,8 +208,9 @@
* Returns the default (initial) value for this property.
* @return The initial value for this property.
*/
- public static String getValueNoInstance() {
- return "";
+ public static URI getValueNoInstance() {
+ /* Initial value is "none". */
+ return null;
}
@Override
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdBackground.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdBackground.java 2022-01-19 18:14:31 UTC (rev 12430)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdBackground.java 2022-01-20 00:00:53 UTC (rev 12431)
@@ -28,6 +28,7 @@
package org.foray.fotree.fo.prop;
+import org.foray.common.url.UrlUtil;
import org.foray.fotree.FoObj;
import org.foray.fotree.Property;
import org.foray.fotree.PropertyException;
@@ -37,7 +38,6 @@
import org.foray.fotree.value.DtColor;
import org.foray.fotree.value.DtLength;
import org.foray.fotree.value.DtPercentage;
-import org.foray.fotree.value.DtUri;
import org.foray.fotree.value.PropertyCollection;
import org.foray.fotree.value.PropertyValue;
@@ -181,8 +181,7 @@
}
/**
- * For the given token, determines which kind of property should be built
- * from it.
+ * For the given token, determines which kind of property should be built from it.
* @param input The String whose content type should be tested.
* @return One of the following PropertyMaker constants: BACKGROUND_COLOR,
* BACKGROUND_IMAGE, BACKGROUND_REPEAT, BACKGROUND_ATTACHMENT, or
@@ -219,8 +218,8 @@
if (color != null) {
return FoProperty.BACKGROUND_COLOR;
}
- final DtUri uri = DtUri.makeUriDT(input);
- if (uri != null) {
+ final String normalizedUri = UrlUtil.normalizeURISpecification(input);
+ if (normalizedUri != null) {
return FoProperty.BACKGROUND_IMAGE;
}
final DtLength length = DtLength.makeLengthDT(input);
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdBackgroundImage.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdBackgroundImage.java 2022-01-19 18:14:31 UTC (rev 12430)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdBackgroundImage.java 2022-01-20 00:00:53 UTC (rev 12431)
@@ -40,6 +40,9 @@
import org.axsl.graphic.Graphic;
import org.axsl.graphic.GraphicException;
+import java.net.MalformedURLException;
+import java.net.URI;
+
/**
* The "background-image" property in XSL-FO.
* @see "XSL-FO Recommendation 1.1, Section 7.8.3."
@@ -130,13 +133,13 @@
if (this.graphic != null) {
return this.graphic;
}
- final String src = ((DtUri) value()).getValue();
+ final URI src = ((DtUri) value()).getValue();
Graphic backgroundImage = null;
try {
- backgroundImage = fobj.getGraphicServer().makeGraphic(src,
+ backgroundImage = fobj.getGraphicServer().makeGraphic(src.toURL(),
fobj.getFoTree().getGraphicSearchPath(),
fobj.getFoTree().isCachingGraphics());
- } catch (final GraphicException imgex) {
+ } catch (final GraphicException | MalformedURLException imgex) {
backgroundImage = null;
fobj.getLogger().error("Error creating background image: "
+ imgex.getMessage());
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdExternalDestination.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdExternalDestination.java 2022-01-19 18:14:31 UTC (rev 12430)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdExternalDestination.java 2022-01-20 00:00:53 UTC (rev 12431)
@@ -36,6 +36,9 @@
import org.foray.fotree.value.DtUri;
import org.foray.fotree.value.PropertyValue;
+import java.net.URI;
+import java.net.URISyntaxException;
+
/**
* The "external-destination" property in XSL-FO.
* @see "XSL-FO Recommendation 1.1, Section 7.23.6."
@@ -65,13 +68,14 @@
* @return The parsed, storable property value.
* @throws PropertyException For an invalid property value.
*/
- private PropertyValue createPropertyValue(final FoObj fobj,
- final String value) throws PropertyException {
- final PropertyValue pv = DtUri.makeUriDT(value);
- if (pv != null) {
- return pv;
+ private PropertyValue createPropertyValue(final FoObj fobj, final String value) throws PropertyException {
+ final PropertyValue pv;
+ try {
+ pv = new DtUri(value);
+ } catch (final URISyntaxException e) {
+ throw new PropertyException(e);
}
- throw unexpectedValue(value, fobj);
+ return pv;
}
/**
@@ -78,7 +82,7 @@
* Returns the value of this property.
* @return The value of this property.
*/
- public String getValue() {
+ public URI getValue() {
if (value() instanceof DtUri) {
return ((DtUri) value()).getValue();
}
@@ -89,8 +93,9 @@
* Returns the default (initial) value for this property.
* @return The initial value for this property.
*/
- public static String getValueNoInstance() {
- return "";
+ public static URI getValueNoInstance() {
+ /* Return value of null implies "empty string", which is the initial value. */
+ return null;
}
@Override
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdPlayDuring.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdPlayDuring.java 2022-01-19 18:14:31 UTC (rev 12430)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdPlayDuring.java 2022-01-20 00:00:53 UTC (rev 12431)
@@ -37,19 +37,19 @@
import org.foray.fotree.value.PropertyValue;
import org.axsl.fotree.FoContext;
+import org.axsl.value.UriConstants;
+import java.net.URI;
import java.util.StringTokenizer;
/**
- * The "pitch-range" property in XSL-FO.
+ * The "play-during" property in XSL-FO.
* @see "XSL-FO Recommendation 1.1, Section 7.7.9."
*/
public class PdPlayDuring extends AbstractFoProperty {
- /* This property could be classified as a compound datatype, because it
- * really stores 4 pieces of information.
- * We have chosen to implement this as one property and only a simple
- * datatype, but using flags in the Property itself (as opposed to the
- * PropertyValue) to handle the additional data. */
+ /* This property could be classified as a compound datatype, because it really stores 4 pieces of information.
+ * We have chosen to implement this as one property and only a simple datatype, but using flags in the Property
+ * itself (as opposed to the PropertyValue) to handle the additional data. */
/** Array of valid keywords. */
private static final FoValue[] VALID_KEYWORDS = {
@@ -126,7 +126,7 @@
* @param fobj The FO for which this value is needed.
* @return The value of this property.
*/
- public String getValue(final FoContext context, final FoObj fobj) {
+ public URI getValue(final FoContext context, final FoObj fobj) {
if (value() instanceof DtUri) {
return ((DtUri) value()).getValue();
}
@@ -137,7 +137,7 @@
return getInheritedValue(context, fobj);
}
case AUTO: {
- return "";
+ return UriConstants.AUTO;
}
case NONE: {
return null;
@@ -154,9 +154,9 @@
* Returns the default (initial) value for this property.
* @return The initial value for this property.
*/
- public static String getValueNoInstance() {
- /* A return value of "" implies "auto" the default. */
- return "";
+ public static URI getValueNoInstance() {
+ /* The initial value is "auto". */
+ return UriConstants.AUTO;
}
/**
@@ -165,8 +165,7 @@
* @param fobj The FO for which this value is needed.
* @return The inherited value of this property.
*/
- private static String getInheritedValue(final FoContext context,
- final FoObj fobj) {
+ private static URI getInheritedValue(final FoContext context, final FoObj fobj) {
final FoObj parent = fobj.effectiveParent(context);
if (parent != null) {
return fobj.traitPlayDuring(context);
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdRole.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdRole.java 2022-01-19 18:14:31 UTC (rev 12430)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdRole.java 2022-01-20 00:00:53 UTC (rev 12431)
@@ -28,6 +28,7 @@
package org.foray.fotree.fo.prop;
+import org.foray.common.url.UrlUtil;
import org.foray.fotree.FoObj;
import org.foray.fotree.PropertyException;
import org.foray.fotree.fo.AbstractFoProperty;
@@ -39,6 +40,8 @@
import org.axsl.fotree.FoContext;
+import java.net.URISyntaxException;
+
/**
* The "role" property in XSL-FO.
* @see "XSL-FO Recommendation 1.1, Section 7.5.2."
@@ -74,13 +77,19 @@
* @return The parsed, storable property value.
* @throws PropertyException For an invalid property value.
*/
- private PropertyValue createPropertyValue(final FoObj fobj,
- final String value) throws PropertyException {
+ private PropertyValue createPropertyValue(final FoObj fobj, final String value) throws PropertyException {
PropertyValue pv = standardParse(fobj, value);
if (pv.canEvalKeyword()) {
return pv;
}
- pv = DtUri.makeUriDT(value);
+ if (UrlUtil.normalizeURISpecification(value) != null) {
+ try {
+ pv = new DtUri(value);
+ } catch (final URISyntaxException e) {
+ /* Ignore. If not a URI, the value can be a plain old String "semantic identifier."*/
+ pv = null;
+ }
+ }
if (pv != null) {
return pv;
}
@@ -96,7 +105,7 @@
* @param fobj The FO for which this value is needed.
* @return The value of this property.
*/
- public String getValue(final FoContext context, final FoObj fobj) {
+ public Object getValue(final FoContext context, final FoObj fobj) {
if (value().canEvalKeyword()) {
final FoValue keyword = this.convertValueToFoValue(value());
switch (keyword) {
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdSourceDocument.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdSourceDocument.java 2022-01-19 18:14:31 UTC (rev 12430)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdSourceDocument.java 2022-01-20 00:00:53 UTC (rev 12431)
@@ -39,6 +39,8 @@
import org.axsl.fotree.FoContext;
+import java.net.URI;
+import java.net.URISyntaxException;
import java.util.List;
/**
@@ -87,7 +89,12 @@
final ValueCollection collection = new ValueCollection();
for (int i = 0; i < tokenizedList.size(); i++) {
final String token = tokenizedList.get(i);
- final DtUri uri = DtUri.makeUriDT(token);
+ final DtUri uri;
+ try {
+ uri = new DtUri(token);
+ } catch (final URISyntaxException e) {
+ throw new PropertyException(e);
+ }
if (uri != null) {
collection.addItem(uri);
}
@@ -103,7 +110,7 @@
* @param fobj The FO for which this value is needed.
* @return The value of this property.
*/
- public String[] getValue(final FoContext context, final FoObj fobj) {
+ public URI[] getValue(final FoContext context, final FoObj fobj) {
if (value().canEvalKeyword()) {
final FoValue keyword = this.convertValueToFoValue(value());
switch (keyword) {
@@ -124,7 +131,7 @@
}
if (value() instanceof ValueCollection) {
final ValueCollection theCollection = (ValueCollection) value();
- final String[] returnArray = new String[theCollection.getCount()];
+ final URI[] returnArray = new URI[theCollection.getCount()];
for (int i = 0; i < theCollection.getCount(); i++) {
final DtUri value = (DtUri) theCollection.getItem(i);
returnArray[i] = value.getValue();
@@ -138,7 +145,7 @@
* Returns the default (initial) value for this property.
* @return The initial value for this property.
*/
- public static String[] getValueNoInstance() {
+ public static URI[] getValueNoInstance() {
return null;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdSrc.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdSrc.java 2022-01-19 18:14:31 UTC (rev 12430)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdSrc.java 2022-01-20 00:00:53 UTC (rev 12431)
@@ -38,6 +38,9 @@
import org.axsl.fotree.FoContext;
+import java.net.URI;
+import java.net.URISyntaxException;
+
/**
* The "src" property in XSL-FO.
* @see "XSL-FO Recommendation 1.1, Section 7.30.16."
@@ -72,17 +75,17 @@
* @return The parsed, storable property value.
* @throws PropertyException For an invalid property value.
*/
- private PropertyValue createPropertyValue(final FoObj fobj,
- final String value) throws PropertyException {
- PropertyValue pv = DtUri.makeUriDT(value);
+ private PropertyValue createPropertyValue(final FoObj fobj, final String value) throws PropertyException {
+ PropertyValue pv = checkKeywords(this.getValidKeywords(), value);
if (pv != null) {
return pv;
}
- pv = checkKeywords(this.getValidKeywords(), value);
- if (pv != null) {
- return pv;
+ try {
+ pv = new DtUri(value);
+ } catch (final URISyntaxException e) {
+ throw new PropertyException(e);
}
- throw unexpectedValue(value, fobj, "Not a valid XSL-FO <uri-specification>");
+ return pv;
}
/**
@@ -91,7 +94,7 @@
* @param fobj The FO for which this value is needed.
* @return The value of this property.
*/
- public String traitValue(final FoContext context, final FoObj fobj) {
+ public URI traitValue(final FoContext context, final FoObj fobj) {
if (value() instanceof DtUri) {
return ((DtUri) value()).getValue();
}
@@ -114,7 +117,7 @@
* @param fobj The FO for which this value is needed.
* @return The initial value for this property.
*/
- public static String traitValueNoInstance(final FoObj fobj) {
+ public static URI traitValueNoInstance(final FoObj fobj) {
return null;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdTargetPresentationContext.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdTargetPresentationContext.java 2022-01-19 18:14:31 UTC (rev 12430)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdTargetPresentationContext.java 2022-01-20 00:00:53 UTC (rev 12431)
@@ -36,6 +36,9 @@
import org.foray.fotree.value.DtUri;
import org.foray.fotree.value.PropertyValue;
+import java.net.URI;
+import java.net.URISyntaxException;
+
/**
* The "target-presentation-context" property in XSL-FO.
* @see "XSL-FO Recommendation 1.1, Section 7.23.12."
@@ -70,17 +73,17 @@
* @return The parsed, storable property value.
* @throws PropertyException For an invalid property value.
*/
- private PropertyValue createPropertyValue(final FoObj fobj,
- final String value) throws PropertyException {
+ private PropertyValue createPropertyValue(final FoObj fobj, final String value) throws PropertyException {
PropertyValue pv = standardParse(fobj, value);
if (pv.canEvalKeyword()) {
return pv;
}
- pv = DtUri.makeUriDT(value);
- if (pv != null) {
- return pv;
+ try {
+ pv = new DtUri(value);
+ } catch (final URISyntaxException e) {
+ throw new PropertyException(e);
}
- throw unexpectedValue(value, fobj);
+ return pv;
}
/**
@@ -88,7 +91,7 @@
* @param fobj The FO for which this value is needed.
* @return The value of this property.
*/
- public String getValue(final FoObj fobj) {
+ public URI getValue(final FoObj fobj) {
if (value().canEvalKeyword()) {
/* The only keyword is "use-target-processing-context". */
return null;
@@ -104,7 +107,7 @@
* @param fobj The FO for which this value is needed.
* @return The initial value for this property.
*/
- public static String getValueNoInstance(final FoObj fobj) {
+ public static URI getValueNoInstance(final FoObj fobj) {
return fobj.traitTargetProcessingContext();
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdTargetProcessingContext.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdTargetProcessingContext.java 2022-01-19 18:14:31 UTC (rev 12430)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdTargetProcessingContext.java 2022-01-20 00:00:53 UTC (rev 12431)
@@ -36,6 +36,9 @@
import org.foray.fotree.value.DtUri;
import org.foray.fotree.value.PropertyValue;
+import java.net.URI;
+import java.net.URISyntaxException;
+
/**
* The "target-processing-context" property in XSL-FO.
* @see "XSL-FO Recommendation 1.1, Section 7.23.13."
@@ -70,17 +73,17 @@
* @return The parsed, storable property value.
* @throws PropertyException For an invalid property value.
*/
- private PropertyValue createPropertyValue(final FoObj fobj,
- final String value) throws PropertyException {
+ private PropertyValue createPropertyValue(final FoObj fobj, final String value) throws PropertyException {
PropertyValue pv = standardParse(fobj, value);
if (pv.canEvalKeyword()) {
return pv;
}
- pv = DtUri.makeUriDT(value);
- if (pv != null) {
- return pv;
+ try {
+ pv = new DtUri(value);
+ } catch (final URISyntaxException e) {
+ throw new PropertyException(e);
}
- throw unexpectedValue(value, fobj);
+ return pv;
}
/**
@@ -87,7 +90,7 @@
* Returns the value of this property.
* @return The value of this property.
*/
- public String getValue() {
+ public URI getValue() {
if (value().canEvalKeyword()) {
/* The only keyword is "document-root". */
return null;
@@ -102,7 +105,7 @@
* Returns the default (initial) value for this property.
* @return The initial value for this property.
*/
- public static String getValueNoInstance() {
+ public static URI getValueNoInstance() {
return null;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdTargetStylesheet.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdTargetStylesheet.java 2022-01-19 18:14:31 UTC (rev 12430)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdTargetStylesheet.java 2022-01-20 00:00:53 UTC (rev 12431)
@@ -36,6 +36,9 @@
import org.foray.fotree.value.DtUri;
import org.foray.fotree.value.PropertyValue;
+import java.net.URI;
+import java.net.URISyntaxException;
+
/**
* The "target-stylesheet" property in XSL-FO.
* @see "XSL-FO Recommendation 1.1, Section 7.23.14."
@@ -70,17 +73,17 @@
* @return The parsed, storable property value.
* @throws PropertyException For an invalid property value.
*/
- private PropertyValue createPropertyValue(final FoObj fobj,
- final String value) throws PropertyException {
+ private PropertyValue createPropertyValue(final FoObj fobj, final String value) throws PropertyException {
PropertyValue pv = standardParse(fobj, value);
if (pv.canEvalKeyword()) {
return pv;
}
- pv = DtUri.makeUriDT(value);
- if (pv != null) {
- return pv;
+ try {
+ pv = new DtUri(value);
+ } catch (final URISyntaxException e) {
+ throw new PropertyException(e);
}
- throw unexpectedValue(value, fobj);
+ return pv;
}
/**
@@ -87,7 +90,7 @@
* Returns the value of this property.
* @return The value of this property.
*/
- public String getValue() {
+ public URI getValue() {
if (value().canEvalKeyword()) {
/* The only keyword is "use-normal-stylesheet". */
return null;
@@ -102,7 +105,7 @@
* Returns the default (initial) value for this property.
* @return The initial value for this property.
*/
- public static String getValueNoInstance() {
+ public static URI getValueNoInstance() {
return null;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/DtUri.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/DtUri.java 2022-01-19 18:14:31 UTC (rev 12430)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/DtUri.java 2022-01-20 00:00:53 UTC (rev 12431)
@@ -31,24 +31,30 @@
import org.foray.common.url.UrlUtil;
import java.awt.Color;
+import java.net.URI;
+import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.List;
/**
- * A "uri-specification" property datatype in XSL-FO. See XSL-FO Std. 1.0,
- * Sec. 5.11.
+ * A "uri-specification" property datatype in XSL-FO.
+ * @see "XSL-FO Recommendation, 1.0, Sec. 5.11."
+ * @see "XSL-FO Recommendation, 1.1, Sec. 5.11."
*/
public class DtUri extends Datatype {
/** The URI value. */
- private String value;
+ private URI value;
/**
* Constructor.
* @param uriSpecification The String containing the URI specification.
+ * @throws URISyntaxException If {@code uriSpecification} is not a valid URI reference.
*/
- public DtUri(final String uriSpecification) {
- this.value = uriSpecification;
+ public DtUri(final String uriSpecification) throws URISyntaxException {
+ final String normalizedUri = UrlUtil.normalizeURISpecification(uriSpecification);
+ final String uriString = normalizedUri == null ? uriSpecification : normalizedUri;
+ this.value = new URI(uriString);
}
/**
@@ -55,24 +61,11 @@
* Return the value.
* @return The String containing the URI specification.
*/
- public String getValue() {
+ public URI getValue() {
return this.value;
}
/**
- * Factory method which creates a UriDT instance from String input.
- * @param input The String containing the URI specification.
- * @return The created UriDT instance, or null if input is invalid.
- */
- public static DtUri makeUriDT(final String input) {
- final String useInput = UrlUtil.normalizeURISpecification(input);
- if (useInput == null) {
- return null;
- }
- return new DtUri(useInput);
- }
-
- /**
* Converts an unparsed string containing one or more URIs into a list of
* URIs.
* @param unparsedList The unparsed String.
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/AbstractPropertyTest.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/AbstractPropertyTest.java 2022-01-19 18:14:31 UTC (rev 12430)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/AbstractPropertyTest.java 2022-01-20 00:00:53 UTC (rev 12431)
@@ -145,15 +145,23 @@
protected abstract Property createProperty(FoObj fobj, String attributeValue) throws PropertyException;
/**
- * Tests the input value of "". Most classes should return this as invalid.
- * Other classes should override this method.
+ * Setup for {@link #testNullInput()}.
+ * @throws PropertyException If the value "" is not a valid value for the tested property.
+ */
+ protected void testNullInputSetup() throws PropertyException {
+ final FoObj testFobj = makeTestFObj();
+ createProperty(testFobj, "");
+ }
+
+ /**
+ * Tests the input value of "", which should fail for most cases.
+ * Properties for which this is a valid value should override this method.
* @throws PropertyException For errors during parsing.
*/
@Test
public void testNullInput() throws PropertyException {
- final FoObj testFobj = makeTestFObj();
try {
- createProperty(testFobj, "");
+ testNullInputSetup();
Assert.fail("Expected PropertyException for invalid keyword.");
} catch (final PropertyException e) {
/* Do nothing. This is the expected case. */
@@ -161,17 +169,23 @@
}
/**
- * Tests the input of "bhxbt", which is a valid name and valid string, but
- * should fail for most other uses.
- * Most classes should return this as invalid.
- * Other classes should override this method.
+ * Setup for {@link #testName001()}.
+ * @throws PropertyException If the value "bhxbt" is not a valid value for the tested property.
+ */
+ protected void testName001Setup() throws PropertyException {
+ final FoObj testFobj = makeTestFObj();
+ createProperty(testFobj, "bhxbt");
+ }
+
+ /**
+ * Tests the input of "bhxbt", which is a valid name and valid string, but should fail for most other uses.
+ * Properties for which this is a valid value should override this method.
* @throws PropertyException For errors during parsing.
*/
@Test
public void testName001() throws PropertyException {
- final FoObj testFobj = makeTestFObj();
try {
- createProperty(testFobj, "bhxbt");
+ testName001Setup();
Assert.fail("Expected PropertyException for invalid keyword.");
} catch (final PropertyException e) {
/* Do nothing. This is the expected case. */
@@ -179,8 +193,8 @@
}
/**
- * Tests the input of "abc xyz", which is a valid string (but not a valid
- * name), but should fail for most other uses.
+ * Tests the input of "abc xyz", which is a valid string (but not a valid name), but should fail for most other
+ * uses.
* Most classes should return this as invalid.
* Other classes should override this method.
* @throws PropertyException For errors during parsing.
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestName.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestName.java 2022-01-19 18:14:31 UTC (rev 12430)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractTestName.java 2022-01-20 00:00:53 UTC (rev 12431)
@@ -29,7 +29,6 @@
package org.foray.fotree.fo.prop;
import org.foray.fotree.AbstractPropertyTest;
-import org.foray.fotree.FoObj;
import org.foray.fotree.PropertyException;
import org.junit.Test;
@@ -39,15 +38,10 @@
*/
public abstract class AbstractTestName extends AbstractPropertyTest {
- /**
- * {@inheritDoc}
- * Overrides the superclass, because this class can take a valid name.
- */
@Override
@Test
public void testName001() throws PropertyException {
- final FoObj testFobj = makeTestFObj();
- createProperty(testFobj, "bhxbt");
+ testName001Setup();
}
}
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestExternalDestination.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestExternalDestination.java 2022-01-19 18:14:31 UTC (rev 12430)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestExternalDestination.java 2022-01-20 00:00:53 UTC (rev 12431)
@@ -33,6 +33,8 @@
import org.foray.fotree.FoObj;
import org.foray.fotree.PropertyException;
+import org.junit.Test;
+
/**
* JUnit test class for the class {@link PdExternalDestination}.
*/
@@ -39,11 +41,23 @@
public class TestExternalDestination extends AbstractPropertyTest {
@Override
- protected PdExternalDestination createProperty(final FoObj fobj,
- final String attributeValue) throws PropertyException {
- final PdExternalDestination property = new PdExternalDestination(fobj,
- WellKnownConstants.EMPTY_STRING, attributeValue);
+ protected PdExternalDestination createProperty(final FoObj fobj, final String attributeValue)
+ throws PropertyException {
+ final PdExternalDestination property = new PdExternalDestination(fobj, WellKnownConstants.EMPTY_STRING,
+ attributeValue);
return property;
}
+ @Override
+ @Test
+ public void testNullInput() throws PropertyException {
+ testNullInputSetup();
+ }
+
+ @Override
+ @Test
+ public void testName001() throws PropertyException {
+ testName001Setup();
+ }
+
}
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestRole.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestRole.java 2022-01-19 18:14:31 UTC (rev 12430)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestRole.java 2022-01-20 00:00:53 UTC (rev 12431)
@@ -47,6 +47,12 @@
return property;
}
+ @Override
+ @Test
+ public void testNullInput() throws PropertyException {
+ testNullInputSetup();
+ }
+
/**
* {@inheritDoc}
* Overrides the superclass, because this class can take a valid name.
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestSrc.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestSrc.java 2022-01-19 18:14:31 UTC (rev 12430)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestSrc.java 2022-01-20 00:00:53 UTC (rev 12431)
@@ -32,6 +32,8 @@
import org.foray.fotree.FoObj;
import org.foray.fotree.PropertyException;
+import org.junit.Test;
+
/**
* JUnit test class for the class {@link PdSrc}.
*/
@@ -38,11 +40,21 @@
public class TestSrc extends AbstractPropertyTest {
@Override
- protected PdSrc createProperty(final FoObj fobj, final String attributeValue)
- throws PropertyException {
- final PdSrc property = new PdSrc(fobj, "",
- attributeValue);
+ protected PdSrc createProperty(final FoObj fobj, final String attributeValue) throws PropertyException {
+ final PdSrc property = new PdSrc(fobj, "", attributeValue);
return property;
}
+ @Override
+ @Test
+ public void testNullInput() throws PropertyException {
+ testNullInputSetup();
+ }
+
+ @Override
+ @Test
+ public void testName001() throws PropertyException {
+ testName001Setup();
+ }
+
}
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestTargetPresentationContext.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestTargetPresentationContext.java 2022-01-19 18:14:31 UTC (rev 12430)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestTargetPresentationContext.java 2022-01-20 00:00:53 UTC (rev 12431)
@@ -32,6 +32,8 @@
import org.foray.fotree.FoObj;
import org.foray.fotree.PropertyException;
+import org.junit.Test;
+
/**
* JUnit test class for the class {@link PdTargetPresentationContext}.
*/
@@ -46,4 +48,16 @@
return property;
}
+ @Override
+ @Test
+ public void testNullInput() throws PropertyException {
+ testNullInputSetup();
+ }
+
+ @Override
+ @Test
+ public void testName001() throws PropertyException {
+ testName001Setup();
+ }
+
}
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestTargetProcessingContext.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestTargetProcessingContext.java 2022-01-19 18:14:31 UTC (rev 12430)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TestTargetProcessingContext.java 2022-01-20 00:00:53 UTC (rev 12431)
@@ -33,6 +33,8 @@
import org.foray.fotree.FoObj;
import org.foray.fotree.PropertyException;
+import org.junit.Test;
+
/**
* JUnit test class for the class {@link PdTargetProcessingContext}.
*/
@@ -48,4 +50,16 @@
return property;
}
+ @Override
+ @Test
+ public void testNull...
[truncated message content] |
|
From: <vic...@us...> - 2022-01-19 18:14:33
|
Revision: 12430
http://sourceforge.net/p/foray/code/12430
Author: victormote
Date: 2022-01-19 18:14:31 +0000 (Wed, 19 Jan 2022)
Log Message:
-----------
Add more constructors.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/PropertyException.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/PropertyException.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/PropertyException.java 2022-01-19 00:45:35 UTC (rev 12429)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/PropertyException.java 2022-01-19 18:14:31 UTC (rev 12430)
@@ -37,11 +37,30 @@
static final long serialVersionUID = 613178531358859549L;
/**
- * Constructor.
- * @param detail The detail exception message.
+ * Constructs a new exception with a specified detail message.
+ * @param message The detail exception message.
+ * @see Exception#Exception(String)
*/
- public PropertyException(final String detail) {
- super(detail);
+ public PropertyException(final String message) {
+ super(message);
}
+ /**
+ * Constructs a new exception with a specified detail message and cause.
+ * @param message The detail exception message.
+ * @param cause The cause of this exception.
+ * @see Exception#Exception(String, Throwable)
+ */
+ public PropertyException(final String message, final Throwable cause) {
+ super(message, cause);
+ }
+
+ /**
+ * Constructs a new exception with a specified cause.
+ * @param cause The cause of this exception.
+ */
+ public PropertyException(final Throwable cause) {
+ super(cause);
+ }
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-01-19 00:45:37
|
Revision: 12429
http://sourceforge.net/p/foray/code/12429
Author: victormote
Date: 2022-01-19 00:45:35 +0000 (Wed, 19 Jan 2022)
Log Message:
-----------
Conform to aXSL change: Remove no-longer-needed interface.
Modified Paths:
--------------
trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfDocument4a.java
trunk/foray/foray-pdf/src/main/java/org/foray/pdf/util/PdfGraphics2D.java
trunk/foray/foray-render/src/main/java/org/foray/render/ps/PsRenderer.java
Removed Paths:
-------------
trunk/foray/foray-common/src/main/java/org/foray/common/Gradient4a.java
Deleted: trunk/foray/foray-common/src/main/java/org/foray/common/Gradient4a.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/Gradient4a.java 2022-01-18 22:25:28 UTC (rev 12428)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/Gradient4a.java 2022-01-19 00:45:35 UTC (rev 12429)
@@ -1,99 +0,0 @@
-/*
- * Copyright 2009 The FOray Project.
- * http://www.foray.org
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * This work is in part derived from the following work(s), used with the
- * permission of the licensor:
- * Apache FOP, licensed by the Apache Software Foundation
- *
- */
-
-/*
- * $LastChangedRevision$
- * $LastChangedDate$
- * $LastChangedBy$
- */
-
-package org.foray.common;
-
-import org.axsl.common.Gradient;
-
-import java.awt.Color;
-import java.awt.color.ColorSpace;
-import java.util.List;
-
-/**
- * Describes a radial or linear gradient.
- */
-public class Gradient4a implements Gradient {
-
- /** Indicates whether the gradient is linear or radial. */
- private boolean radial;
-
- /** The color space for the gradient. */
- private ColorSpace colorSpace;
-
- /** The colors in the gradient. */
- private List<Color> colors;
-
- /** The bounds of the gradient. */
- private List<Double> bounds;
-
- /** The coordinates of the gradient. */
- private List<Double> coordinates;
-
- /**
- * Constructor.
- * @param radial Indicates whether the gradient is linear or radial.
- * @param colorSpace The color space for the gradient.
- * @param colors The colors in the gradient.
- * @param bounds The bounds of the gradient.
- * @param coordinates The coordinates of the gradient.
- */
- public Gradient4a(final boolean radial, final ColorSpace colorSpace, final List<Color> colors,
- final List<Double> bounds, final List<Double> coordinates) {
- this.radial = radial;
- this.colorSpace = colorSpace;
- this.colors = colors;
- this.bounds = bounds;
- this.coordinates = coordinates;
- }
-
- @Override
- public boolean isRadial() {
- return this.radial;
- }
-
- @Override
- public ColorSpace getColorSpace() {
- return this.colorSpace;
- }
-
- @Override
- public List<Color> getColors() {
- return this.colors;
- }
-
- @Override
- public List<Double> getBounds() {
- return this.bounds;
- }
-
- @Override
- public List<Double> getCoordinates() {
- return this.coordinates;
- }
-
-}
Modified: trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfDocument4a.java
===================================================================
--- trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfDocument4a.java 2022-01-18 22:25:28 UTC (rev 12428)
+++ trunk/foray/foray-pdf/src/main/java/org/foray/pdf/object/PdfDocument4a.java 2022-01-19 00:45:35 UTC (rev 12429)
@@ -44,7 +44,6 @@
import org.foray.pdf.PdfHeader;
import org.foray.pdf.PdfParser;
-import org.axsl.common.Gradient;
import org.axsl.common.sequence.IntPrimitiveIterator;
import org.axsl.font.Font;
import org.axsl.font.FontConsumer;
@@ -67,10 +66,14 @@
import org.slf4j.LoggerFactory;
import java.awt.Color;
+import java.awt.LinearGradientPaint;
+import java.awt.MultipleGradientPaint;
+import java.awt.RadialGradientPaint;
import java.awt.color.ColorSpace;
import java.io.IOException;
import java.io.OutputStream;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -578,7 +581,7 @@
}
@Override
- public String getGradientName(final Gradient gradient) {
+ public String getGradientName(final MultipleGradientPaint gradient) {
/* TODO: See if this gradient already exists before creating it again. */
final PdfPattern pattern = this.createGradient(gradient);
return pattern.getName();
@@ -594,12 +597,42 @@
}
@Override
- public PdfPattern createGradient(final Gradient gradient) {
- final boolean radial = gradient.isRadial();
- final ColorSpace theColorSpace = gradient.getColorSpace();
- final List<Color> theColors = gradient.getColors();
- final List<Double> theBounds = gradient.getBounds();
- final List<Double> theCoords = gradient.getCoordinates();
+ public PdfPattern createGradient(final MultipleGradientPaint gradient) {
+ final boolean radial = gradient instanceof RadialGradientPaint;
+ ColorSpace theColorSpace = null;
+ if (gradient.getColorSpace() != null) {
+ switch (gradient.getColorSpace()) {
+ case SRGB: {
+ theColorSpace = ColorSpace.getInstance(ColorSpace.CS_sRGB);
+ break;
+ }
+ case LINEAR_RGB: {
+ theColorSpace = ColorSpace.getInstance(ColorSpace.CS_LINEAR_RGB);
+ break;
+ }
+ default: {
+ throw new IllegalStateException("Unexpected Gradient color space type: " + gradient.getColorSpace());
+ }
+ }
+ }
+ final List<Color> theColors = Arrays.asList(gradient.getColors());
+ final List<Double> theBounds = new ArrayList<Double>();
+ theBounds.add(0D);
+ theBounds.add(1D);
+ final List<Double> theCoords = new ArrayList<Double>();
+ if (gradient instanceof LinearGradientPaint) {
+ final LinearGradientPaint linearGradient = (LinearGradientPaint) gradient;
+ theCoords.add(linearGradient.getStartPoint().getX());
+ theCoords.add(linearGradient.getStartPoint().getY());
+ theCoords.add(linearGradient.getEndPoint().getX());
+ theCoords.add(linearGradient.getEndPoint().getY());
+ } else if (gradient instanceof RadialGradientPaint) {
+ final RadialGradientPaint radialGradient = (RadialGradientPaint) gradient;
+ radialGradient.getCenterPoint().getX();
+ radialGradient.getCenterPoint().getY();
+ radialGradient.getFocusPoint().getX();
+ radialGradient.getFocusPoint().getY();
+ }
final PdfShading myShad;
final PdfFunction myfunky;
Modified: trunk/foray/foray-pdf/src/main/java/org/foray/pdf/util/PdfGraphics2D.java
===================================================================
--- trunk/foray/foray-pdf/src/main/java/org/foray/pdf/util/PdfGraphics2D.java 2022-01-18 22:25:28 UTC (rev 12428)
+++ trunk/foray/foray-pdf/src/main/java/org/foray/pdf/util/PdfGraphics2D.java 2022-01-19 00:45:35 UTC (rev 12429)
@@ -35,7 +35,6 @@
import org.foray.common.CharacterOutputStream;
import org.foray.common.FontContext4a;
-import org.foray.common.Gradient4a;
import org.foray.common.WellKnownConstants;
import org.foray.common.ps.PsColor;
import org.foray.common.ps.PsUtil;
@@ -66,12 +65,14 @@
import java.awt.Graphics2D;
import java.awt.GraphicsConfiguration;
import java.awt.Image;
+import java.awt.LinearGradientPaint;
+import java.awt.MultipleGradientPaint.ColorSpaceType;
+import java.awt.MultipleGradientPaint.CycleMethod;
import java.awt.Paint;
import java.awt.Rectangle;
import java.awt.Shape;
import java.awt.Stroke;
import java.awt.TexturePaint;
-import java.awt.color.ColorSpace;
import java.awt.font.TextAttribute;
import java.awt.geom.AffineTransform;
import java.awt.geom.PathIterator;
@@ -560,9 +561,13 @@
someColors.add(c1);
someColors.add(c2);
- final ColorSpace aColorSpace = ColorSpace.getInstance(ColorSpace.CS_sRGB);
- final Gradient4a gradient = new Gradient4a(false, aColorSpace, someColors, null, theCoords);
- final String gradientName = this.pdfContext.getGradientName(gradient);
+ final float[] fractions = new float[0];
+ final Color[] colors = new Color[] {c1, c2};
+ final LinearGradientPaint linearGradient =
+ new LinearGradientPaint(gp.getPoint1(), gp.getPoint2(), fractions, colors, CycleMethod.NO_CYCLE,
+ ColorSpaceType.SRGB, new AffineTransform());
+
+ final String gradientName = this.pdfContext.getGradientName(linearGradient);
if (fill) {
this.write("/Pattern cs /" + gradientName + " scn" + Basic_Latin_Block.CONTROL_LINE_FEED);
} else {
Modified: trunk/foray/foray-render/src/main/java/org/foray/render/ps/PsRenderer.java
===================================================================
--- trunk/foray/foray-render/src/main/java/org/foray/render/ps/PsRenderer.java 2022-01-18 22:25:28 UTC (rev 12428)
+++ trunk/foray/foray-render/src/main/java/org/foray/render/ps/PsRenderer.java 2022-01-19 00:45:35 UTC (rev 12429)
@@ -42,7 +42,6 @@
import org.foray.common.sequence.ByteArray;
import org.foray.render.PrintRenderer;
-import org.axsl.common.Gradient;
import org.axsl.common.sequence.ByteSequence;
import org.axsl.common.sequence.IntSequence;
import org.axsl.font.Font;
@@ -74,6 +73,7 @@
import org.axsl.value.RuleStyle;
import java.awt.Color;
+import java.awt.MultipleGradientPaint;
import java.awt.Rectangle;
import java.awt.color.ColorSpace;
import java.awt.geom.AffineTransform;
@@ -1360,7 +1360,7 @@
}
@Override
- public String getGradientName(final Gradient gradient) {
+ public String getGradientName(final MultipleGradientPaint gradient) {
/* TODO: Implement this. */
return StringUtils.EMPTY_STRING;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-01-18 22:25:30
|
Revision: 12428
http://sourceforge.net/p/foray/code/12428
Author: victormote
Date: 2022-01-18 22:25:28 +0000 (Tue, 18 Jan 2022)
Log Message:
-----------
Turn transitive resolution off for more projects.
Modified Paths:
--------------
trunk/foray/foray-output/build.gradle
trunk/foray/foray-pdf/build.gradle
trunk/foray/foray-render/build.gradle
Modified: trunk/foray/foray-output/build.gradle
===================================================================
--- trunk/foray/foray-output/build.gradle 2022-01-18 18:56:49 UTC (rev 12427)
+++ trunk/foray/foray-output/build.gradle 2022-01-18 22:25:28 UTC (rev 12428)
@@ -1,15 +1,17 @@
description = 'foray-output'
dependencies {
- api group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion
+ api group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion
- api group: 'org.axsl', name: 'axsl-font', version: axslVersion
- api group: 'org.axsl', name: 'axsl-output', version: axslVersion
- api group: 'org.axsl', name: 'axsl-mif', version: axslVersion
- api group: 'org.axsl', name: 'axsl-fotree', version: axslVersion
+ /* Turn transitive resolution OFF for both aXSL and FOray modules, for greater design visibility. */
- api project(':foray-common')
+ api (group: 'org.axsl', name: 'axsl-font', version: axslVersion) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-output', version: axslVersion) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-mif', version: axslVersion) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-fotree', version: axslVersion) { transitive = false }
+ api (project(':foray-common')) { transitive = false }
+
implementation group: 'ch.qos.logback', name: 'logback-classic', version: logbackClassicVersion
}
Modified: trunk/foray/foray-pdf/build.gradle
===================================================================
--- trunk/foray/foray-pdf/build.gradle 2022-01-18 18:56:49 UTC (rev 12427)
+++ trunk/foray/foray-pdf/build.gradle 2022-01-18 22:25:28 UTC (rev 12428)
@@ -1,16 +1,26 @@
description = 'foray-pdf'
dependencies {
- api group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion
- api group: 'org.axsl', name: 'axsl-pdf', version: axslVersion
- api group: 'org.apache.xmlgraphics', name: 'batik-awt-util', version: batikVersion
- api project(':foray-common')
+ api group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion
+ api group: 'org.apache.xmlgraphics', name: 'batik-awt-util', version: batikVersion
- implementation group: 'ch.qos.logback', name: 'logback-classic', version: logbackClassicVersion
+ /* Turn transitive resolution OFF for both aXSL and FOray modules, for greater design visibility. */
- testImplementation group: 'junit', name: 'junit', version: junitVersion
- testImplementation group: 'org.mockito', name: 'mockito-core', version: mockitoVersion
+ api (group: 'org.axsl', name: 'axsl-pdf', version: axslVersion) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-common', version: axslVersion) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-font', version: axslVersion) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-graphic', version: axslVersion) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-orthography', version: axslVersion) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-ps', version: axslVersion) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-unicode', version: axslVersion) { transitive = false }
+ api (project(':foray-common')) { transitive = false }
+
+ implementation group: 'ch.qos.logback', name: 'logback-classic', version: logbackClassicVersion
+
+ testImplementation group: 'junit', name: 'junit', version: junitVersion
+ testImplementation group: 'org.mockito', name: 'mockito-core', version: mockitoVersion
+
testImplementation project(':foray-font')
}
Modified: trunk/foray/foray-render/build.gradle
===================================================================
--- trunk/foray/foray-render/build.gradle 2022-01-18 18:56:49 UTC (rev 12427)
+++ trunk/foray/foray-render/build.gradle 2022-01-18 22:25:28 UTC (rev 12428)
@@ -1,15 +1,27 @@
description = 'foray-render'
dependencies {
- api group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion
- api group: 'org.axsl', name: 'axsl-output', version: axslVersion
- api group: 'org.axsl', name: 'axsl-pdf', version: axslVersion
- api project(':foray-common')
- api project(':foray-output')
+ api group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion
+ api group: 'org.axsl.org.w3c.dom.svg', name: 'svg-dom-java', version: svgDomVersion
- implementation group: 'ch.qos.logback', name: 'logback-classic', version: logbackClassicVersion
+ /* Turn transitive resolution OFF for both aXSL and FOray modules, for greater design visibility. */
- testImplementation group: 'junit', name: 'junit', version: junitVersion
+ api (group: 'org.axsl', name: 'axsl-common', version: axslVersion) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-output', version: axslVersion) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-font', version: axslVersion) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-pdf', version: axslVersion) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-galley', version: axslVersion) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-value', version: axslVersion) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-graphic', version: axslVersion) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-orthography', version: axslVersion) { transitive = false }
+ api (group: 'org.axsl', name: 'axsl-ps', version: axslVersion) { transitive = false }
+
+ api (project(':foray-common')) { transitive = false }
+ api (project(':foray-output')) { transitive = false }
+
+ implementation group: 'ch.qos.logback', name: 'logback-classic', version: logbackClassicVersion
+
+ testImplementation group: 'junit', name: 'junit', version: junitVersion
}
javadoc {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|