foray-commit Mailing List for FOray (Page 297)
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
(23) |
| 2026 |
Jan
(119) |
Feb
(335) |
Mar
(103) |
Apr
(43) |
May
(154) |
Jun
(107) |
Jul
(187) |
Aug
(4) |
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <vic...@us...> - 2006-06-12 21:44:41
|
Revision: 7540 Author: victormote Date: 2006-06-12 14:44:36 -0700 (Mon, 12 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7540&view=rev Log Message: ----------- Conform to axsl changes: Remove need to know which Marker generated the Areas. The AreaTree should already know this. Modified Paths: -------------- trunk/foray/foray-fotree/src/java/org/foray/fotree/FONode.java Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FONode.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/FONode.java 2006-06-12 20:57:14 UTC (rev 7539) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FONode.java 2006-06-12 21:44:36 UTC (rev 7540) @@ -30,7 +30,6 @@ import org.axsl.foR.FOContext; import org.axsl.foR.FONodeProxy; import org.axsl.foR.FONodeResult; -import org.axsl.foR.FOTreeException; import org.axsl.foR.fo.RetrieveMarker; import javax.swing.tree.TreeNode; @@ -59,13 +58,14 @@ TreeNode parent = this.getParent(); if (parent instanceof Marker) { if (context == null) { + /* TODO: Consider throwing an Exception. This should NOT + * happen. */ return realParent(); } - Marker marker = (Marker) parent; - RetrieveMarker retrieve; - try { - retrieve = context.getRetrieveMarker(marker); - } catch (FOTreeException e) { + RetrieveMarker retrieve = context.getRetrieveMarker(); + if (retrieve == null) { + /* TODO: Consider throwing an Exception. This should NOT + * happen. */ return realParent(); } if (retrieve instanceof org.foray.fotree.fo.obj.RetrieveMarker) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-12 20:57:23
|
Revision: 7539 Author: victormote Date: 2006-06-12 13:57:14 -0700 (Mon, 12 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7539&view=rev Log Message: ----------- Allow generatedBy to be any FOLinkage subclass. Modified Paths: -------------- trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2006-06-12 20:37:10 UTC (rev 7538) +++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2006-06-12 20:57:14 UTC (rev 7539) @@ -50,7 +50,7 @@ /* * The "generated-by" trait, as defined in Section 6.1.1. */ - protected FOLinkageNormal generatedBy; + protected FOLinkage generatedBy; /** * Constructor. @@ -66,7 +66,7 @@ getAreaNodeParent().getChildren().add(this); // Root can't do this because the AreaTreeControl isn't registered. this.generatedBy = linkage(generatedBy); - this.generatedBy.registerGeneratedArea(this); + this.getNormalLinkage().registerGeneratedArea(this); } } @@ -85,7 +85,7 @@ // Remove from the Area Tree getAreaNodeParent().removeChild(this); // Remove from the FO-Area Tree cross-reference. - this.generatedBy.unregisterGeneratedArea(this); + this.getNormalLinkage().unregisterGeneratedArea(this); } public void removeChild(org.axsl.areaW.AreaNode areaNode) { @@ -104,19 +104,32 @@ return linkage; } + public FOLinkageNormal getNormalLinkage() { + if (this.generatedBy instanceof FOLinkageNormal) { + return (FOLinkageNormal) this.generatedBy; + } + if (this.generatedBy instanceof FOLinkageMarker) { + FOLinkageMarker linkageMarker = (FOLinkageMarker) this.generatedBy; + RetrieveMarker retrieveMarker = this.getRetrieveMarker(null); + return linkageMarker.getNormalLinkage(retrieveMarker); + } + /* TODO: Consider throwing an Exception. This shouldn't happen. */ + return null; + } + protected org.axsl.areaW.AreaNode getPreviousChildOfGeneratedBy() { - return generatedBy.getPreviousGeneratedBy(this); + return this.getNormalLinkage().getPreviousGeneratedBy(this); } protected org.axsl.areaW.AreaNode getNextChildOfGeneratedBy() { - return generatedBy.getNextGeneratedBy(this); + return this.getNormalLinkage().getNextGeneratedBy(this); } protected boolean isFirstChildOfGeneratedBy() { - return generatedBy.isFirstGeneratedBy(this); + return this.getNormalLinkage().isFirstGeneratedBy(this); } protected boolean isLastChildOfGeneratedBy() { - return generatedBy.isLastGeneratedBy(this); + return this.getNormalLinkage().isLastGeneratedBy(this); } public AreaTree getAreaTree() { Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java 2006-06-12 20:37:10 UTC (rev 7538) +++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java 2006-06-12 20:57:14 UTC (rev 7539) @@ -81,7 +81,7 @@ * has been stored. */ this.generatedBy = linkage(root); - this.generatedBy.registerGeneratedArea(this); + this.getNormalLinkage().registerGeneratedArea(this); } public org.axsl.areaW.PageCollection makePageCollection( @@ -115,7 +115,7 @@ } public Root getRoot() { - FOLinkageNormal linkage = this.generatedBy; + FOLinkageNormal linkage = this.getNormalLinkage(); /* Cast verified at construction. */ return (Root) linkage.getFONode(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-12 20:37:17
|
Revision: 7538 Author: victormote Date: 2006-06-12 13:37:10 -0700 (Mon, 12 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7538&view=rev Log Message: ----------- Make linkage creation and retrieval method static. It is really a convenience method. Modified Paths: -------------- trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2006-06-12 17:46:37 UTC (rev 7537) +++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2006-06-12 20:37:10 UTC (rev 7538) @@ -92,7 +92,7 @@ this.children.remove(areaNode); } - protected FOLinkageNormal linkage(FONode foNode) { + public static FOLinkageNormal linkage(FONode foNode) { if (foNode == null) { return null; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-12 17:46:42
|
Revision: 7537 Author: victormote Date: 2006-06-12 10:46:37 -0700 (Mon, 12 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7537&view=rev Log Message: ----------- Handle null input better. Modified Paths: -------------- trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageMarker.java Modified: trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageMarker.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageMarker.java 2006-06-12 17:42:27 UTC (rev 7536) +++ trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageMarker.java 2006-06-12 17:46:37 UTC (rev 7537) @@ -80,6 +80,9 @@ } public FOLinkageNormal getNormalLinkage(RetrieveMarker retrieveMarker) { + if (retrieveMarker == null) { + return null; + } Object object = this.map.get(retrieveMarker); if (object != null) { return (FOLinkageNormal) object; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-12 17:42:32
|
Revision: 7536 Author: victormote Date: 2006-06-12 10:42:27 -0700 (Mon, 12 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7536&view=rev Log Message: ----------- Rename parameters for consistency and clarity. Modified Paths: -------------- trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageMarker.java trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageNormal.java Modified: trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageMarker.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageMarker.java 2006-06-12 17:33:37 UTC (rev 7535) +++ trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageMarker.java 2006-06-12 17:42:27 UTC (rev 7536) @@ -34,9 +34,7 @@ /** * <p>Handles linkage to the FO Tree for the specialized case of fo:marker - * descendants. - * This class provides the mechanism for those multiple occurences to be - * tracked properly.</p> + * descendants, which can be laid out multiple times in the AreaTree.</p> */ public class FOLinkageMarker extends FOLinkage { @@ -70,14 +68,14 @@ */ private HashMap map = new HashMap(); - public FOLinkageMarker(FONode realFObj) throws AreaWException { - super(realFObj); - Marker marker = realFObj.ancestorMarker(); + public FOLinkageMarker(FONode foGenerator) throws AreaWException { + super(foGenerator); + Marker marker = foGenerator.ancestorMarker(); if (marker == null) { throw new AreaWException("(FOray) FOLinkageMarker construction " + "attempted for object\n" + " not descended from an fo:marker:\n" - + realFObj.getContextMessage()); + + foGenerator.getContextMessage()); } } Modified: trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageNormal.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageNormal.java 2006-06-12 17:33:37 UTC (rev 7535) +++ trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageNormal.java 2006-06-12 17:42:27 UTC (rev 7536) @@ -45,8 +45,8 @@ */ private ArrayList generatedAreas = new ArrayList(); - public FOLinkageNormal(FONode realFObj) { - super(realFObj); + public FOLinkageNormal(FONode foGenerator) { + super(foGenerator); } public void registerGeneratedArea(AreaNode areaNode) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-12 17:33:43
|
Revision: 7535 Author: victormote Date: 2006-06-12 10:33:37 -0700 (Mon, 12 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7535&view=rev Log Message: ----------- 1. Rework to handle new linkage abstraction. 2. Add doc to clarify the data. Modified Paths: -------------- trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageMarker.java Modified: trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageMarker.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageMarker.java 2006-06-12 15:45:48 UTC (rev 7534) +++ trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageMarker.java 2006-06-12 17:33:37 UTC (rev 7535) @@ -24,28 +24,71 @@ package org.foray.area; +import org.axsl.areaW.AreaWException; +import org.axsl.areaW.PageArea; import org.axsl.foR.FONode; -import org.axsl.foR.FONodeResult; +import org.axsl.foR.fo.Marker; +import org.axsl.foR.fo.RetrieveMarker; import java.util.HashMap; /** - * A collection of {@link FOLinkageNormal} instances keyed by the - * retrieve-marker item that is their "parent". + * <p>Handles linkage to the FO Tree for the specialized case of fo:marker + * descendants. + * This class provides the mechanism for those multiple occurences to be + * tracked properly.</p> */ -public class FOLinkageMarker extends HashMap implements FONodeResult { +public class FOLinkageMarker extends FOLinkage { - static final long serialVersionUID = 632226032801502694L; + /** + * <p>Map whose key is a {@link RetrieveMarker} instance, and whose value + * is an {@link FOLinkageNormal} instance.</p> + * + * <p>An fo:marker can be grafted to multiple fo:retrieve-marker instances, + * and can therefore be laid out in the Area Tree multiple times. + * Similarly, an fo:retrieve-marker instance may be conceptually replaced + * by multiple fo:marker instances. + * So there is a many-to-many relationship between fo:marker and + * fo:retrieve-marker. + * We need the ability to track the Areas generated by each unique + * combination of {@link Marker} and {@link RetrieveMarker}. + * (Although the content resulting from the marker/retrieve-marker + * combination may appear on multiple pages, it only gets laid out once + * into the static-content flow, and therefore there is no need for the + * {@link PageArea} to be part of the key).</p> + * + * <p>Now, since the conceptual key is the combination of marker and + * retrieve-marker, we must explain why only the {@link RetrieveMarker} is + * used as the key to this Map. + * Answer: it is unnecessary, because the {@link Marker} instance is implied + * in this's {@link FOLinkage#getFONode()}.</p> + * + * <p>The value of the Map is an {@link FOLinkageNormal} just as would be + * used to store the linkage information for non-marker content. + * So the net effect is that we have forced a {@link RetrieveMarker} into + * the key that tracks this content.</p> + */ + private HashMap map = new HashMap(); - /** The FONode. */ - private FONode realFONode; - - public FOLinkageMarker(FONode realFObj) { - this.realFONode = realFObj; + public FOLinkageMarker(FONode realFObj) throws AreaWException { + super(realFObj); + Marker marker = realFObj.ancestorMarker(); + if (marker == null) { + throw new AreaWException("(FOray) FOLinkageMarker construction " + + "attempted for object\n" + + " not descended from an fo:marker:\n" + + realFObj.getContextMessage()); + } } - public FONode getFONode() { - return this.realFONode; + public FOLinkageNormal getNormalLinkage(RetrieveMarker retrieveMarker) { + Object object = this.map.get(retrieveMarker); + if (object != null) { + return (FOLinkageNormal) object; + } + FOLinkageNormal newLinkage = new FOLinkageNormal(this.getFONode()); + this.map.put(retrieveMarker, newLinkage); + return newLinkage; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-12 15:45:53
|
Revision: 7534 Author: victormote Date: 2006-06-12 08:45:48 -0700 (Mon, 12 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7534&view=rev Log Message: ----------- Conform to axsl change: Add method to get the ancestor fo:marker object. Modified Paths: -------------- trunk/foray/foray-fotree/src/java/org/foray/fotree/FONode.java Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FONode.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/FONode.java 2006-06-12 15:23:59 UTC (rev 7533) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FONode.java 2006-06-12 15:45:48 UTC (rev 7534) @@ -153,4 +153,18 @@ + " (Line " + line + ", Column " + column + ")"; } + /** + * {@inheritDoc} + */ + public org.axsl.foR.fo.Marker ancestorMarker() { + FObj parent = this.realParent(); + if (parent == null) { + return null; + } + if (parent instanceof Marker) { + return (Marker) parent; + } + return parent.ancestorMarker(); + } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-12 15:24:08
|
Revision: 7533 Author: victormote Date: 2006-06-12 08:23:59 -0700 (Mon, 12 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7533&view=rev Log Message: ----------- Add new abstract superclass for linkage items, and a subclass for the specialized case of Markers. Modified Paths: -------------- trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageNormal.java Added Paths: ----------- trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkage.java trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageMarker.java Added: trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkage.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkage.java (rev 0) +++ trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkage.java 2006-06-12 15:23:59 UTC (rev 7533) @@ -0,0 +1,47 @@ +/* + * Copyright 2006 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 + * + */ + +/* $Id$ */ + +package org.foray.area; + +import org.axsl.foR.FONode; +import org.axsl.foR.FONodeResult; + +/** + * Abstract superclass for classes that handle the linkage between the FO Tree + * and the Area Tree. + */ +public abstract class FOLinkage implements FONodeResult { + + /** The FONode for which this linkage tracks Area generation. */ + private FONode foGenerator; + + public FOLinkage(FONode foGenerator) { + this.foGenerator = foGenerator; + } + + public FONode getFONode() { + return this.foGenerator; + } + +} Property changes on: trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkage.java ___________________________________________________________________ Name: svn:keywords + "Author Id Rev Date URL" Name: svn:eol-style + native Added: trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageMarker.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageMarker.java (rev 0) +++ trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageMarker.java 2006-06-12 15:23:59 UTC (rev 7533) @@ -0,0 +1,51 @@ +/* + * Copyright 2006 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 + * + */ + +/* $Id$ */ + +package org.foray.area; + +import org.axsl.foR.FONode; +import org.axsl.foR.FONodeResult; + +import java.util.HashMap; + +/** + * A collection of {@link FOLinkageNormal} instances keyed by the + * retrieve-marker item that is their "parent". + */ +public class FOLinkageMarker extends HashMap implements FONodeResult { + + static final long serialVersionUID = 632226032801502694L; + + /** The FONode. */ + private FONode realFONode; + + public FOLinkageMarker(FONode realFObj) { + this.realFONode = realFObj; + } + + public FONode getFONode() { + return this.realFONode; + } + +} Property changes on: trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageMarker.java ___________________________________________________________________ Name: svn:keywords + "Author Id Rev Date URL" Name: svn:eol-style + native Modified: trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageNormal.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageNormal.java 2006-06-12 15:14:48 UTC (rev 7532) +++ trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageNormal.java 2006-06-12 15:23:59 UTC (rev 7533) @@ -27,7 +27,6 @@ import org.axsl.areaW.Area; import org.axsl.areaW.AreaNode; import org.axsl.foR.FONode; -import org.axsl.foR.FONodeResult; import java.util.ArrayList; @@ -35,27 +34,21 @@ * <p>An implementation of {@link org.axsl.foR.FONodeProxy} suitable for use * with the FOray AreaTree.</p> */ -public class FOLinkageNormal implements FONodeResult { +public class FOLinkageNormal extends FOLinkage { - /** The FONode which generated the Areas in {@link #generatedAreas}. */ - private FONode realFONode; - /** - * The ordered list of Area instances generated by {@link #realFONode}. + * The ordered list of Area instances generated by + * {@link FOLinkage#getFONode()}. * Index 0 "is-first" and Index size() - 1 "is-last". * This is currently set up to only store the root node of any subtree that - * was generated by {@link #realFONode}. + * was generated by {@link FOLinkage#getFONode()}. */ private ArrayList generatedAreas = new ArrayList(); public FOLinkageNormal(FONode realFObj) { - this.realFONode = realFObj; + super(realFObj); } - public FONode getFONode() { - return this.realFONode; - } - public void registerGeneratedArea(AreaNode areaNode) { AreaNode parent = areaNode.getWritableParent(); if (parent != null) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-12 15:15:02
|
Revision: 7532 Author: victormote Date: 2006-06-12 08:14:48 -0700 (Mon, 12 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7532&view=rev Log Message: ----------- Oops. Rename it again. Modified Paths: -------------- trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java Added Paths: ----------- trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageNormal.java Removed Paths: ------------- trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkage.java Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2006-06-12 15:05:56 UTC (rev 7531) +++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2006-06-12 15:14:48 UTC (rev 7532) @@ -50,7 +50,7 @@ /* * The "generated-by" trait, as defined in Section 6.1.1. */ - protected FOLinkage generatedBy; + protected FOLinkageNormal generatedBy; /** * Constructor. @@ -92,13 +92,13 @@ this.children.remove(areaNode); } - protected FOLinkage linkage(FONode foNode) { + protected FOLinkageNormal linkage(FONode foNode) { if (foNode == null) { return null; } - FOLinkage linkage = (FOLinkage) foNode.getResult(); + FOLinkageNormal linkage = (FOLinkageNormal) foNode.getResult(); if (linkage == null) { - linkage = new FOLinkage(foNode); + linkage = new FOLinkageNormal(foNode); foNode.setResult(linkage); } return linkage; Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java 2006-06-12 15:05:56 UTC (rev 7531) +++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java 2006-06-12 15:14:48 UTC (rev 7532) @@ -115,7 +115,7 @@ } public Root getRoot() { - FOLinkage linkage = this.generatedBy; + FOLinkageNormal linkage = this.generatedBy; /* Cast verified at construction. */ return (Root) linkage.getFONode(); } @@ -178,7 +178,7 @@ */ public Area firstNormalAreaReturned(String id) { FObj fobj = retrieveId(id); - FOLinkage proxy = linkage(fobj); + FOLinkageNormal proxy = linkage(fobj); return proxy.firstNormalAreaReturned(); } Deleted: trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkage.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkage.java 2006-06-12 15:05:56 UTC (rev 7531) +++ trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkage.java 2006-06-12 15:14:48 UTC (rev 7532) @@ -1,198 +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 - * - */ - -/* $Id$ */ - -package org.foray.area; - -import org.axsl.areaW.Area; -import org.axsl.areaW.AreaNode; -import org.axsl.foR.FONode; -import org.axsl.foR.FONodeResult; - -import java.util.ArrayList; - -/** - * <p>An implementation of {@link org.axsl.foR.FONodeProxy} suitable for use - * with the FOray AreaTree.</p> - */ -public class FOLinkage implements FONodeResult { - - /** The FONode which generated the Areas in {@link #generatedAreas}. */ - private FONode realFONode; - - /** - * The ordered list of Area instances generated by {@link #realFONode}. - * Index 0 "is-first" and Index size() - 1 "is-last". - * This is currently set up to only store the root node of any subtree that - * was generated by {@link #realFONode}. - */ - private ArrayList generatedAreas = new ArrayList(); - - public FOLinkage(FONode realFObj) { - this.realFONode = realFObj; - } - - public FONode getFONode() { - return this.realFONode; - } - - public void registerGeneratedArea(AreaNode areaNode) { - AreaNode parent = areaNode.getWritableParent(); - if (parent != null) { - /* - * If the parent was generated by the same FObj, then we shouldn't - * register this one also. - */ - if (areaNode.traitGeneratedBy() == parent.traitGeneratedBy()) { - return; - } - } - if (generatedAreas == null) { - generatedAreas = new ArrayList(); - } - generatedAreas.add(areaNode); - } - - public void unregisterGeneratedArea(AreaNode areaNode) { - generatedAreas.remove(areaNode); - } - - public AreaNode getFirstGeneratedBy() { - if (generatedAreas == null || generatedAreas.size() < 1) { - return null; - } - return (AreaNode) generatedAreas.get(0); - } - - public AreaNode getPreviousGeneratedBy(AreaNode area) { - if (generatedAreas == null) { - return null; - } - int index = generatedAreas.indexOf(area); - if (index > 0) { - return (AreaNode) generatedAreas.get(index - 1); - } - return null; - } - - public AreaNode getNextGeneratedBy(AreaNode area) { - if (generatedAreas == null) { - return null; - } - int index = generatedAreas.indexOf(area); - if (index > 0 && index < generatedAreas.size() - 1) { - return (AreaNode) generatedAreas.get(index + 1); - } - return null; - } - - /** - * @param area An Area instance. - * @return True iff area is the first Area generated by this. - */ - public boolean isFirstGeneratedBy(AreaNode area) { - if (generatedAreas.indexOf(area) == 0) { - return true; - } - return false; - } - - /** - * @param area An Area instance. - * @return True iff area is the first Area generated by this. - */ - public boolean isLastGeneratedBy(AreaNode area) { - if (generatedAreas.indexOf(area) == (generatedAreas.size() - 1)) { - return true; - } - return false; - } - - /** - * @return The current count of areas that have been generated by the FObj. - */ - public int qtyAreasGenerated() { - return this.generatedAreas.size(); - } - - /** - * @return The last AreaNode generated by the parent FObj. - */ - public AreaNode getLastGeneratedBy() { - if (generatedAreas == null || generatedAreas.size() < 1) { - return null; - } - return (AreaNode) generatedAreas.get(generatedAreas.size() - 1); - } - - /** - * @return The last Area generated by the parent FObj. - */ - public Area getLastAreaGeneratedBy() { - if (generatedAreas == null || generatedAreas.size() < 1) { - return null; - } - for (int i = generatedAreas.size() - 1; i >= 0; i--) { - Object object = generatedAreas.get(i); - if (object instanceof Area) { - return (Area) object; - } - } - return null; - } - - public Area firstNormalAreaReturned() { - /* - * TODO: This is not right, but will do for now. It is not considering - * areas that are returned by the FO but not generated by it. - */ - if (generatedAreas == null) { - return null; - } - for (int i = 0; i < generatedAreas.size(); i ++) { - Object object = generatedAreas.get(i); - if (object instanceof Area) { - return (Area) object; - } - } - return null; - } - - public Area lastNormalAreaReturned() { - /* - * TODO: This is not right, but will do for now. It is not considering - * areas that are returned by the FO but not generated by it. - */ - if (generatedAreas == null) { - return null; - } - for (int i = generatedAreas.size() - 1; i >= 0; i --) { - Object object = generatedAreas.get(i); - if (object instanceof Area) { - return (Area) object; - } - } - return null; - } - -} Copied: trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageNormal.java (from rev 7531, trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkage.java) =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageNormal.java (rev 0) +++ trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageNormal.java 2006-06-12 15:14:48 UTC (rev 7532) @@ -0,0 +1,198 @@ +/* + * 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 + * + */ + +/* $Id$ */ + +package org.foray.area; + +import org.axsl.areaW.Area; +import org.axsl.areaW.AreaNode; +import org.axsl.foR.FONode; +import org.axsl.foR.FONodeResult; + +import java.util.ArrayList; + +/** + * <p>An implementation of {@link org.axsl.foR.FONodeProxy} suitable for use + * with the FOray AreaTree.</p> + */ +public class FOLinkageNormal implements FONodeResult { + + /** The FONode which generated the Areas in {@link #generatedAreas}. */ + private FONode realFONode; + + /** + * The ordered list of Area instances generated by {@link #realFONode}. + * Index 0 "is-first" and Index size() - 1 "is-last". + * This is currently set up to only store the root node of any subtree that + * was generated by {@link #realFONode}. + */ + private ArrayList generatedAreas = new ArrayList(); + + public FOLinkageNormal(FONode realFObj) { + this.realFONode = realFObj; + } + + public FONode getFONode() { + return this.realFONode; + } + + public void registerGeneratedArea(AreaNode areaNode) { + AreaNode parent = areaNode.getWritableParent(); + if (parent != null) { + /* + * If the parent was generated by the same FObj, then we shouldn't + * register this one also. + */ + if (areaNode.traitGeneratedBy() == parent.traitGeneratedBy()) { + return; + } + } + if (generatedAreas == null) { + generatedAreas = new ArrayList(); + } + generatedAreas.add(areaNode); + } + + public void unregisterGeneratedArea(AreaNode areaNode) { + generatedAreas.remove(areaNode); + } + + public AreaNode getFirstGeneratedBy() { + if (generatedAreas == null || generatedAreas.size() < 1) { + return null; + } + return (AreaNode) generatedAreas.get(0); + } + + public AreaNode getPreviousGeneratedBy(AreaNode area) { + if (generatedAreas == null) { + return null; + } + int index = generatedAreas.indexOf(area); + if (index > 0) { + return (AreaNode) generatedAreas.get(index - 1); + } + return null; + } + + public AreaNode getNextGeneratedBy(AreaNode area) { + if (generatedAreas == null) { + return null; + } + int index = generatedAreas.indexOf(area); + if (index > 0 && index < generatedAreas.size() - 1) { + return (AreaNode) generatedAreas.get(index + 1); + } + return null; + } + + /** + * @param area An Area instance. + * @return True iff area is the first Area generated by this. + */ + public boolean isFirstGeneratedBy(AreaNode area) { + if (generatedAreas.indexOf(area) == 0) { + return true; + } + return false; + } + + /** + * @param area An Area instance. + * @return True iff area is the first Area generated by this. + */ + public boolean isLastGeneratedBy(AreaNode area) { + if (generatedAreas.indexOf(area) == (generatedAreas.size() - 1)) { + return true; + } + return false; + } + + /** + * @return The current count of areas that have been generated by the FObj. + */ + public int qtyAreasGenerated() { + return this.generatedAreas.size(); + } + + /** + * @return The last AreaNode generated by the parent FObj. + */ + public AreaNode getLastGeneratedBy() { + if (generatedAreas == null || generatedAreas.size() < 1) { + return null; + } + return (AreaNode) generatedAreas.get(generatedAreas.size() - 1); + } + + /** + * @return The last Area generated by the parent FObj. + */ + public Area getLastAreaGeneratedBy() { + if (generatedAreas == null || generatedAreas.size() < 1) { + return null; + } + for (int i = generatedAreas.size() - 1; i >= 0; i--) { + Object object = generatedAreas.get(i); + if (object instanceof Area) { + return (Area) object; + } + } + return null; + } + + public Area firstNormalAreaReturned() { + /* + * TODO: This is not right, but will do for now. It is not considering + * areas that are returned by the FO but not generated by it. + */ + if (generatedAreas == null) { + return null; + } + for (int i = 0; i < generatedAreas.size(); i ++) { + Object object = generatedAreas.get(i); + if (object instanceof Area) { + return (Area) object; + } + } + return null; + } + + public Area lastNormalAreaReturned() { + /* + * TODO: This is not right, but will do for now. It is not considering + * areas that are returned by the FO but not generated by it. + */ + if (generatedAreas == null) { + return null; + } + for (int i = generatedAreas.size() - 1; i >= 0; i --) { + Object object = generatedAreas.get(i); + if (object instanceof Area) { + return (Area) object; + } + } + return null; + } + +} Modified: trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java 2006-06-12 15:05:56 UTC (rev 7531) +++ trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java 2006-06-12 15:14:48 UTC (rev 7532) @@ -531,7 +531,7 @@ */ private boolean startsHere(Marker marker) { FObj parent = marker.parentFO(); - FOLinkage proxy = linkage(parent); + FOLinkageNormal proxy = linkage(parent); Area firstArea = (Area) proxy.firstNormalAreaReturned(); if (firstArea == null) { return false; @@ -548,7 +548,7 @@ */ private boolean endsHere(Marker marker) { FObj parent = marker.parentFO(); - FOLinkage proxy = linkage(parent); + FOLinkageNormal proxy = linkage(parent); Area lastArea = (Area) proxy.lastNormalAreaReturned(); if (lastArea == null) { return false; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-12 15:06:09
|
Revision: 7531 Author: victormote Date: 2006-06-12 08:05:56 -0700 (Mon, 12 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7531&view=rev Log Message: ----------- Rename class for future expansion. Modified Paths: -------------- trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java Added Paths: ----------- trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkage.java Removed Paths: ------------- trunk/foray/foray-areatree/src/java/org/foray/area/FOrayFOLinkage.java Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2006-06-12 14:56:38 UTC (rev 7530) +++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2006-06-12 15:05:56 UTC (rev 7531) @@ -50,7 +50,7 @@ /* * The "generated-by" trait, as defined in Section 6.1.1. */ - protected FOrayFOLinkage generatedBy; + protected FOLinkage generatedBy; /** * Constructor. @@ -92,13 +92,13 @@ this.children.remove(areaNode); } - protected FOrayFOLinkage linkage(FONode foNode) { + protected FOLinkage linkage(FONode foNode) { if (foNode == null) { return null; } - FOrayFOLinkage linkage = (FOrayFOLinkage) foNode.getResult(); + FOLinkage linkage = (FOLinkage) foNode.getResult(); if (linkage == null) { - linkage = new FOrayFOLinkage(foNode); + linkage = new FOLinkage(foNode); foNode.setResult(linkage); } return linkage; Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java 2006-06-12 14:56:38 UTC (rev 7530) +++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java 2006-06-12 15:05:56 UTC (rev 7531) @@ -115,7 +115,7 @@ } public Root getRoot() { - FOrayFOLinkage linkage = this.generatedBy; + FOLinkage linkage = this.generatedBy; /* Cast verified at construction. */ return (Root) linkage.getFONode(); } @@ -178,7 +178,7 @@ */ public Area firstNormalAreaReturned(String id) { FObj fobj = retrieveId(id); - FOrayFOLinkage proxy = linkage(fobj); + FOLinkage proxy = linkage(fobj); return proxy.firstNormalAreaReturned(); } Copied: trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkage.java (from rev 7529, trunk/foray/foray-areatree/src/java/org/foray/area/FOrayFOLinkage.java) =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkage.java (rev 0) +++ trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkage.java 2006-06-12 15:05:56 UTC (rev 7531) @@ -0,0 +1,198 @@ +/* + * 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 + * + */ + +/* $Id$ */ + +package org.foray.area; + +import org.axsl.areaW.Area; +import org.axsl.areaW.AreaNode; +import org.axsl.foR.FONode; +import org.axsl.foR.FONodeResult; + +import java.util.ArrayList; + +/** + * <p>An implementation of {@link org.axsl.foR.FONodeProxy} suitable for use + * with the FOray AreaTree.</p> + */ +public class FOLinkage implements FONodeResult { + + /** The FONode which generated the Areas in {@link #generatedAreas}. */ + private FONode realFONode; + + /** + * The ordered list of Area instances generated by {@link #realFONode}. + * Index 0 "is-first" and Index size() - 1 "is-last". + * This is currently set up to only store the root node of any subtree that + * was generated by {@link #realFONode}. + */ + private ArrayList generatedAreas = new ArrayList(); + + public FOLinkage(FONode realFObj) { + this.realFONode = realFObj; + } + + public FONode getFONode() { + return this.realFONode; + } + + public void registerGeneratedArea(AreaNode areaNode) { + AreaNode parent = areaNode.getWritableParent(); + if (parent != null) { + /* + * If the parent was generated by the same FObj, then we shouldn't + * register this one also. + */ + if (areaNode.traitGeneratedBy() == parent.traitGeneratedBy()) { + return; + } + } + if (generatedAreas == null) { + generatedAreas = new ArrayList(); + } + generatedAreas.add(areaNode); + } + + public void unregisterGeneratedArea(AreaNode areaNode) { + generatedAreas.remove(areaNode); + } + + public AreaNode getFirstGeneratedBy() { + if (generatedAreas == null || generatedAreas.size() < 1) { + return null; + } + return (AreaNode) generatedAreas.get(0); + } + + public AreaNode getPreviousGeneratedBy(AreaNode area) { + if (generatedAreas == null) { + return null; + } + int index = generatedAreas.indexOf(area); + if (index > 0) { + return (AreaNode) generatedAreas.get(index - 1); + } + return null; + } + + public AreaNode getNextGeneratedBy(AreaNode area) { + if (generatedAreas == null) { + return null; + } + int index = generatedAreas.indexOf(area); + if (index > 0 && index < generatedAreas.size() - 1) { + return (AreaNode) generatedAreas.get(index + 1); + } + return null; + } + + /** + * @param area An Area instance. + * @return True iff area is the first Area generated by this. + */ + public boolean isFirstGeneratedBy(AreaNode area) { + if (generatedAreas.indexOf(area) == 0) { + return true; + } + return false; + } + + /** + * @param area An Area instance. + * @return True iff area is the first Area generated by this. + */ + public boolean isLastGeneratedBy(AreaNode area) { + if (generatedAreas.indexOf(area) == (generatedAreas.size() - 1)) { + return true; + } + return false; + } + + /** + * @return The current count of areas that have been generated by the FObj. + */ + public int qtyAreasGenerated() { + return this.generatedAreas.size(); + } + + /** + * @return The last AreaNode generated by the parent FObj. + */ + public AreaNode getLastGeneratedBy() { + if (generatedAreas == null || generatedAreas.size() < 1) { + return null; + } + return (AreaNode) generatedAreas.get(generatedAreas.size() - 1); + } + + /** + * @return The last Area generated by the parent FObj. + */ + public Area getLastAreaGeneratedBy() { + if (generatedAreas == null || generatedAreas.size() < 1) { + return null; + } + for (int i = generatedAreas.size() - 1; i >= 0; i--) { + Object object = generatedAreas.get(i); + if (object instanceof Area) { + return (Area) object; + } + } + return null; + } + + public Area firstNormalAreaReturned() { + /* + * TODO: This is not right, but will do for now. It is not considering + * areas that are returned by the FO but not generated by it. + */ + if (generatedAreas == null) { + return null; + } + for (int i = 0; i < generatedAreas.size(); i ++) { + Object object = generatedAreas.get(i); + if (object instanceof Area) { + return (Area) object; + } + } + return null; + } + + public Area lastNormalAreaReturned() { + /* + * TODO: This is not right, but will do for now. It is not considering + * areas that are returned by the FO but not generated by it. + */ + if (generatedAreas == null) { + return null; + } + for (int i = generatedAreas.size() - 1; i >= 0; i --) { + Object object = generatedAreas.get(i); + if (object instanceof Area) { + return (Area) object; + } + } + return null; + } + +} Deleted: trunk/foray/foray-areatree/src/java/org/foray/area/FOrayFOLinkage.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/FOrayFOLinkage.java 2006-06-12 14:56:38 UTC (rev 7530) +++ trunk/foray/foray-areatree/src/java/org/foray/area/FOrayFOLinkage.java 2006-06-12 15:05:56 UTC (rev 7531) @@ -1,198 +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 - * - */ - -/* $Id$ */ - -package org.foray.area; - -import org.axsl.areaW.Area; -import org.axsl.areaW.AreaNode; -import org.axsl.foR.FONode; -import org.axsl.foR.FONodeResult; - -import java.util.ArrayList; - -/** - * <p>An implementation of {@link org.axsl.foR.FONodeProxy} suitable for use - * with the FOray AreaTree.</p> - */ -public class FOrayFOLinkage implements FONodeResult { - - /** The FONode which generated the Areas in {@link #generatedAreas}. */ - private FONode realFONode; - - /** - * The ordered list of Area instances generated by {@link #realFONode}. - * Index 0 "is-first" and Index size() - 1 "is-last". - * This is currently set up to only store the root node of any subtree that - * was generated by {@link #realFONode}. - */ - private ArrayList generatedAreas = new ArrayList(); - - public FOrayFOLinkage(FONode realFObj) { - this.realFONode = realFObj; - } - - public FONode getFONode() { - return this.realFONode; - } - - public void registerGeneratedArea(AreaNode areaNode) { - AreaNode parent = areaNode.getWritableParent(); - if (parent != null) { - /* - * If the parent was generated by the same FObj, then we shouldn't - * register this one also. - */ - if (areaNode.traitGeneratedBy() == parent.traitGeneratedBy()) { - return; - } - } - if (generatedAreas == null) { - generatedAreas = new ArrayList(); - } - generatedAreas.add(areaNode); - } - - public void unregisterGeneratedArea(AreaNode areaNode) { - generatedAreas.remove(areaNode); - } - - public AreaNode getFirstGeneratedBy() { - if (generatedAreas == null || generatedAreas.size() < 1) { - return null; - } - return (AreaNode) generatedAreas.get(0); - } - - public AreaNode getPreviousGeneratedBy(AreaNode area) { - if (generatedAreas == null) { - return null; - } - int index = generatedAreas.indexOf(area); - if (index > 0) { - return (AreaNode) generatedAreas.get(index - 1); - } - return null; - } - - public AreaNode getNextGeneratedBy(AreaNode area) { - if (generatedAreas == null) { - return null; - } - int index = generatedAreas.indexOf(area); - if (index > 0 && index < generatedAreas.size() - 1) { - return (AreaNode) generatedAreas.get(index + 1); - } - return null; - } - - /** - * @param area An Area instance. - * @return True iff area is the first Area generated by this. - */ - public boolean isFirstGeneratedBy(AreaNode area) { - if (generatedAreas.indexOf(area) == 0) { - return true; - } - return false; - } - - /** - * @param area An Area instance. - * @return True iff area is the first Area generated by this. - */ - public boolean isLastGeneratedBy(AreaNode area) { - if (generatedAreas.indexOf(area) == (generatedAreas.size() - 1)) { - return true; - } - return false; - } - - /** - * @return The current count of areas that have been generated by the FObj. - */ - public int qtyAreasGenerated() { - return this.generatedAreas.size(); - } - - /** - * @return The last AreaNode generated by the parent FObj. - */ - public AreaNode getLastGeneratedBy() { - if (generatedAreas == null || generatedAreas.size() < 1) { - return null; - } - return (AreaNode) generatedAreas.get(generatedAreas.size() - 1); - } - - /** - * @return The last Area generated by the parent FObj. - */ - public Area getLastAreaGeneratedBy() { - if (generatedAreas == null || generatedAreas.size() < 1) { - return null; - } - for (int i = generatedAreas.size() - 1; i >= 0; i--) { - Object object = generatedAreas.get(i); - if (object instanceof Area) { - return (Area) object; - } - } - return null; - } - - public Area firstNormalAreaReturned() { - /* - * TODO: This is not right, but will do for now. It is not considering - * areas that are returned by the FO but not generated by it. - */ - if (generatedAreas == null) { - return null; - } - for (int i = 0; i < generatedAreas.size(); i ++) { - Object object = generatedAreas.get(i); - if (object instanceof Area) { - return (Area) object; - } - } - return null; - } - - public Area lastNormalAreaReturned() { - /* - * TODO: This is not right, but will do for now. It is not considering - * areas that are returned by the FO but not generated by it. - */ - if (generatedAreas == null) { - return null; - } - for (int i = generatedAreas.size() - 1; i >= 0; i --) { - Object object = generatedAreas.get(i); - if (object instanceof Area) { - return (Area) object; - } - } - return null; - } - -} Modified: trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java 2006-06-12 14:56:38 UTC (rev 7530) +++ trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java 2006-06-12 15:05:56 UTC (rev 7531) @@ -531,7 +531,7 @@ */ private boolean startsHere(Marker marker) { FObj parent = marker.parentFO(); - FOrayFOLinkage proxy = linkage(parent); + FOLinkage proxy = linkage(parent); Area firstArea = (Area) proxy.firstNormalAreaReturned(); if (firstArea == null) { return false; @@ -548,7 +548,7 @@ */ private boolean endsHere(Marker marker) { FObj parent = marker.parentFO(); - FOrayFOLinkage proxy = linkage(parent); + FOLinkage proxy = linkage(parent); Area lastArea = (Area) proxy.lastNormalAreaReturned(); if (lastArea == null) { return false; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-12 14:56:45
|
Revision: 7530 Author: victormote Date: 2006-06-12 07:56:38 -0700 (Mon, 12 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7530&view=rev Log Message: ----------- Rename method and local variable for clarity. Modified Paths: -------------- trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java trunk/foray/foray-areatree/src/java/org/foray/area/PageCollection.java trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2006-06-12 14:52:02 UTC (rev 7529) +++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2006-06-12 14:56:38 UTC (rev 7530) @@ -65,7 +65,7 @@ // AreaTree has no parent with which to register getAreaNodeParent().getChildren().add(this); // Root can't do this because the AreaTreeControl isn't registered. - this.generatedBy = getFObjProxy(generatedBy); + this.generatedBy = linkage(generatedBy); this.generatedBy.registerGeneratedArea(this); } } @@ -92,14 +92,14 @@ this.children.remove(areaNode); } - protected FOrayFOLinkage getFObjProxy(FONode fobj) { - if (fobj == null) { + protected FOrayFOLinkage linkage(FONode foNode) { + if (foNode == null) { return null; } - FOrayFOLinkage linkage = (FOrayFOLinkage) fobj.getResult(); + FOrayFOLinkage linkage = (FOrayFOLinkage) foNode.getResult(); if (linkage == null) { - linkage = new FOrayFOLinkage(fobj); - fobj.setResult(linkage); + linkage = new FOrayFOLinkage(foNode); + foNode.setResult(linkage); } return linkage; } Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java 2006-06-12 14:52:02 UTC (rev 7529) +++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java 2006-06-12 14:56:38 UTC (rev 7530) @@ -80,7 +80,7 @@ * These registration steps must take place after the AreaTreeControl * has been stored. */ - this.generatedBy = getFObjProxy(root); + this.generatedBy = linkage(root); this.generatedBy.registerGeneratedArea(this); } @@ -178,7 +178,7 @@ */ public Area firstNormalAreaReturned(String id) { FObj fobj = retrieveId(id); - FOrayFOLinkage proxy = getFObjProxy(fobj); + FOrayFOLinkage proxy = linkage(fobj); return proxy.firstNormalAreaReturned(); } Modified: trunk/foray/foray-areatree/src/java/org/foray/area/PageCollection.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/PageCollection.java 2006-06-12 14:52:02 UTC (rev 7529) +++ trunk/foray/foray-areatree/src/java/org/foray/area/PageCollection.java 2006-06-12 14:56:38 UTC (rev 7530) @@ -332,7 +332,7 @@ public org.axsl.areaW.SpanRA startingReferenceArea(FObj lastFObj, FObj nextFObj) throws AreaWException { if (lastFObj != null) { - Area lastArea = (Area) getFObjProxy(lastFObj) + Area lastArea = (Area) linkage(lastFObj) .getLastAreaGeneratedBy(); SpanRA lastSpan = lastArea.ancestorSpanRA(); return lastSpan.spanForNextFO(nextFObj); Modified: trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java 2006-06-12 14:52:02 UTC (rev 7529) +++ trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java 2006-06-12 14:56:38 UTC (rev 7530) @@ -531,7 +531,7 @@ */ private boolean startsHere(Marker marker) { FObj parent = marker.parentFO(); - FOrayFOLinkage proxy = getFObjProxy(parent); + FOrayFOLinkage proxy = linkage(parent); Area firstArea = (Area) proxy.firstNormalAreaReturned(); if (firstArea == null) { return false; @@ -548,7 +548,7 @@ */ private boolean endsHere(Marker marker) { FObj parent = marker.parentFO(); - FOrayFOLinkage proxy = getFObjProxy(parent); + FOrayFOLinkage proxy = linkage(parent); Area lastArea = (Area) proxy.lastNormalAreaReturned(); if (lastArea == null) { return false; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-12 14:52:10
|
Revision: 7529 Author: victormote Date: 2006-06-12 07:52:02 -0700 (Mon, 12 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7529&view=rev Log Message: ----------- Conform to axsl change: Remove no-longer-needed interface. Modified Paths: -------------- trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java trunk/foray/foray-areatree/src/java/org/foray/area/FOrayFOLinkage.java Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2006-06-12 14:48:38 UTC (rev 7528) +++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2006-06-12 14:52:02 UTC (rev 7529) @@ -26,7 +26,6 @@ import org.foray.common.OrderedTreeNode; -import org.axsl.areaW.FOLinkage; import org.axsl.areaW.PageArea; import org.axsl.common.Constants; import org.axsl.foR.FOContext; @@ -410,15 +409,6 @@ return true; } - public FOLinkage getFOLinkage(FObj foNode) { - FOrayFOLinkage linkage = (FOrayFOLinkage) foNode.getResult(); - if (linkage == null) { - linkage = new FOrayFOLinkage(foNode); - foNode.setResult(linkage); - } - return linkage; - } - /** * {@inheritDoc} */ Modified: trunk/foray/foray-areatree/src/java/org/foray/area/FOrayFOLinkage.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/FOrayFOLinkage.java 2006-06-12 14:48:38 UTC (rev 7528) +++ trunk/foray/foray-areatree/src/java/org/foray/area/FOrayFOLinkage.java 2006-06-12 14:52:02 UTC (rev 7529) @@ -26,8 +26,8 @@ import org.axsl.areaW.Area; import org.axsl.areaW.AreaNode; -import org.axsl.areaW.FOLinkage; import org.axsl.foR.FONode; +import org.axsl.foR.FONodeResult; import java.util.ArrayList; @@ -35,7 +35,7 @@ * <p>An implementation of {@link org.axsl.foR.FONodeProxy} suitable for use * with the FOray AreaTree.</p> */ -public class FOrayFOLinkage implements FOLinkage { +public class FOrayFOLinkage implements FONodeResult { /** The FONode which generated the Areas in {@link #generatedAreas}. */ private FONode realFONode; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-12 14:48:46
|
Revision: 7528 Author: victormote Date: 2006-06-12 07:48:38 -0700 (Mon, 12 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7528&view=rev Log Message: ----------- Remove no-longer-needed method. Modified Paths: -------------- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java 2006-06-12 14:45:40 UTC (rev 7527) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java 2006-06-12 14:48:38 UTC (rev 7528) @@ -26,7 +26,6 @@ import org.axsl.areaW.Area; import org.axsl.areaW.AreaWException; -import org.axsl.areaW.FOLinkage; import org.axsl.areaW.LineArea; import org.axsl.areaW.NormalBlockArea; import org.axsl.areaW.TableCellArea; @@ -259,16 +258,4 @@ return this.realFONode; } - public FOLinkage getFOLinkage() { - FONode foNode = this.getFONode(); - if (foNode == null) { - return null; - } - FOLinkage linkage = (FOLinkage) foNode.getResult(); - if (linkage == null) { - return null; - } - return linkage; - } - } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-12 14:45:50
|
Revision: 7527 Author: victormote Date: 2006-06-12 07:45:40 -0700 (Mon, 12 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7527&view=rev Log Message: ----------- Use new axsl method to remove dependency on FOLinkage interface. Modified Paths: -------------- trunk/foray/foray-pioneer/.classpath trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ContinuedLabelPL.java Modified: trunk/foray/foray-pioneer/.classpath =================================================================== --- trunk/foray/foray-pioneer/.classpath 2006-06-12 14:36:17 UTC (rev 7526) +++ trunk/foray/foray-pioneer/.classpath 2006-06-12 14:45:40 UTC (rev 7527) @@ -5,7 +5,6 @@ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="src" path="/axslFont-R"/> <classpathentry kind="src" path="/axslGraphic-R"/> - <classpathentry kind="src" path="/axslArea-R"/> <classpathentry kind="src" path="/axslArea-W"/> <classpathentry kind="src" path="/axslFO-R"/> <classpathentry kind="src" path="/axslCommon"/> Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ContinuedLabelPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ContinuedLabelPL.java 2006-06-12 14:36:17 UTC (rev 7526) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ContinuedLabelPL.java 2006-06-12 14:45:40 UTC (rev 7527) @@ -25,12 +25,10 @@ package org.foray.pioneer; import org.axsl.areaW.Area; - import org.axsl.areaW.AreaWException; -import org.axsl.areaW.FOLinkage; +import org.axsl.areaW.TableArea; import org.axsl.foR.FONode; import org.axsl.foR.extension.ContinuedLabel; -import org.axsl.foR.fo.Table; /** * @@ -60,9 +58,8 @@ } // See if ancestor table has generated any areas yet. - Table table = label.getNearestTable(area); - FOLinkage linkage = (FOLinkage) table.getResult(); - if (linkage != null && linkage.qtyAreasGenerated() > 0) { + TableArea tableArea = area.ancestorTableArea(); + if (tableArea != null && tableArea.getPreviousSibling() != null) { int numChildren = label.getChildren().size(); for (int i = getProgress(); i < numChildren; i++) { FONode fo = (FONode)label.getChildren().get(i); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-12 14:36:24
|
Revision: 7526 Author: victormote Date: 2006-06-12 07:36:17 -0700 (Mon, 12 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7526&view=rev Log Message: ----------- Conform to axsl change: Add method to get ancestor Table Area. Modified Paths: -------------- trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java trunk/foray/foray-areatree/src/java/org/foray/area/TableCellRA.java trunk/foray/foray-areatree/src/java/org/foray/area/TableRA.java Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2006-06-11 18:57:54 UTC (rev 7525) +++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2006-06-12 14:36:17 UTC (rev 7526) @@ -347,14 +347,25 @@ return ancestorLineArea(); } - public TableRA ancestorTableArea() { + /** + * The same as {@link #ancestorTableArea()}, except cast as the + * implementation instead of the interface (for internal AreaTree use). + */ + public TableRA ancestorTableRA() { AreaNode parent = getAreaNodeParent(); if (parent == null) { return null; } - return parent.ancestorTableArea(); + return parent.ancestorTableRA(); } + /** + * {@inheritDoc} + */ + public org.axsl.areaW.TableArea ancestorTableArea() { + return ancestorTableRA(); + } + public PageCollection ancestorPageCollection() { AreaNode parent = getAreaNodeParent(); if (parent == null) { Modified: trunk/foray/foray-areatree/src/java/org/foray/area/TableCellRA.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/TableCellRA.java 2006-06-11 18:57:54 UTC (rev 7525) +++ trunk/foray/foray-areatree/src/java/org/foray/area/TableCellRA.java 2006-06-12 14:36:17 UTC (rev 7526) @@ -141,7 +141,7 @@ * columns. */ public int getProgressionDimension() { - TableRA tableRA = this.ancestorTableArea(); + TableRA tableRA = this.ancestorTableRA(); int startingColumn = this.tableCellGeneratedBy().traitColumnNumber( this); int span = this.tableCellGeneratedBy().traitNumberColumnsSpanned(); Modified: trunk/foray/foray-areatree/src/java/org/foray/area/TableRA.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/TableRA.java 2006-06-11 18:57:54 UTC (rev 7525) +++ trunk/foray/foray-areatree/src/java/org/foray/area/TableRA.java 2006-06-12 14:36:17 UTC (rev 7526) @@ -75,7 +75,7 @@ /** * Overrides the AreaNode method, because this is the TableRA being sought. */ - public TableRA ancestorTableArea() { + public TableRA ancestorTableRA() { return this; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-11 18:58:00
|
Revision: 7525 Author: victormote Date: 2006-06-11 11:57:54 -0700 (Sun, 11 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7525&view=rev Log Message: ----------- Conform to axsl change: Add new HyphenBreak interface and method in Hyphenation to return one for a specific hyphen break. Modified Paths: -------------- trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/Hyphenation.java Modified: trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/Hyphenation.java =================================================================== --- trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/Hyphenation.java 2006-06-11 15:42:48 UTC (rev 7524) +++ trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/Hyphenation.java 2006-06-11 18:57:54 UTC (rev 7525) @@ -29,6 +29,7 @@ package org.foray.hyphenR; +import org.axsl.hyphenR.HyphenBreak; import org.axsl.hyphenR.HyphenationException; /** @@ -120,4 +121,12 @@ return liangValue; } + /** + * {@inheritDoc} + */ + public HyphenBreak getHyphenBreak(int index) { + /* TODO: Consider implementing this. */ + return null; + } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-11 15:42:55
|
Revision: 7524 Author: victormote Date: 2006-06-11 08:42:48 -0700 (Sun, 11 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7524&view=rev Log Message: ----------- Add to-do items for 32-bit input errors. Modified Paths: -------------- trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/HyphenationServer.java Modified: trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/HyphenationServer.java =================================================================== --- trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/HyphenationServer.java 2006-06-11 15:33:42 UTC (rev 7523) +++ trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/HyphenationServer.java 2006-06-11 15:42:48 UTC (rev 7524) @@ -289,6 +289,9 @@ /* TODO: After Java 5 is the minimum, use the standard String * constructor instead. */ String string = StringUtilPre5.newString(word, offset, len); + /* FIXME: The Hyphenation instance needs to know that it was created + * from an int[] instead of a char[], so that it can properly handle + * surrogate pairs (an int that would convert to 2 chars).*/ return this.hyphenate(string, offset, len, language, country, remainCount, pushCount, includeInhibitors); } @@ -346,6 +349,8 @@ * constructor instead. */ String string = StringUtilPre5.newString(characters, wordStart, (characters.length - wordStart)); + /* FIXME: Return value needs to be reduced by the number of surrogate + * pairs (an int that would convert to 2 chars) found.*/ return wordSize(string, wordStart, language, country); } @@ -396,6 +401,8 @@ * constructor instead. */ String string = StringUtilPre5.newString(characters, startIndex, (characters.length - startIndex)); + /* FIXME: Return value needs to be reduced by the number of surrogate + * pairs (an int that would convert to 2 chars) found.*/ return wordStarts(string, startIndex, language, country); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-11 15:33:49
|
Revision: 7523 Author: victormote Date: 2006-06-11 08:33:42 -0700 (Sun, 11 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7523&view=rev Log Message: ----------- Let the Liang conversion method take any positive input. Modified Paths: -------------- trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/Hyphenation.java Modified: trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/Hyphenation.java =================================================================== --- trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/Hyphenation.java 2006-06-10 22:38:30 UTC (rev 7522) +++ trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/Hyphenation.java 2006-06-11 15:33:42 UTC (rev 7523) @@ -29,6 +29,8 @@ package org.foray.hyphenR; +import org.axsl.hyphenR.HyphenationException; + /** * This class represents a hyphenated word. */ @@ -71,7 +73,12 @@ byte[] returnArray = new byte[this.hyphenValues.length]; for (int i = 0; i < this.hyphenValues.length; i++) { byte value = this.hyphenValues[i]; - returnArray[i] = convertLiangToWeight(value); + try { + returnArray[i] = convertLiangToWeight(value); + } catch (HyphenationException e) { + /* TODO: This exception should be passed upstream further. */ + returnArray[i] = Byte.MIN_VALUE; + } } return returnArray; } @@ -92,21 +99,25 @@ * In the Liang system, 1) even values are negative, 2) odd values are * positive, and the magnitude of the number conveys the magnitude of * the direction. - * @param liangValue A value in the range 0-5 that contains the Liang - * algorithm weight. - * @return A value in the range -2 to +3 that reflects the numeric weight - * of the raw Liang value. + * @param liangValue Any positive byte value that contains a Liang-style + * algorithm weight. (Liang input is only in the range 0 to 5, but we will + * handle any positive input). + * @return A value that reflects the numeric weight of the raw Liang value. */ - public static byte convertLiangToWeight(int liangValue) { - switch (liangValue) { - case 0: return 0; - case 1: return 1; - case 2: return -1; - case 3: return 2; - case 4: return -2; - case 5: return 3; - default: return Byte.MIN_VALUE; + public static byte convertLiangToWeight(byte liangValue) + throws HyphenationException { + if (liangValue < 0) { + throw new HyphenationException("Invalid Liang input: " + + liangValue); } + /* Save the low-order bit. */ + boolean good = (liangValue & 1) == 1; + liangValue ++; + liangValue /= 2; + if (! good) { + liangValue *= -1; + } + return liangValue; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-10 22:38:35
|
Revision: 7522 Author: victormote Date: 2006-06-10 15:38:30 -0700 (Sat, 10 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7522&view=rev Log Message: ----------- Conform to axsl change: Add method that returns the Liang input scheme weights, for backward compatibility. Modified Paths: -------------- trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/Hyphenation.java trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/HyphenationTree.java Modified: trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/Hyphenation.java =================================================================== --- trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/Hyphenation.java 2006-06-10 21:45:40 UTC (rev 7521) +++ trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/Hyphenation.java 2006-06-10 22:38:30 UTC (rev 7522) @@ -38,6 +38,7 @@ private int[] hyphenPoints; + /* Always store the weights using the Liang weights. */ private byte[] hyphenValues; Hyphenation(String word, int[] points, byte[] values) { @@ -56,10 +57,25 @@ /** * {@inheritDoc} */ - public byte[] getWeights() { + public byte[] getLiangWeights() { return this.hyphenValues; } + /** + * {@inheritDoc} + */ + public byte[] getWeights() { + if (this.hyphenValues == null) { + return null; + } + byte[] returnArray = new byte[this.hyphenValues.length]; + for (int i = 0; i < this.hyphenValues.length; i++) { + byte value = this.hyphenValues[i]; + returnArray[i] = convertLiangToWeight(value); + } + return returnArray; + } + public String toString() { StringBuffer str = new StringBuffer(); int start = 0; @@ -71,4 +87,26 @@ return str.toString(); } + /** + * Converts the raw value from the Liang data to a weighted value. + * In the Liang system, 1) even values are negative, 2) odd values are + * positive, and the magnitude of the number conveys the magnitude of + * the direction. + * @param liangValue A value in the range 0-5 that contains the Liang + * algorithm weight. + * @return A value in the range -2 to +3 that reflects the numeric weight + * of the raw Liang value. + */ + public static byte convertLiangToWeight(int liangValue) { + switch (liangValue) { + case 0: return 0; + case 1: return 1; + case 2: return -1; + case 3: return 2; + case 4: return -2; + case 5: return 3; + default: return Byte.MIN_VALUE; + } + } + } Modified: trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/HyphenationTree.java =================================================================== --- trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/HyphenationTree.java 2006-06-10 21:45:40 UTC (rev 7521) +++ trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/HyphenationTree.java 2006-06-10 22:38:30 UTC (rev 7522) @@ -304,32 +304,6 @@ } /** - * Converts the raw value from the Liang data to a weighted value. - * In the Liang system, 1) even values are negative, 2) odd values are - * positive, and the magnitude of the number conveys the magnitude of - * the direction. - * @param liangValue A value in the range 0-9 that contains the Liang - * algorithm weight. - * @return A value in the range -4 to +5 that reflects the numeric weight - * of the raw Liang value. - */ - public static byte convertLiangToWeight(int liangValue) { - switch (liangValue) { - case 0: return 0; - case 1: return 1; - case 2: return -1; - case 3: return 2; - case 4: return -2; - case 5: return 3; - case 6: return -3; - case 7: return 4; - case 8: return -4; - case 9: return 5; - default: return 0; - } - } - - /** * @param points * @param k * @return The new Hyphenation instance. @@ -408,20 +382,19 @@ } for (int i = 0; i < len; i++) { - int interletterValue = il[i + 1]; + byte interletterValue = il[i + 1]; boolean reportValue = reportValue(interletterValue, i, len, remainCharCount, pushCharCount, includeInhibitors); if (reportValue) { k++; result[k] = i; - byte weight = convertLiangToWeight(interletterValue); - values[k] = weight; + values[k] = interletterValue; } } return createHyphenation(theWord, result, values, k); } - private boolean reportValue(int interletterValue, int index, int length, + private boolean reportValue(byte interletterValue, int index, int length, int remainCharCount, int pushCharCount, boolean includeInhibitors) { /* Zeroes are never reported. */ if (interletterValue == 0) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-10 21:45:45
|
Revision: 7521 Author: victormote Date: 2006-06-10 14:45:40 -0700 (Sat, 10 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7521&view=rev Log Message: ----------- Conform to axsl change: Add overloaded versions of all methods to take int[] input. Modified Paths: -------------- trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/HyphenationServer.java Modified: trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/HyphenationServer.java =================================================================== --- trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/HyphenationServer.java 2006-06-10 21:24:35 UTC (rev 7520) +++ trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/HyphenationServer.java 2006-06-10 21:45:40 UTC (rev 7521) @@ -282,6 +282,17 @@ includeInhibitors); } + public org.axsl.hyphenR.Hyphenation hyphenate(int[] word, int offset, + int len, String language, String country, int remainCount, + int pushCount, boolean includeInhibitors) { + /* Convert to a String using the 32-bit ICU4J method. */ + /* TODO: After Java 5 is the minimum, use the standard String + * constructor instead. */ + String string = StringUtilPre5.newString(word, offset, len); + return this.hyphenate(string, offset, len, + language, country, remainCount, pushCount, includeInhibitors); + } + public Log getLogger() { return this.logger; } @@ -325,6 +336,22 @@ /** * {@inheritDoc} */ + public int wordSize(int[] characters, int wordStart, String language, + String country) { + if (characters == null) { + return 0; + } + /* Convert to a String using the 32-bit ICU4J method. */ + /* TODO: After Java 5 is the minimum, use the standard String + * constructor instead. */ + String string = StringUtilPre5.newString(characters, wordStart, + (characters.length - wordStart)); + return wordSize(string, wordStart, language, country); + } + + /** + * {@inheritDoc} + */ public int wordStarts(char[] characters, int startIndex, String language, String country) { if (characters == null) { @@ -359,4 +386,17 @@ language, country); } + public int wordStarts(int[] characters, int startIndex, + String language, String country) { + if (characters == null) { + return -1; + } + /* Convert to a String using the 32-bit ICU4J method. */ + /* TODO: After Java 5 is the minimum, use the standard String + * constructor instead. */ + String string = StringUtilPre5.newString(characters, startIndex, + (characters.length - startIndex)); + return wordStarts(string, startIndex, language, country); + } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-10 21:24:41
|
Revision: 7520 Author: victormote Date: 2006-06-10 14:24:35 -0700 (Sat, 10 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7520&view=rev Log Message: ----------- Conform to axsl changes: 1. Rename Hyphenation methods for brevity. 2. Add boolean to hyphenation that allows the client to either include or exclude the inhibitors. Modified Paths: -------------- trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/Hyphenation.java trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/HyphenationServer.java trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/HyphenationTree.java Modified: trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/Hyphenation.java =================================================================== --- trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/Hyphenation.java 2006-06-10 21:24:28 UTC (rev 7519) +++ trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/Hyphenation.java 2006-06-10 21:24:35 UTC (rev 7520) @@ -49,14 +49,14 @@ /** * {@inheritDoc} */ - public int[] getHyphenationPoints() { + public int[] getPoints() { return this.hyphenPoints; } /** * {@inheritDoc} */ - public byte[] getHyphenationWeights() { + public byte[] getWeights() { return this.hyphenValues; } Modified: trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/HyphenationServer.java =================================================================== --- trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/HyphenationServer.java 2006-06-10 21:24:28 UTC (rev 7519) +++ trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/HyphenationServer.java 2006-06-10 21:24:35 UTC (rev 7520) @@ -266,19 +266,20 @@ public org.axsl.hyphenR.Hyphenation hyphenate(CharSequence word, int offset, int len, String language, String country, int remainCount, - int pushCount) { + int pushCount, boolean includeInhibitors) { return this.hyphenate(word.toString().toCharArray(), offset, len, - language, country, remainCount, pushCount); + language, country, remainCount, pushCount, includeInhibitors); } public org.axsl.hyphenR.Hyphenation hyphenate(char[] word, int offset, int len, String language, String country, int remainCount, - int pushCount) { + int pushCount, boolean includeInhibitors) { HyphenationTree hTree = getHyphenationTree(language, country); if (hTree == null) { return null; } - return hTree.hyphenate(word, offset, len, remainCount, pushCount); + return hTree.hyphenate(word, offset, len, remainCount, pushCount, + includeInhibitors); } public Log getLogger() { Modified: trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/HyphenationTree.java =================================================================== --- trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/HyphenationTree.java 2006-06-10 21:24:28 UTC (rev 7519) +++ trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/HyphenationTree.java 2006-06-10 21:24:35 UTC (rev 7520) @@ -286,7 +286,7 @@ * the hyphenated word or null if word is not hyphenated. */ public org.axsl.hyphenR.Hyphenation hyphenate(char[] w, int offset, int len, - int remainCharCount, int pushCharCount) { + int remainCharCount, int pushCharCount, boolean includeInhibitors) { char[] word = normalizeWord(w, offset, len); if (word == null) { return null; @@ -299,7 +299,7 @@ return hyphenation; } hyphenation = checkAlgorithm(theWord, remainCharCount, pushCharCount, - word); + word, includeInhibitors); return hyphenation; } @@ -330,19 +330,19 @@ } /** - * @param result + * @param points * @param k * @return The new Hyphenation instance. */ - private Hyphenation createHyphenation(String theWord, int[] result, + private Hyphenation createHyphenation(String theWord, int[] points, byte[] values, int k) { if (k > 0) { // trim result array - int[] res = new int[k]; - System.arraycopy(result, 0, res, 0, k); - /* TODO: values needs to be populated. Also both positive and - * negative values should be returned. */ - return new Hyphenation(theWord, res, values); + int[] returnPoints = new int[k]; + System.arraycopy(points, 0, returnPoints, 0, k); + byte[] returnValues = new byte[k]; + System.arraycopy(values, 0, returnValues, 0, k); + return new Hyphenation(theWord, returnPoints, returnValues); } return null; } @@ -393,7 +393,7 @@ } private Hyphenation checkAlgorithm(String theWord, int remainCharCount, - int pushCharCount, char[] word) { + int pushCharCount, char[] word, boolean includeInhibitors) { int len = theWord.length(); // use algorithm to get hyphenation points int[] result = new int[len + 1]; @@ -407,12 +407,11 @@ searchPatterns(word, i, il); } - /* We report all of the non-zero values. */ for (int i = 0; i < len; i++) { int interletterValue = il[i + 1]; - if (interletterValue != 0 - && i >= remainCharCount - && i <= (len - pushCharCount)) { + boolean reportValue = reportValue(interletterValue, i, len, + remainCharCount, pushCharCount, includeInhibitors); + if (reportValue) { k++; result[k] = i; byte weight = convertLiangToWeight(interletterValue); @@ -422,6 +421,29 @@ return createHyphenation(theWord, result, values, k); } + private boolean reportValue(int interletterValue, int index, int length, + int remainCharCount, int pushCharCount, boolean includeInhibitors) { + /* Zeroes are never reported. */ + if (interletterValue == 0) { + return false; + } + if (index < remainCharCount) { + return false; + } + if (index > (length - pushCharCount)) { + return false; + } + if (includeInhibitors) { + return true; + } + /* If the value is odd, then it is not an inhibitor. */ + if ((interletterValue & 1) == 1) { + return true; + } + /* The value is an inhibitor and should not be included. */ + return false; + } + /** * Add a character class to the tree. It is used by * {@link PatternParser PatternParser} as callback to @@ -554,7 +576,7 @@ token = in.readLine().trim(); logger.info("Hyphenation points: "); logger.info(ht.hyphenate(token.toCharArray(), 0, token.length(), - minCharCount, minCharCount).toString()); + minCharCount, minCharCount, true).toString()); } else if (token.equals("b")) { if (ht == null) { logger.info("No patterns has been loaded."); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-10 21:24:33
|
Revision: 7519 Author: victormote Date: 2006-06-10 14:24:28 -0700 (Sat, 10 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7519&view=rev Log Message: ----------- Conform to axsl changes: 1. Rename Hyphenation methods for brevity. 2. Add boolean to hyphenation that allows the client to either include or exclude the inhibitors. Modified Paths: -------------- trunk/foray/foray-text/src/java/org/foray/text/line/solitary/SolitaryLineBreaker.java Modified: trunk/foray/foray-text/src/java/org/foray/text/line/solitary/SolitaryLineBreaker.java =================================================================== --- trunk/foray/foray-text/src/java/org/foray/text/line/solitary/SolitaryLineBreaker.java 2006-06-10 17:56:59 UTC (rev 7518) +++ trunk/foray/foray-text/src/java/org/foray/text/line/solitary/SolitaryLineBreaker.java 2006-06-10 21:24:28 UTC (rev 7519) @@ -369,7 +369,7 @@ Hyphenation hyph = server.hyphenate(wordToHyphenate, 0, wordToHyphenate.length(), language, country, this.currentLineText.inlineHyphenationRemainCount(), - this.currentLineText.inlineHyphenationPushCount()); + this.currentLineText.inlineHyphenationPushCount(), false); // If none, the word cannot be hyphenated. if (hyph == null) { return this.wordStart; @@ -382,7 +382,7 @@ return wordStart; } // Compute the number of characters that should be included. - int charsToInclude = hyph.getHyphenationPoints()[index]; + int charsToInclude = hyph.getPoints()[index]; // Add it and the non-word characters to the count to be returned. return wordStart + nonWordChars + charsToInclude; } @@ -395,8 +395,8 @@ int remainingWidth = this.currentLineWidthRemaining() - finalWidth - spaceWidth - getHyphenWidth(this.currentLineText); - int[] hyphenationPoints = hyph.getHyphenationPoints(); - byte[] hyphenationWeights = hyph.getHyphenationWeights(); + int[] hyphenationPoints = hyph.getPoints(); + byte[] hyphenationWeights = hyph.getWeights(); int index = -1; String wordBegin = ""; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-10 17:57:06
|
Revision: 7518 Author: victormote Date: 2006-06-10 10:56:59 -0700 (Sat, 10 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7518&view=rev Log Message: ----------- Remove unnecessary casts. Modified Paths: -------------- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FlowPL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java 2006-06-10 17:56:51 UTC (rev 7517) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java 2006-06-10 17:56:59 UTC (rev 7518) @@ -215,7 +215,7 @@ // It did not fit on the line. Create new line & try again. NormalBlockArea blockArea = (NormalBlockArea) lineArea.getWritableParentArea(); - lineArea = (LineArea) blockArea.createNextLineArea(false); + lineArea = blockArea.createNextLineArea(false); BlockPL blockPL = this.layout.getBlockPL(blockArea); blockPL.currentLineArea = lineArea; Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FlowPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FlowPL.java 2006-06-10 17:56:51 UTC (rev 7517) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FlowPL.java 2006-06-10 17:56:59 UTC (rev 7518) @@ -49,7 +49,7 @@ FObj nextFObj = (FObj) children.get(i); org.axsl.areaW.SpanRA span = pc.startingReferenceArea(lastFObj, nextFObj); - NormalFlowRA nf = (NormalFlowRA) span.normalFlowForNextFO(nextFObj); + NormalFlowRA nf = span.normalFlowForNextFO(nextFObj); this.getLayoutProxy(nextFObj).layout(nf); } return 0; Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2006-06-10 17:56:51 UTC (rev 7517) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2006-06-10 17:56:59 UTC (rev 7518) @@ -172,9 +172,8 @@ isBlankPage = true; } } - /* TODO: Remove cast from following line. */ - PageArea newPage = (PageArea) pageCollection.getNextPage(false, - false, isBlankPage); + PageArea newPage = pageCollection.getNextPage(false, false, + isBlankPage); setPendingFootnotes(newPage); currentPage = newPage; /* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-10 17:56:56
|
Revision: 7517 Author: victormote Date: 2006-06-10 10:56:51 -0700 (Sat, 10 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7517&view=rev Log Message: ----------- Remove unnecessary casts. Modified Paths: -------------- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Table.java Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Table.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Table.java 2006-06-10 17:56:43 UTC (rev 7516) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Table.java 2006-06-10 17:56:51 UTC (rev 7517) @@ -178,7 +178,7 @@ if (index < 0 || index > this.columns.length - 1) { return null; } - return (TableColumn) this.columns[index]; + return this.columns[index]; } public org.axsl.foR.fo.TableColumn[] getTableColumns() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-10 17:56:52
|
Revision: 7516 Author: victormote Date: 2006-06-10 10:56:43 -0700 (Sat, 10 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7516&view=rev Log Message: ----------- Remove unnecessary casts. Modified Paths: -------------- trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java trunk/foray/foray-areatree/src/java/org/foray/area/TableRA.java Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2006-06-10 17:39:45 UTC (rev 7515) +++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2006-06-10 17:56:43 UTC (rev 7516) @@ -133,7 +133,7 @@ } public org.axsl.areaW.Area getWritableParentArea() { - return (org.axsl.areaW.Area) getParentArea(); + return getParentArea(); } public Area getParentArea() { Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java 2006-06-10 17:39:45 UTC (rev 7515) +++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java 2006-06-10 17:56:43 UTC (rev 7516) @@ -179,7 +179,7 @@ public Area firstNormalAreaReturned(String id) { FObj fobj = retrieveId(id); FOrayFOLinkage proxy = getFObjProxy(fobj); - return (Area) proxy.firstNormalAreaReturned(); + return proxy.firstNormalAreaReturned(); } /** Modified: trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java 2006-06-10 17:39:45 UTC (rev 7515) +++ trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java 2006-06-10 17:56:43 UTC (rev 7516) @@ -74,7 +74,7 @@ } public org.axsl.areaW.PageCollection getWritablePageCollection() { - return (org.axsl.areaW.PageCollection) getAreaTreeParent(); + return getAreaTreeParent(); } private PageCollection getAreaTreeParent() { Modified: trunk/foray/foray-areatree/src/java/org/foray/area/TableRA.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/TableRA.java 2006-06-10 17:39:45 UTC (rev 7515) +++ trunk/foray/foray-areatree/src/java/org/foray/area/TableRA.java 2006-06-10 17:56:43 UTC (rev 7516) @@ -139,7 +139,7 @@ * units for each one. */ for (int i = 0; i < node.getTableColumns().length; i++) { - TableColumn column = (TableColumn) node.getTableColumns()[i]; + TableColumn column = node.getTableColumns()[i]; if (column == null) { getLogger().warn("No table-column specification for column " + (i + 1) + "."); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |