foray-commit Mailing List for FOray (Page 37)
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
(139) |
Apr
(98) |
May
(250) |
Jun
(394) |
Jul
(84) |
Aug
(13) |
Sep
(420) |
Oct
(186) |
Nov
(1) |
Dec
(3) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(108) |
Feb
(202) |
Mar
(291) |
Apr
(247) |
May
(374) |
Jun
(227) |
Jul
(231) |
Aug
(60) |
Sep
(31) |
Oct
(45) |
Nov
(18) |
Dec
|
| 2008 |
Jan
(38) |
Feb
(71) |
Mar
(142) |
Apr
|
May
(59) |
Jun
(6) |
Jul
(10) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2009 |
Jan
(12) |
Feb
(4) |
Mar
(88) |
Apr
(121) |
May
(17) |
Jun
(30) |
Jul
|
Aug
(5) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2010 |
Jan
(11) |
Feb
(76) |
Mar
(11) |
Apr
|
May
(11) |
Jun
|
Jul
|
Aug
(44) |
Sep
(14) |
Oct
(7) |
Nov
|
Dec
|
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(9) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(10) |
Nov
|
Dec
|
| 2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
(4) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(168) |
| 2017 |
Jan
(77) |
Feb
(11) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
(6) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
|
Feb
(88) |
Mar
(118) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(6) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(141) |
| 2021 |
Jan
(170) |
Feb
(20) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
(62) |
Nov
(189) |
Dec
(162) |
| 2022 |
Jan
(201) |
Feb
(118) |
Mar
(8) |
Apr
|
May
(2) |
Jun
(47) |
Jul
(19) |
Aug
(14) |
Sep
(3) |
Oct
|
Nov
(28) |
Dec
(235) |
| 2023 |
Jan
(112) |
Feb
(23) |
Mar
(2) |
Apr
(2) |
May
|
Jun
(1) |
Jul
|
Aug
(70) |
Sep
(92) |
Oct
(20) |
Nov
(1) |
Dec
(1) |
| 2024 |
Jan
|
Feb
|
Mar
(1) |
Apr
(1) |
May
(14) |
Jun
(11) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2025 |
Jan
(10) |
Feb
(29) |
Mar
|
Apr
(162) |
May
(245) |
Jun
(83) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
(2) |
Dec
|
|
From: <vic...@us...> - 2022-12-29 16:54:36
|
Revision: 12976
http://sourceforge.net/p/foray/code/12976
Author: victormote
Date: 2022-12-29 16:54:28 +0000 (Thu, 29 Dec 2022)
Log Message:
-----------
Add method returning PropertyId to each property test class.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/AbstractPropertyTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbsolutePositionTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ActiveStateTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AlignmentAdjustTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AlignmentBaselineTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AllowedHeightScaleTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AllowedWidthScaleTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AutoRestoreTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AzimuthTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundAttachmentTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundColorTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundImageTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundPositionHorizontalTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundPositionTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundPositionVerticalTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundRepeatTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BaselineShiftTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BlankOrNotBlankTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BlockProgressionDimensionTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderAfterColorTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderAfterPrecedenceTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderAfterStyleTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderAfterWidthTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderBeforeColorTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderBeforePrecedenceTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderBeforeStyleTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderBeforeWidthTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderBottomColorTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderBottomStyleTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderBottomTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderBottomWidthTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderCollapseTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderColorTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderEndColorTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderEndPrecedenceTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderEndStyleTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderEndWidthTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderLeftColorTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderLeftStyleTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderLeftTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderLeftWidthTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderRightColorTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderRightStyleTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderRightTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderRightWidthTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderSeparationTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderSpacingTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderStartColorTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderStartPrecedenceTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderStartStyleTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderStartWidthTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderStyleTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderTopColorTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderTopStyleTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderTopTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderTopWidthTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderWidthTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BottomTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BreakAfterTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BreakBeforeTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/CaptionSideTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/CaseNameTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/CaseTitleTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ChangeBarClassTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ChangeBarColorTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ChangeBarOffsetTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ChangeBarPlacementTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ChangeBarStyleTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ChangeBarWidthTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/CharacterTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ClearTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ClipTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ColorProfileNameTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ColorTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ColumnCountTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ColumnGapTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ColumnNumberTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ColumnWidthTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ContentHeightTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ContentTypeTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ContentWidthTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/CountryTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/CueAfterTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/CueBeforeTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/CueTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/DestinationPlacementOffsetTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/DirectionTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/DisplayAlignTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/DominantBaselineTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ElevationTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/EmptyCellsTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/EndIndentTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/EndsRowTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ExtentTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ExternalDestinationTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/FloatTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/FlowMapNameTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/FlowMapReferenceTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/FlowNameReferenceTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/FlowNameTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/FontFamilyTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/FontSelectionStrategyTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/FontSizeAdjustTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/FontSizeTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/FontStretchTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/FontStyleTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/FontTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/FontVariantTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/FontWeightTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ForcePageCountTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/FormatTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/GlyphOrientationHorizontalTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/GlyphOrientationVerticalTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/GroupingSeparatorTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/GroupingSizeTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/HeightTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/HyphenateTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/HyphenationCharacterTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/HyphenationKeepTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/HyphenationLadderCountTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/HyphenationPushCharacterCountTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/HyphenationRemainCharacterCountTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/IdTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/IndexClassTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/IndexKeyTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/IndicateDestinationTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/InitialPageNumberTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/InlineProgressionDimensionTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/InternalDestinationTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/IntrinsicScaleValueTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/IntrusionDisplaceTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/KeepTogetherTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/KeepWithNextTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/KeepWithPreviousTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/LanguageTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/LastLineEndIndentTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/LeaderAlignmentTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/LeaderLengthTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/LeaderPatternTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/LeaderPatternWidthTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/LeftTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/LetterSpacingTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/LetterValueTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/LineHeightShiftAdjustmentTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/LineHeightTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/LineStackingStrategyTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/LinefeedTreatmentTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/MarginBottomTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/MarginLeftTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/MarginRightTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/MarginTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/MarginTopTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/MarkerClassNameTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/MasterNameTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/MasterReferenceTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/MaxHeightTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/MaxWidthTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/MaximumRepeatsTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/MediaUsageTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/MergePagesAcrossIndexKeyReferencesTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/MergeRangesAcrossIndexKeyReferencesTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/MergeSequentialPageNumbersTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/MinHeightTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/MinWidthTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/NumberColumnsRepeatedTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/NumberColumnsSpannedTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/NumberRowsSpannedTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/OddOrEvenTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/OrphansTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/OverflowTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PaddingAfterTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PaddingBeforeTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PaddingBottomTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PaddingEndTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PaddingLeftTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PaddingRightTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PaddingStartTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PaddingTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PaddingTopTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PageBreakAfterTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PageBreakBeforeTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PageBreakInsideTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PageCitationStrategyTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PageHeightTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PageNumberTreatmentTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PagePositionTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PageWidthTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PauseAfterTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PauseBeforeTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PauseTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PitchRangeTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PitchTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PlayDuringTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PositionTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PrecedenceTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ProvisionalDistanceBetweenStartsTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ProvisionalLabelSeparationTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/RefIdTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/RefIndexKeyTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ReferenceOrientationTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/RegionNameReferenceTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/RegionNameTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/RelativeAlignTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/RelativePositionTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/RenderingIntentTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/RetrieveBoundaryTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/RetrieveBoundaryWithinTableTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/RetrieveClassNameTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/RetrievePositionTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/RetrievePositionWithinTableTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/RichnessTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/RightTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/RoleTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/RuleStyleTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/RuleThicknessTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ScaleOptionTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ScalingMethodTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ScalingTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ScoreSpacesTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ScriptTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ShowDestinationTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/SizeTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/SourceDocumentTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/SpaceAfterTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/SpaceBeforeTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/SpaceEndTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/SpaceStartTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/SpanTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/SpeakHeaderTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/SpeakNumeralTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/SpeakPunctuationTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/SpeakTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/SpeechRateTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/SrcTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/StartIndentTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/StartingStateTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/StartsRowTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/StressTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/SuppressAtLineBreakTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/SwitchToTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TableLayoutTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TableOmitFooterAtBreakTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TableOmitHeaderAtBreakTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TargetPresentationContextTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TargetProcessingContextTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TargetStylesheetTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TextAlignLastTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TextAlignTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TextAltitudeTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TextDecorationTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TextDepthTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TextIndentTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TextShadowTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TextTransformTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TopTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TreatAsWordSpaceTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/UnicodeBidiTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/VerticalAlignTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/VisibilityTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/VoiceFamilyTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/VolumeTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/WhiteSpaceCollapseTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/WhiteSpaceTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/WhiteSpaceTreatmentTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/WidowsTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/WidthTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/WordSpacingTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/WrapOptionTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/WritingModeTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ZindexTests.java
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/AbstractPropertyTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/AbstractPropertyTests.java 2022-12-29 13:01:44 UTC (rev 12975)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/AbstractPropertyTests.java 2022-12-29 16:54:28 UTC (rev 12976)
@@ -201,6 +201,12 @@
}
/**
+ * Returns the {@link PropertyId} of the property being tested in this class.
+ * @return The {@link PropertyId} of the property being tested in this class.
+ */
+ protected abstract PropertyId getPropertyId();
+
+ /**
* Parses an attribute value and returns the property value created.
* @param attributeValue The attribute value to be parsed.
* @return The newly-created Property.
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbsolutePositionTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbsolutePositionTests.java 2022-12-29 13:01:44 UTC (rev 12975)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbsolutePositionTests.java 2022-12-29 16:54:28 UTC (rev 12976)
@@ -30,6 +30,8 @@
import org.foray.fotree.AbstractPropertyTests;
import org.foray.fotree.PropertyException;
+import org.foray.fotree.PropertyId;
+import org.foray.fotree.fo.FoPropertyId;
/**
* JUnit test class for the class {@link PdAbsolutePosition}.
@@ -37,6 +39,11 @@
public class AbsolutePositionTests extends AbstractPropertyTests {
@Override
+ protected PropertyId getPropertyId() {
+ return FoPropertyId.ABSOLUTE_POSITION;
+ }
+
+ @Override
protected PdAbsolutePosition createProperty(final String attributeValue) throws PropertyException {
final PdAbsolutePosition property = new PdAbsolutePosition(attributeValue);
return property;
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ActiveStateTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ActiveStateTests.java 2022-12-29 13:01:44 UTC (rev 12975)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ActiveStateTests.java 2022-12-29 16:54:28 UTC (rev 12976)
@@ -30,6 +30,8 @@
import org.foray.fotree.AbstractPropertyTests;
import org.foray.fotree.PropertyException;
+import org.foray.fotree.PropertyId;
+import org.foray.fotree.fo.FoPropertyId;
/**
* JUnit test class for the class {@link PdActiveState}.
@@ -37,6 +39,11 @@
public class ActiveStateTests extends AbstractPropertyTests {
@Override
+ protected PropertyId getPropertyId() {
+ return FoPropertyId.ACTIVE_STATE;
+ }
+
+ @Override
protected PdActiveState createProperty(final String attributeValue) throws PropertyException {
final PdActiveState property = new PdActiveState(attributeValue);
return property;
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AlignmentAdjustTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AlignmentAdjustTests.java 2022-12-29 13:01:44 UTC (rev 12975)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AlignmentAdjustTests.java 2022-12-29 16:54:28 UTC (rev 12976)
@@ -31,6 +31,8 @@
import org.foray.fotree.AbstractPropertyTests;
import org.foray.fotree.FoObj;
import org.foray.fotree.PropertyException;
+import org.foray.fotree.PropertyId;
+import org.foray.fotree.fo.FoPropertyId;
import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.Test;
@@ -41,6 +43,11 @@
public class AlignmentAdjustTests extends AbstractPropertyTests implements CmpLengthTests {
@Override
+ protected PropertyId getPropertyId() {
+ return FoPropertyId.ALIGNMENT_ADJUST;
+ }
+
+ @Override
protected PdAlignmentAdjust createProperty(final String attributeValue) throws PropertyException {
final PdAlignmentAdjust property = new PdAlignmentAdjust(attributeValue);
return property;
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AlignmentBaselineTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AlignmentBaselineTests.java 2022-12-29 13:01:44 UTC (rev 12975)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AlignmentBaselineTests.java 2022-12-29 16:54:28 UTC (rev 12976)
@@ -30,6 +30,8 @@
import org.foray.fotree.AbstractPropertyTests;
import org.foray.fotree.PropertyException;
+import org.foray.fotree.PropertyId;
+import org.foray.fotree.fo.FoPropertyId;
/**
* JUnit test class for the class {@link PdAlignmentBaseline}.
@@ -37,6 +39,11 @@
public class AlignmentBaselineTests extends AbstractPropertyTests {
@Override
+ protected PropertyId getPropertyId() {
+ return FoPropertyId.ALIGNMENT_BASELINE;
+ }
+
+ @Override
protected PdAlignmentBaseline createProperty(final String attributeValue) throws PropertyException {
final PdAlignmentBaseline property = new PdAlignmentBaseline(attributeValue);
return property;
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AllowedHeightScaleTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AllowedHeightScaleTests.java 2022-12-29 13:01:44 UTC (rev 12975)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AllowedHeightScaleTests.java 2022-12-29 16:54:28 UTC (rev 12976)
@@ -30,6 +30,8 @@
import org.foray.fotree.AbstractPropertyTests;
import org.foray.fotree.PropertyException;
+import org.foray.fotree.PropertyId;
+import org.foray.fotree.fo.FoPropertyId;
/**
* JUnit test class for the class {@link PdAllowedHeightScale}.
@@ -37,6 +39,11 @@
public class AllowedHeightScaleTests extends AbstractPropertyTests {
@Override
+ protected PropertyId getPropertyId() {
+ return FoPropertyId.ALLOWED_HEIGHT_SCALE;
+ }
+
+ @Override
protected PdAllowedHeightScale createProperty(final String attributeValue)
throws PropertyException {
final PdAllowedHeightScale property = new PdAllowedHeightScale(attributeValue);
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AllowedWidthScaleTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AllowedWidthScaleTests.java 2022-12-29 13:01:44 UTC (rev 12975)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AllowedWidthScaleTests.java 2022-12-29 16:54:28 UTC (rev 12976)
@@ -30,6 +30,8 @@
import org.foray.fotree.AbstractPropertyTests;
import org.foray.fotree.PropertyException;
+import org.foray.fotree.PropertyId;
+import org.foray.fotree.fo.FoPropertyId;
/**
* JUnit test class for the class {@link PdAllowedWidthScale}.
@@ -37,6 +39,11 @@
public class AllowedWidthScaleTests extends AbstractPropertyTests {
@Override
+ protected PropertyId getPropertyId() {
+ return FoPropertyId.ALLOWED_WIDTH_SCALE;
+ }
+
+ @Override
protected PdAllowedWidthScale createProperty(final String attributeValue)
throws PropertyException {
final PdAllowedWidthScale property = new PdAllowedWidthScale(attributeValue);
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AutoRestoreTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AutoRestoreTests.java 2022-12-29 13:01:44 UTC (rev 12975)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AutoRestoreTests.java 2022-12-29 16:54:28 UTC (rev 12976)
@@ -30,6 +30,8 @@
import org.foray.fotree.AbstractPropertyTests;
import org.foray.fotree.PropertyException;
+import org.foray.fotree.PropertyId;
+import org.foray.fotree.fo.FoPropertyId;
/**
* JUnit test class for the class {@link PdAutoRestore}.
@@ -37,6 +39,11 @@
public class AutoRestoreTests extends AbstractPropertyTests {
@Override
+ protected PropertyId getPropertyId() {
+ return FoPropertyId.AUTO_RESTORE;
+ }
+
+ @Override
protected PdAutoRestore createProperty(final String attributeValue) throws PropertyException {
final PdAutoRestore property = new PdAutoRestore(attributeValue);
return property;
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AzimuthTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AzimuthTests.java 2022-12-29 13:01:44 UTC (rev 12975)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AzimuthTests.java 2022-12-29 16:54:28 UTC (rev 12976)
@@ -30,6 +30,8 @@
import org.foray.fotree.AbstractPropertyTests;
import org.foray.fotree.PropertyException;
+import org.foray.fotree.PropertyId;
+import org.foray.fotree.fo.FoPropertyId;
/**
* JUnit test class for the class {@link PdAzimuth}.
@@ -37,6 +39,11 @@
public class AzimuthTests extends AbstractPropertyTests {
@Override
+ protected PropertyId getPropertyId() {
+ return FoPropertyId.AZIMUTH;
+ }
+
+ @Override
protected PdAzimuth createProperty(final String attributeValue) throws PropertyException {
final PdAzimuth property = new PdAzimuth(attributeValue);
return property;
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundAttachmentTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundAttachmentTests.java 2022-12-29 13:01:44 UTC (rev 12975)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundAttachmentTests.java 2022-12-29 16:54:28 UTC (rev 12976)
@@ -30,6 +30,8 @@
import org.foray.fotree.AbstractPropertyTests;
import org.foray.fotree.PropertyException;
+import org.foray.fotree.PropertyId;
+import org.foray.fotree.fo.FoPropertyId;
/**
* JUnit test class for the class {@link PdBackgroundAttachment}.
@@ -37,6 +39,11 @@
public class BackgroundAttachmentTests extends AbstractPropertyTests {
@Override
+ protected PropertyId getPropertyId() {
+ return FoPropertyId.BACKGROUND_ATTACHMENT;
+ }
+
+ @Override
protected PdBackgroundAttachment createProperty(final String attributeValue) throws PropertyException {
final PdBackgroundAttachment property = new PdBackgroundAttachment(attributeValue);
return property;
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundColorTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundColorTests.java 2022-12-29 13:01:44 UTC (rev 12975)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundColorTests.java 2022-12-29 16:54:28 UTC (rev 12976)
@@ -30,6 +30,8 @@
import org.foray.fotree.AbstractPropertyTests;
import org.foray.fotree.PropertyException;
+import org.foray.fotree.PropertyId;
+import org.foray.fotree.fo.FoPropertyId;
/**
* JUnit test class for the class {@link PdBackgroundColor}.
@@ -37,6 +39,11 @@
public class BackgroundColorTests extends AbstractPropertyTests {
@Override
+ protected PropertyId getPropertyId() {
+ return FoPropertyId.BACKGROUND_COLOR;
+ }
+
+ @Override
protected PdBackgroundColor createProperty(final String attributeValue) throws PropertyException {
final PdBackgroundColor property = new PdBackgroundColor(attributeValue);
return property;
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundImageTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundImageTests.java 2022-12-29 13:01:44 UTC (rev 12975)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundImageTests.java 2022-12-29 16:54:28 UTC (rev 12976)
@@ -30,6 +30,8 @@
import org.foray.fotree.AbstractPropertyTests;
import org.foray.fotree.PropertyException;
+import org.foray.fotree.PropertyId;
+import org.foray.fotree.fo.FoPropertyId;
/**
* JUnit test class for the class {@link PdBackgroundImage}.
@@ -37,6 +39,11 @@
public class BackgroundImageTests extends AbstractPropertyTests {
@Override
+ protected PropertyId getPropertyId() {
+ return FoPropertyId.BACKGROUND_IMAGE;
+ }
+
+ @Override
protected PdBackgroundImage createProperty(final String attributeValue) throws PropertyException {
final PdBackgroundImage property = new PdBackgroundImage(attributeValue);
return property;
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundPositionHorizontalTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundPositionHorizontalTests.java 2022-12-29 13:01:44 UTC (rev 12975)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundPositionHorizontalTests.java 2022-12-29 16:54:28 UTC (rev 12976)
@@ -29,6 +29,8 @@
package org.foray.fotree.fo.prop;
import org.foray.fotree.PropertyException;
+import org.foray.fotree.PropertyId;
+import org.foray.fotree.fo.FoPropertyId;
/**
* JUnit test class for the class {@link PdBackgroundPositionHorizontal}.
@@ -37,6 +39,11 @@
extends AbstractBackgroundPositionTests {
@Override
+ protected PropertyId getPropertyId() {
+ return FoPropertyId.BACKGROUND_POSITION_HORIZONTAL;
+ }
+
+ @Override
protected PdBackgroundPositionHorizontal createProperty(final String attributeValue) throws PropertyException {
final PdBackgroundPositionHorizontal property =
new PdBackgroundPositionHorizontal(attributeValue);
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundPositionTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundPositionTests.java 2022-12-29 13:01:44 UTC (rev 12975)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundPositionTests.java 2022-12-29 16:54:28 UTC (rev 12976)
@@ -30,6 +30,8 @@
import org.foray.fotree.AbstractPropertyTests;
import org.foray.fotree.PropertyException;
+import org.foray.fotree.PropertyId;
+import org.foray.fotree.fo.FoPropertyId;
/**
* JUnit test class for the class {@link PdBackgroundPosition}.
@@ -37,6 +39,11 @@
public class BackgroundPositionTests extends AbstractPropertyTests {
@Override
+ protected PropertyId getPropertyId() {
+ return FoPropertyId.BACKGROUND_POSITION;
+ }
+
+ @Override
protected PdBackgroundPosition createProperty(final String attributeValue) throws PropertyException {
final PdBackgroundPosition property = new PdBackgroundPosition(attributeValue);
return property;
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundPositionVerticalTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundPositionVerticalTests.java 2022-12-29 13:01:44 UTC (rev 12975)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundPositionVerticalTests.java 2022-12-29 16:54:28 UTC (rev 12976)
@@ -29,6 +29,8 @@
package org.foray.fotree.fo.prop;
import org.foray.fotree.PropertyException;
+import org.foray.fotree.PropertyId;
+import org.foray.fotree.fo.FoPropertyId;
/**
* JUnit test class for the class {@link PdBackgroundPositionVertical}.
@@ -37,6 +39,11 @@
extends AbstractBackgroundPositionTests {
@Override
+ protected PropertyId getPropertyId() {
+ return FoPropertyId.BACKGROUND_POSITION_VERTICAL;
+ }
+
+ @Override
protected PdBackgroundPositionVertical createProperty(final String attributeValue) throws PropertyException {
final PdBackgroundPositionVertical property =
new PdBackgroundPositionVertical(attributeValue);
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundRepeatTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundRepeatTests.java 2022-12-29 13:01:44 UTC (rev 12975)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundRepeatTests.java 2022-12-29 16:54:28 UTC (rev 12976)
@@ -30,6 +30,8 @@
import org.foray.fotree.AbstractPropertyTests;
import org.foray.fotree.PropertyException;
+import org.foray.fotree.PropertyId;
+import org.foray.fotree.fo.FoPropertyId;
/**
* JUnit test class for the class {@link PdBackgroundRepeat}.
@@ -37,6 +39,11 @@
public class BackgroundRepeatTests extends AbstractPropertyTests {
@Override
+ protected PropertyId getPropertyId() {
+ return FoPropertyId.BACKGROUND_REPEAT;
+ }
+
+ @Override
protected PdBackgroundRepeat createProperty(final String attributeValue) throws PropertyException {
final PdBackgroundRepeat property = new PdBackgroundRepeat(attributeValue);
return property;
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundTests.java 2022-12-29 13:01:44 UTC (rev 12975)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundTests.java 2022-12-29 16:54:28 UTC (rev 12976)
@@ -30,6 +30,8 @@
import org.foray.fotree.AbstractPropertyTests;
import org.foray.fotree.PropertyException;
+import org.foray.fotree.PropertyId;
+import org.foray.fotree.fo.FoPropertyId;
/**
* JUnit test class for the class {@link PdBackground}.
@@ -37,6 +39,11 @@
public class BackgroundTests extends AbstractPropertyTests {
@Override
+ protected PropertyId getPropertyId() {
+ return FoPropertyId.BACKGROUND;
+ }
+
+ @Override
protected PdBackground createProperty(final String attributeValue) throws PropertyException {
final PdBackground property = new PdBackground("", attributeValue);
return property;
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BaselineShiftTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BaselineShiftTests.java 2022-12-29 13:01:44 UTC (rev 12975)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BaselineShiftTests.java 2022-12-29 16:54:28 UTC (rev 12976)
@@ -31,6 +31,8 @@
import org.foray.fotree.AbstractPropertyTests;
import org.foray.fotree.FoObj;
import org.foray.fotree.PropertyException;
+import org.foray.fotree.PropertyId;
+import org.foray.fotree.fo.FoPropertyId;
import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.Test;
@@ -42,6 +44,11 @@
implements CmpLengthTests {
@Override
+ protected PropertyId getPropertyId() {
+ return FoPropertyId.BASELINE_SHIFT;
+ }
+
+ @Override
protected PdBaselineShift createProperty(final String attributeValue) throws PropertyException {
final PdBaselineShift property = new PdBaselineShift(attributeValue);
return property;
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BlankOrNotBlankTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BlankOrNotBlankTests.java 2022-12-29 13:01:44 UTC (rev 12975)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BlankOrNotBlankTests.java 2022-12-29 16:54:28 UTC (rev 12976)
@@ -30,6 +30,8 @@
import org.foray.fotree.AbstractPropertyTests;
import org.foray.fotree.PropertyException;
+import org.foray.fotree.PropertyId;
+import org.foray.fotree.fo.FoPropertyId;
/**
* JUnit test class for the class {@link PdBlankOrNotBlank}.
@@ -37,6 +39,11 @@
public class BlankOrNotBlankTests extends AbstractPropertyTests {
@Override
+ protected PropertyId getPropertyId() {
+ return FoPropertyId.BLANK_OR_NOT_BLANK;
+ }
+
+ @Override
protected PdBlankOrNotBlank createProperty(final String attributeValue) throws PropertyException {
final PdBlankOrNotBlank property = new PdBlankOrNotBlank(attributeValue);
return property;
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BlockProgressionDimensionTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BlockProgressionDimensionTests.java 2022-12-29 13:01:44 UTC (rev 12975)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BlockProgressionDimensionTests.java 2022-12-29 16:54:28 UTC (rev 12976)
@@ -29,6 +29,8 @@
package org.foray.fotree.fo.prop;
import org.foray.fotree.PropertyException;
+import org.foray.fotree.PropertyId;
+import org.foray.fotree.fo.FoPropertyId;
/**
* JUnit test class for the class {@link PdBlockProgressionDimension}.
@@ -37,6 +39,11 @@
extends RelativeDimensionTests {
@Override
+ protected PropertyId getPropertyId() {
+ return FoPropertyId.BLOCK_PROGRESSION_DIMENSION;
+ }
+
+ @Override
protected PdBlockProgressionDimension createProperty(final String attributeValue) throws PropertyException {
final PdBlockProgressionDimension property =
new PdBlockProgressionDimension(attributeValue);
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderAfterColorTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderAfterColorTests.java 2022-12-29 13:01:44 UTC (rev 12975)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderAfterColorTests.java 2022-12-29 16:54:28 UTC (rev 12976)
@@ -30,6 +30,8 @@
import org.foray.fotree.AbstractPropertyTests;
import org.foray.fotree.PropertyException;
+import org.foray.fotree.PropertyId;
+import org.foray.fotree.fo.FoPropertyId;
/**
* JUnit test class for the class {@link PdBorderAfterColor}.
@@ -37,6 +39,11 @@
public class BorderAfterColorTests extends AbstractPropertyTests {
@Override
+ protected PropertyId getPropertyId() {
+ return FoPropertyId.BORDER_AFTER_COLOR;
+ }
+
+ @Override
protected PdBorderAfterColor createProperty(final String attributeValue) throws PropertyException {
final PdBorderAfterColor property = new PdBorderAfterColor(attributeValue);
return property;
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderAfterPrecedenceTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderAfterPrecedenceTests.java 2022-12-29 13:01:44 UTC (rev 12975)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderAfterPrecedenceTests.java 2022-12-29 16:54:28 UTC (rev 12976)
@@ -30,6 +30,8 @@
import org.foray.fotree.AbstractPropertyTests;
import org.foray.fotree.PropertyException;
+import org.foray.fotree.PropertyId;
+import org.foray.fotree.fo.FoPropertyId;
/**
* JUnit test class for the class {@link PdBorderAfterPrecedence}.
@@ -37,6 +39,11 @@
public class BorderAfterPrecedenceTests extends AbstractPropertyTests {
@Override
+ protected PropertyId getPropertyId() {
+ return FoPropertyId.BORDER_AFTER_PRECEDENCE;
+ }
+
+ @Override
protected PdBorderAfterPrecedence createProperty(final String attributeValue) throws PropertyException {
final PdBorderAfterPrecedence property = new PdBorderAfterPrecedence(attributeValue);
return property;
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderAfterStyleTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderAfterStyleTests.java 2022-12-29 13:01:44 UTC (rev 12975)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderAfterStyleTests.java 2022-12-29 16:54:28 UTC (rev 12976)
@@ -30,6 +30,8 @@
import org.foray.fotree.AbstractPropertyTests;
import org.foray.fotree.PropertyException;
+import org.foray.fotree.PropertyId;
+import org.foray.fotree.fo.FoPropertyId;
/**
* JUnit test class for the class {@link PdBorderAfterStyle}.
@@ -37,6 +39,11 @@
public class BorderAfterStyleTests extends AbstractPropertyTests {
@Override
+ protected PropertyId getPropertyId() {
+ return FoPropertyId.BORDER_AFTER_STYLE;
+ }
+
+ @Override
protected PdBorderAfterStyle createProperty(final String attributeValue) throws PropertyException {
final PdBorderAfterStyle property = new PdBorderAfterStyle(attributeValue);
return property;
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderAfterWidthTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderAfterWidthTests.java 2022-12-29 13:01:44 UTC (rev 12975)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderAfterWidthTests.java 2022-12-29 16:54:28 UTC (rev 12976)
@@ -29,6 +29,8 @@
package org.foray.fotree.fo.prop;
import org.foray.fotree.PropertyException;
+import org.foray.fotree.PropertyId;
+import org.foray.fotree.fo.FoPropertyId;
/**
* JUnit test class for the class {@link PdBorderAfterWidth}.
@@ -36,6 +38,11 @@
public class BorderAfterWidthTests extends AbstractBorderWidthTests {
@Override
+ protected PropertyId getPropertyId() {
+ return FoPropertyId.BORDER_AFTER_WIDTH;
+ }
+
+ @Override
protected PdBorderAfterWidth createProperty(final String attributeValue) throws PropertyException {
final PdBorderAfterWidth property = new PdBorderAfterWidth(attributeValue);
return property;
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderBeforeColorTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderBeforeColorTests.java 2022-12-29 13:01:44 UTC (rev 12975)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderBeforeColorTests.java 2022-12-29 16:54:28 UTC (rev 12976)
@@ -30,6 +30,8 @@
import org.foray.fotree.AbstractPropertyTests;
import org.foray.fotree.PropertyException;
+import org.foray.fotree.PropertyId;
+import org.foray.fotree.fo.FoPropertyId;
/**
* JUnit test class for the class {@link PdBorderBeforeColor}.
@@ -37,6 +39,11 @@
public class BorderBeforeColorTests extends AbstractPropertyTests {
@Override
+ protected PropertyId getPropertyId() {
+ return FoPropertyId.BORDER_BEFORE_COLOR;
+ }
+
+ @Override
protected PdBorderBeforeColor createProperty(final String attributeValue) throws PropertyException {
final PdBorderBeforeColor property = new PdBorderBeforeColor(attributeValue);
return property;
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderBeforePrecedenceTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderBeforePrecedenceTests.java 2022-12-29 13:01:44 UTC (rev 12975)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderBeforePrecedenceTests.java 2022-12-29 16:54:28 UTC (rev 12976)
@@ -30,6 +30,8 @@
import org.foray.fotree.AbstractPropertyTests;
import org.foray.fotree.PropertyException;
+import org.foray.fotree.PropertyId;
+import org.foray.fotree.fo.FoPropertyId;
/**
* JUnit test class for the class {@link PdBorderBeforePrecedence}.
@@ -37,6 +39,11 @@
public class BorderBeforePrecedenceTests extends AbstractPropertyTests {
@Override
+ protected PropertyId getPropertyId() {
+ return FoPropertyId.BORDER_BEFORE_PRECEDENCE;
+ }
+
+ @Override
protected PdBorderBeforePrecedence createProperty(final String attributeValue) throws PropertyException {
final PdBorderBeforePrecedence property = new PdBorderBeforePrecedence(attributeValue);
return property;
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderBeforeStyleTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderBeforeStyleTests.java 2022-12-29 13:01:44 UTC (rev 12975)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderBeforeStyleTests.java 2022-12-29 16:54:28 UTC (rev 12976)
@@ -30,6 +30,8 @@
import org.foray.fotree.AbstractPropertyTests;
import org.foray.fotree.PropertyException;
+import org.foray.fotree.PropertyId;
+import org.foray.fotree.fo.FoPropertyId;
/**
* JUnit test class for the class {@link PdBorderBeforeStyle}.
@@ -37,6 +39,11 @@
public class BorderBeforeStyleTests extends AbstractPropertyTests {
@Override
+ protected PropertyId getPropertyId() {
+ return FoPropertyId.BORDER_BEFORE_STYLE;
+ }
+
+ @Override
protected PdBorderBeforeStyle createProperty(final String attributeValue) throws PropertyException {
final PdBorderBeforeStyle property = new PdBorderBeforeStyle(attributeValue);
return property;
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderBeforeWidthTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderBeforeWidthTests.java 2022-12-29 13:01:44 UTC (rev 12975)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderBeforeWidthTests.java 2022-12-29 16:54:28 UTC (rev 12976)
@@ -29,6 +29,8 @@
package org.foray.fotree.fo.prop;
import org.foray.fotree.PropertyException;
+import org.foray.fotree.PropertyId;
+import org.foray.fotree.fo.FoPropertyId;
/**
* JUnit test class for the class {@link PdBorderBeforeWidth}.
@@ -36,6 +38,11 @@
public class BorderBeforeWidthTests extends AbstractBorderWidthTests {
@Override
+ protected PropertyId getPropertyId() {
+ return FoPropertyId.BORDER_BEFORE_WIDTH;
+ }
+
+ @Override
protected PdBorderBeforeWidth createProperty(final String attributeValue) throws PropertyException {
final PdBorderBeforeWidth property = new PdBorderBeforeWidth(attributeValue);
return property;
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderBottomColorTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderBottomColorTests.java 2022-12-29 13:01:44 UTC (rev 12975)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderBottomColorTests.java 2022-12-29 16:54:28 UTC (rev 12976)
@@ -30,6 +30,8 @@
import org.foray.fotree.AbstractPropertyTests;
import org.foray.fotree.PropertyException;
+import org.foray.fotree.PropertyId;
+import org.foray.fotree.fo.FoPropertyId;
/**
* JUnit test class for the class {@link PdBorderBottomColor}.
@@ -37,6 +39,11 @@
public class BorderBottomColorTests extends AbstractPropertyTests {
@Override
+ protected PropertyId getPropertyId() {
+ return FoPropertyId.BORDER_BOTTOM_COLOR;
+ }
+
+ @Override
protected PdBorderBottomColor createProperty(final String attributeValue) throws PropertyException {
final PdBorderBottomColor property = new PdBorderBottomColor(attributeValue);
return property;
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderBottomStyleTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderBottomStyleTests.java 2022-12-29 13:01:44 UTC (rev 12975)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderBottomStyleTests.java 2022-12-29 16:54:28 UTC (rev 12976)
@@ -30,6 +30,8 @@
import org.foray.fotree.AbstractPropertyTests;
import org.foray.fotree.PropertyException;
+import org.foray.fotree.PropertyId;
+import org.foray.fotree.fo.FoPropertyId;
/**
* JUnit test class for the class {@link PdBorderBottomStyle}.
@@ -37,6 +39,11 @@
public class BorderBottomStyleTests extends AbstractPropertyTests {
@Override
+ protected PropertyId getPropertyId() {
+ return FoPropertyId.BORDER_BOTTOM_STYLE;
+ }
+
+ @Override
protected PdBorderBottomStyle createProperty(final String attributeValue) throws PropertyException {
final PdBorderBottomStyle property = new PdBorderBottomStyle(attributeValue);
return property;
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderBottomTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderBottomTests.java 2022-12-29 13:01:44 UTC (rev 12975)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderBottomTests.java 2022-12-29 16:54:28 UTC (rev 12976)
@@ -30,6 +30,8 @@
import org.foray.fotree.AbstractPropertyTests;
import org.foray.fotree.PropertyException;
+import org.foray.fotree.PropertyId;
+import org.foray.fotree.fo.FoPropertyId;
/**
* JUnit test class for the class {@link PdBorderBottom}.
@@ -37,6 +39,11 @@
public class BorderBottomTests extends AbstractPropertyTests {
@Override
+ protected PropertyId getPropertyId() {
+ return FoPropertyId.BORDER_BOTTOM;
+ }
+
+ @Override
protected PdBorderBottom createProperty(final String attributeValue) throws PropertyException {
final PdBorderBottom property = new PdBorderBottom(attributeValue);
return property;
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderBottomWidthTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderBottomWidthTests.java 2022-12-29 13:01:44 UTC (rev 12975)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderBottomWidthTests.java 2022-12-29 16:54:28 UTC (rev 12976)
@@ -29,6 +29,8 @@
package org.foray.fotree.fo.prop;
import org.foray....
[truncated message content] |
|
From: <vic...@us...> - 2022-12-29 13:01:48
|
Revision: 12975
http://sourceforge.net/p/foray/code/12975
Author: victormote
Date: 2022-12-29 13:01:44 +0000 (Thu, 29 Dec 2022)
Log Message:
-----------
Activate tests.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/NamespaceFo.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdDominantBaseline.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/DominantBaselineTests.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/NamespaceFo.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/NamespaceFo.java 2022-12-28 22:18:53 UTC (rev 12974)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/NamespaceFo.java 2022-12-29 13:01:44 UTC (rev 12975)
@@ -1058,7 +1058,7 @@
return new PdDisplayAlign(attributeValue);
}
case DOMINANT_BASELINE: {
- return PdDominantBaseline.getInstance(attributeValue);
+ return PdDominantBaseline.procureInstance(attributeValue);
}
case ELEVATION: {
return new PdElevation(attributeValue);
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdDominantBaseline.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdDominantBaseline.java 2022-12-28 22:18:53 UTC (rev 12974)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdDominantBaseline.java 2022-12-29 13:01:44 UTC (rev 12975)
@@ -127,11 +127,12 @@
/**
* Converts the unparsed property value into its parsed, storable value.
- * @param value The unparsed property value.
- * @return The instance of this property whose value is {@code value}, or null if it is not valid.
+ * @param unparsedValue The unparsed property value.
+ * @return The instance of this property whose value is {@code unparsedValue}.
+ * @throws PropertyException For errors parsing {@code unparsedValue}.
*/
- public static PdDominantBaseline getInstance(final String value) {
- switch (value) {
+ public static PdDominantBaseline procureInstance(final String unparsedValue) throws PropertyException {
+ switch (unparsedValue) {
case "auto":
return PdDominantBaseline.AUTO;
case "use-script":
@@ -158,26 +159,16 @@
return PdDominantBaseline.TEXT_BEFORE_EDGE;
case "inherit":
return PdDominantBaseline.INHERIT;
- default:
- try {
- final PropertyValue parsedValue =
- PropertyParser.getInstance().parse(value, FoPropertyId.DOMINANT_BASELINE);
- if (parsedValue == null) {
- return null;
- }
- if (! (parsedValue instanceof FnAbstractNamedProperty)) {
- return null;
- }
+ default: {
+ final PropertyValue parsedValue =
+ PropertyParser.getInstance().parse(unparsedValue, FoPropertyId.DOMINANT_BASELINE);
+ if (parsedValue instanceof FnAbstractNamedProperty) {
final FnAbstractNamedProperty named = (FnAbstractNamedProperty) parsedValue;
- if (! (named.getPropertyType() == FoPropertyId.DOMINANT_BASELINE)
- && ! (named.getPropertyType() == null)) {
- return null;
- }
return new PdDominantBaseline(named);
- } catch (final PropertyException e) {
- return null;
}
+ throw new PropertyException("Unable to parse expression: " + unparsedValue);
}
+ }
}
/**
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/DominantBaselineTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/DominantBaselineTests.java 2022-12-28 22:18:53 UTC (rev 12974)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/DominantBaselineTests.java 2022-12-29 13:01:44 UTC (rev 12975)
@@ -30,12 +30,9 @@
import org.foray.fotree.AbstractPropertyTests;
import org.foray.fotree.PropertyException;
-import org.foray.fotree.value.FnInheritedPropertyValue;
-import org.foray.fotree.value.PropertyValue;
import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertTrue;
-import org.junit.jupiter.api.Disabled;
+import static org.junit.jupiter.api.Assertions.assertThrows;
import org.junit.jupiter.api.Test;
/**
@@ -45,7 +42,7 @@
@Override
protected PdDominantBaseline createProperty(final String attributeValue) throws PropertyException {
- final PdDominantBaseline property = PdDominantBaseline.getInstance(attributeValue);
+ final PdDominantBaseline property = PdDominantBaseline.procureInstance(attributeValue);
checkNullProperty(property, attributeValue);
return property;
}
@@ -181,19 +178,27 @@
}
/**
- * Test of {@code dominant-baseline="inherited-property-value('dominant-baseline')"}.
- * @throws PropertyException Not expected here.
+ * Test of a property value of "inherited-property-value(the-property-name)".
*/
@Test
- @Disabled("Waiting for FnInheritedPropertyValue to be completed.")
- public void inheritedPropertyValueParseTest() throws PropertyException {
- final PdDominantBaseline property = createProperty("inherited-property-value(\"dominant-baseline\")");
- final PropertyValue actualOutside = property.value();
- assertTrue(actualOutside instanceof FnInheritedPropertyValue);
- final FnInheritedPropertyValue ipv = (FnInheritedPropertyValue) actualOutside;
- final PropertyValue actualInside = ipv.eval(property, makeTestFObj());
- /* For this test, the initial value should be returned. */
- assertEquals(PdDominantBaseline.AUTO, actualInside);
+ public void inheritedPropertyValueParseTest1() {
+ final PropertyException exception = assertThrows(PropertyException.class, () -> {
+ createProperty("inherited-property-value(dominant-baseline)");
+ });
+ assertEquals("Function inherited-property-value() must operate on an inherited property.",
+ exception.getMessage());
}
+ /**
+ * Test of {@code dominant-baseline="inherited-property-value()"}.
+ */
+ @Test
+ public void inheritedPropertyValueParseTest2() {
+ final PropertyException exception = assertThrows(PropertyException.class, () -> {
+ createProperty("inherited-property-value()");
+ });
+ assertEquals("Function inherited-property-value() must operate on an inherited property.",
+ exception.getMessage());
+ }
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-12-28 22:18:55
|
Revision: 12974
http://sourceforge.net/p/foray/code/12974
Author: victormote
Date: 2022-12-28 22:18:53 +0000 (Wed, 28 Dec 2022)
Log Message:
-----------
Add checks on some functions.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/PropertyId.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/AxslPropertyId.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/FoPropertyId.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/Function.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/xml/XmlPropertyId.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/FnFromPageMasterRegionTests.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/PropertyId.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/PropertyId.java 2022-12-28 21:12:29 UTC (rev 12973)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/PropertyId.java 2022-12-28 22:18:53 UTC (rev 12974)
@@ -39,7 +39,7 @@
*/
enum Atomicity {
- /** The property has a one-to-one relationship with traits. */
+ /** The property has a one-to-one relationship with a trait. */
ATOMIC,
/** The property is a shorthand for more than one trait. */
@@ -61,10 +61,9 @@
* Returns the general atomicity of this property.
* Knowing whether a property is shorthand or compound is useful when evaluating certain functions, such as
* inherited-property-value().
- * This information is used when evala
* @return The general atomicity of this property.
*/
- Atomicity getType();
+ Atomicity getAtomicity();
/**
* Indicates whether this property is inherited or not.
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/AxslPropertyId.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/AxslPropertyId.java 2022-12-28 21:12:29 UTC (rev 12973)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/AxslPropertyId.java 2022-12-28 22:18:53 UTC (rev 12974)
@@ -78,7 +78,7 @@
}
@Override
- public Atomicity getType() {
+ public Atomicity getAtomicity() {
return Atomicity.ATOMIC;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/FoPropertyId.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/FoPropertyId.java 2022-12-28 21:12:29 UTC (rev 12973)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/FoPropertyId.java 2022-12-28 22:18:53 UTC (rev 12974)
@@ -1189,7 +1189,7 @@
}
@Override
- public Atomicity getType() {
+ public Atomicity getAtomicity() {
return this.atomicity;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/Function.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/Function.java 2022-12-28 21:12:29 UTC (rev 12973)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/Function.java 2022-12-28 22:18:53 UTC (rev 12974)
@@ -63,15 +63,15 @@
/**
* Factory method for the various function types.
- * @param functionType The integral value of the function type.
+ * @param functionName The name of the function being processed.
* @param arguments The array of arguments to this function.
- * @param propertyType The property which is calling this function.
+ * @param callingProperty The property which is calling this function.
* @return A newly-constructed instance of a FunctionAbstract subclass.
* @throws PropertyException For invalid arguments to the function.
*/
- public static Function makeFunction(final String functionType, final Expr[] arguments,
- final PropertyId propertyType) throws PropertyException {
- switch (functionType) {
+ public static Function makeFunction(final String functionName, final Expr[] arguments,
+ final PropertyId callingProperty) throws PropertyException {
+ switch (functionName) {
case "abs": {
return new FnAbs(arguments);
}
@@ -85,24 +85,33 @@
return new FnFloor(arguments);
}
case "from-nearest-specified-value": {
- final FoPropertyId propertyId = computeNamedPropertyOperand(functionType, arguments, propertyType);
- return FnFromNearestSpecifiedValue.procureInstance(propertyId);
+ final FoPropertyId foPropertyId = computeNamedPropertyOperand(functionName, arguments, callingProperty);
+ return FnFromNearestSpecifiedValue.procureInstance(foPropertyId);
}
case "from-page-master-region": {
- final FoPropertyId propertyId = computeNamedPropertyOperand(functionType, arguments, propertyType);
- return FnFromPageMasterRegion.procureInstance(propertyId);
+ if (callingProperty != FoPropertyId.WRITING_MODE
+ && callingProperty != FoPropertyId.REFERENCE_ORIENTATION) {
+ throw new PropertyException("Function from-page-master-region() can only be the value of either "
+ + "the writing-mode or reference-orientation properties.");
+ }
+ final FoPropertyId foPropertyId = computeNamedPropertyOperand(functionName, arguments, callingProperty);
+ return FnFromPageMasterRegion.procureInstance(foPropertyId);
}
case "from-parent": {
- final FoPropertyId propertyId = computeNamedPropertyOperand(functionType, arguments, propertyType);
- return FnFromParent.procureInstance(propertyId);
+ final FoPropertyId foPropertyId = computeNamedPropertyOperand(functionName, arguments, callingProperty);
+ return FnFromParent.procureInstance(foPropertyId);
}
case "from-table-column": {
- final FoPropertyId propertyId = computeNamedPropertyOperand(functionType, arguments, propertyType);
- return FnFromTableColumn.procureInstance(propertyId);
+ final FoPropertyId foPropertyId = computeNamedPropertyOperand(functionName, arguments, callingProperty);
+ return FnFromTableColumn.procureInstance(foPropertyId);
}
case "inherited-property-value": {
- final FoPropertyId propertyId = computeNamedPropertyOperand(functionType, arguments, propertyType);
- return FnInheritedPropertyValue.procureInstance(propertyId);
+ final FoPropertyId foPropertyId = computeNamedPropertyOperand(functionName, arguments, callingProperty);
+ if (! foPropertyId.isInherited()) {
+ throw new PropertyException(
+ "Function inherited-property-value() must operate on an inherited property.");
+ }
+ return FnInheritedPropertyValue.procureInstance(foPropertyId);
}
case "label-end": {
return new FnLabelEnd(arguments);
@@ -111,8 +120,8 @@
return new FnMax(arguments);
}
case "merge-property-values": {
- final FoPropertyId propertyId = computeNamedPropertyOperand(functionType, arguments, propertyType);
- return FnMergePropertyValues.procureInstance(propertyId);
+ final FoPropertyId foPropertyId = computeNamedPropertyOperand(functionName, arguments, callingProperty);
+ return FnMergePropertyValues.procureInstance(foPropertyId);
}
case "min": {
return new FnMin(arguments);
@@ -133,7 +142,7 @@
return new FnSystemColor(arguments);
}
case "system-font": {
- return new FnSystemFont(arguments, propertyType);
+ return new FnSystemFont(arguments, callingProperty);
}
default: {
return null;
@@ -208,16 +217,16 @@
* Computes the operand of a named property function from the arguments and property type.
* @param functionName The name of the function being parsed.
* @param arguments The arguments to this function.
- * @param propertyType The property which is calling this function.
+ * @param callingProperty The property which is calling this function.
* @return The operand to be used for {@code arguments} and {@code propertyType}.
* @throws PropertyException For errors creating this function.
*/
private static FoPropertyId computeNamedPropertyOperand(final String functionName, final Expr[] arguments,
- final PropertyId propertyType) throws PropertyException {
+ final PropertyId callingProperty) throws PropertyException {
final DtName name = validateNoneOrOneName(functionName, arguments);
if (name == null) {
- if (propertyType instanceof FoPropertyId) {
- return (FoPropertyId) propertyType;
+ if (callingProperty instanceof FoPropertyId) {
+ return (FoPropertyId) callingProperty;
} else {
throw new PropertyException("Function " + functionName
+ " is valid only for properties in the fo: "
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/xml/XmlPropertyId.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/xml/XmlPropertyId.java 2022-12-28 21:12:29 UTC (rev 12973)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/xml/XmlPropertyId.java 2022-12-28 22:18:53 UTC (rev 12974)
@@ -75,7 +75,7 @@
}
@Override
- public Atomicity getType() {
+ public Atomicity getAtomicity() {
return Atomicity.SHORTHAND;
}
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/FnFromPageMasterRegionTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/FnFromPageMasterRegionTests.java 2022-12-28 21:12:29 UTC (rev 12973)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/FnFromPageMasterRegionTests.java 2022-12-28 22:18:53 UTC (rev 12974)
@@ -29,8 +29,10 @@
package org.foray.fotree.value;
import org.foray.fotree.PropertyException;
+import org.foray.fotree.fo.FoPropertyId;
import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.fail;
import org.junit.jupiter.api.Test;
/**
@@ -39,12 +41,10 @@
public class FnFromPageMasterRegionTests {
/** Constant used for testing. */
- private static final DtName NAME_1 = new DtName("orphans");
+ private static final Expr[] OPERAND_ARRAY_ORPHANS = {new DtName("orphans")};
/** Constant used for testing. */
- private static final Expr[] OPERAND_ARRAY_1 = new Expr[] {
- FnFromPageMasterRegionTests.NAME_1,
- };
+ private static final Expr[] OPERAND_ARRAY_WRITING_MODE = {new DtName("writing-mode")};
/**
* Unit test of a function creation.
@@ -53,8 +53,23 @@
@Test
public void testBasic() throws PropertyException {
final Function fn = Function.makeFunction("from-page-master-region",
- FnFromPageMasterRegionTests.OPERAND_ARRAY_1, null);
+ FnFromPageMasterRegionTests.OPERAND_ARRAY_WRITING_MODE, FoPropertyId.WRITING_MODE);
assertTrue(fn instanceof FnFromPageMasterRegion);
}
+ /**
+ * Unit test of a function creation.
+ * @throws PropertyException For errors during function creation.
+ */
+ @Test
+ public void invalidPropertyShouldFail() throws PropertyException {
+ try {
+ Function.makeFunction("from-page-master-region",
+ FnFromPageMasterRegionTests.OPERAND_ARRAY_ORPHANS, FoPropertyId.ORPHANS);
+ fail("Expected PropertyException for invalid operand");
+ } catch (final PropertyException e) {
+ /* This is the expected path. */
+ }
+ }
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-12-28 21:12:32
|
Revision: 12973
http://sourceforge.net/p/foray/code/12973
Author: victormote
Date: 2022-12-28 21:12:29 +0000 (Wed, 28 Dec 2022)
Log Message:
-----------
Add identification of compound properties.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/PropertyId.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/FoPropertyId.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/PropertyId.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/PropertyId.java 2022-12-28 19:17:20 UTC (rev 12972)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/PropertyId.java 2022-12-28 21:12:29 UTC (rev 12973)
@@ -59,6 +59,9 @@
/**
* Returns the general atomicity of this property.
+ * Knowing whether a property is shorthand or compound is useful when evaluating certain functions, such as
+ * inherited-property-value().
+ * This information is used when evala
* @return The general atomicity of this property.
*/
Atomicity getType();
@@ -65,6 +68,8 @@
/**
* Indicates whether this property is inherited or not.
+ * Knowing whether a property is inherited or not is useful when evaluating certain functions, such as
+ * inherited-property-value().
* @return True if and only if this property is inherited.
*/
boolean isInherited();
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/FoPropertyId.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/FoPropertyId.java 2022-12-28 19:17:20 UTC (rev 12972)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/FoPropertyId.java 2022-12-28 21:12:29 UTC (rev 12973)
@@ -94,7 +94,7 @@
BLANK_OR_NOT_BLANK(Atomicity.ATOMIC, false), // 17
/** Constant indicating a "block-progression-dimension" FO property. */
- BLOCK_PROGRESSION_DIMENSION(Atomicity.ATOMIC, false), // 18
+ BLOCK_PROGRESSION_DIMENSION(Atomicity.COMPOUND, false), // 18
/** Constant indicating a "border" FO property. */
BORDER(Atomicity.SHORTHAND, false), // 19
@@ -109,7 +109,7 @@
BORDER_AFTER_STYLE(Atomicity.ATOMIC, false), // 22
/** Constant indicating a "border-after-width" FO property. */
- BORDER_AFTER_WIDTH(Atomicity.ATOMIC, false), // 23
+ BORDER_AFTER_WIDTH(Atomicity.COMPOUND, false), // 23
/** Constant indicating a "border-before-color" FO property. */
BORDER_BEFORE_COLOR(Atomicity.ATOMIC, false), // 24
@@ -121,7 +121,7 @@
BORDER_BEFORE_STYLE(Atomicity.ATOMIC, false), // 26
/** Constant indicating a "border-before-width" FO property. */
- BORDER_BEFORE_WIDTH(Atomicity.ATOMIC, false), // 27
+ BORDER_BEFORE_WIDTH(Atomicity.COMPOUND, false), // 27
/** Constant indicating a "border-bottom" FO property. */
BORDER_BOTTOM(Atomicity.SHORTHAND, false), // 28
@@ -151,7 +151,7 @@
BORDER_END_STYLE(Atomicity.ATOMIC, false), // 36
/** Constant indicating a "border-end-width" FO property. */
- BORDER_END_WIDTH(Atomicity.ATOMIC, false), // 37
+ BORDER_END_WIDTH(Atomicity.COMPOUND, false), // 37
/** Constant indicating a "border-left" FO property. */
BORDER_LEFT(Atomicity.SHORTHAND, false), // 38
@@ -178,7 +178,7 @@
BORDER_RIGHT_WIDTH(Atomicity.ATOMIC, false), // 45
/** Constant indicating a "border-separation" FO property. */
- BORDER_SEPARATION(Atomicity.ATOMIC, true), // 46
+ BORDER_SEPARATION(Atomicity.COMPOUND, true), // 46
/** Constant indicating a "border-spacing" FO property. */
BORDER_SPACING(Atomicity.SHORTHAND, true), // 47
@@ -193,7 +193,7 @@
BORDER_START_STYLE(Atomicity.ATOMIC, false), // 50
/** Constant indicating a "border-start-width" FO property. */
- BORDER_START_WIDTH(Atomicity.ATOMIC, false), // 51
+ BORDER_START_WIDTH(Atomicity.COMPOUND, false), // 51
/** Constant indicating a "border-style" FO property. */
BORDER_STYLE(Atomicity.SHORTHAND, false), // 52
@@ -307,7 +307,7 @@
DISPLAY_ALIGN(Atomicity.ATOMIC, true), // 88
/** Constant indicating a "dominant-baseline" FO property. */
- DOMINANT_BASELINE(Atomicity.ATOMIC, false), // 89
+ DOMINANT_BASELINE(Atomicity.COMPOUND, false), // 89
/** Constant indicating an "elevation" FO property. */
ELEVATION(Atomicity.ATOMIC, true), // 90
@@ -426,7 +426,7 @@
INITIAL_PAGE_NUMBER(Atomicity.ATOMIC, false), // 127
/** Constant indicating an "inline-progression-dimension" FO property. */
- INLINE_PROGRESSION_DIMENSION(Atomicity.ATOMIC, false), // 128
+ INLINE_PROGRESSION_DIMENSION(Atomicity.COMPOUND, false), // 128
/** Constant indicating an "internal-destination" FO property. */
INTERNAL_DESTINATION(Atomicity.ATOMIC, false), // 129
@@ -438,13 +438,13 @@
INTRUSION_DISPLACE(Atomicity.ATOMIC, false), // 131
/** Constant indicating a "keep-together" FO property. */
- KEEP_TOGETHER(Atomicity.ATOMIC, true), // 132
+ KEEP_TOGETHER(Atomicity.COMPOUND, true), // 132
/** Constant indicating a "keep-with-next" FO property. */
- KEEP_WITH_NEXT(Atomicity.ATOMIC, false), // 133
+ KEEP_WITH_NEXT(Atomicity.COMPOUND, false), // 133
/** Constant indicating a "keep-with-previous" FO property. */
- KEEP_WITH_PREVIOUS(Atomicity.ATOMIC, false), // 134
+ KEEP_WITH_PREVIOUS(Atomicity.COMPOUND, false), // 134
/** Constant indicating a "language" FO property. */
LANGUAGE(Atomicity.ATOMIC, true), // 135
@@ -456,7 +456,7 @@
LEADER_ALIGNMENT(Atomicity.ATOMIC, true), // 137
/** Constant indicating a "leader-length" FO property. */
- LEADER_LENGTH(Atomicity.ATOMIC, true), // 138
+ LEADER_LENGTH(Atomicity.COMPOUND, true), // 138
/** Constant indicating a "leader-pattern" FO property. */
LEADER_PATTERN(Atomicity.ATOMIC, true), // 139
@@ -468,13 +468,13 @@
LEFT(Atomicity.ATOMIC, false), // 141
/** Constant indicating a "letter-spacing" FO property. */
- LETTER_SPACING(Atomicity.ATOMIC, true), // 142
+ LETTER_SPACING(Atomicity.COMPOUND, true), // 142
/** Constant indicating a "letter-value" FO property. */
LETTER_VALUE(Atomicity.ATOMIC, false), // 143
/** Constant indicating a "line-height" FO property. */
- LINE_HEIGHT(Atomicity.ATOMIC, true), // 144
+ LINE_HEIGHT(Atomicity.COMPOUND, true), // 144
/** Constant indicating a "line-height-shift-adjustment" FO property. */
LINE_HEIGHT_SHIFT_ADJUSTMENT(Atomicity.ATOMIC, true), // 145
@@ -560,16 +560,16 @@
PADDING(Atomicity.SHORTHAND, false), // 171
/** Constant indicating a "padding-after" FO property. */
- PADDING_AFTER(Atomicity.ATOMIC, false), // 172
+ PADDING_AFTER(Atomicity.COMPOUND, false), // 172
/** Constant indicating a "padding-before" FO property. */
- PADDING_BEFORE(Atomicity.ATOMIC, false), // 173
+ PADDING_BEFORE(Atomicity.COMPOUND, false), // 173
/** Constant indicating a "padding-bottom" FO property. */
PADDING_BOTTOM(Atomicity.ATOMIC, false), // 174
/** Constant indicating a "padding-end" FO property. */
- PADDING_END(Atomicity.ATOMIC, false), // 175
+ PADDING_END(Atomicity.COMPOUND, false), // 175
/** Constant indicating a "padding-left" FO property. */
PADDING_LEFT(Atomicity.ATOMIC, false), // 176
@@ -578,7 +578,7 @@
PADDING_RIGHT(Atomicity.ATOMIC, false), // 177
/** Constant indicating a "padding-start" FO property. */
- PADDING_START(Atomicity.ATOMIC, false), // 178
+ PADDING_START(Atomicity.COMPOUND, false), // 178
/** Constant indicating a "padding-top" FO property. */
PADDING_TOP(Atomicity.ATOMIC, false), // 179
@@ -717,16 +717,16 @@
SOURCE_DOCUMENT(Atomicity.ATOMIC, false), // 223
/** Constant indicating a "space-after" FO property. */
- SPACE_AFTER(Atomicity.ATOMIC, false), // 224
+ SPACE_AFTER(Atomicity.COMPOUND, false), // 224
/** Constant indicating a "space-before" FO property. */
- SPACE_BEFORE(Atomicity.ATOMIC, false), // 225
+ SPACE_BEFORE(Atomicity.COMPOUND, false), // 225
/** Constant indicating a "space-end" FO property. */
- SPACE_END(Atomicity.ATOMIC, false), // 226
+ SPACE_END(Atomicity.COMPOUND, false), // 226
/** Constant indicating a "space-start" FO property. */
- SPACE_START(Atomicity.ATOMIC, false), // 227
+ SPACE_START(Atomicity.COMPOUND, false), // 227
/** Constant indicating a "span" FO property. */
SPAN(Atomicity.ATOMIC, false), // 228
@@ -846,7 +846,7 @@
WIDTH(Atomicity.ATOMIC, false), // 266
/** Constant indicating a "word-spacing" FO property. */
- WORD_SPACING(Atomicity.ATOMIC, true), // 267
+ WORD_SPACING(Atomicity.COMPOUND, true), // 267
/** Constant indicating a "wrap-option" FO property. */
WRAP_OPTION(Atomicity.ATOMIC, true), // 268
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-12-28 19:17:23
|
Revision: 12972
http://sourceforge.net/p/foray/code/12972
Author: victormote
Date: 2022-12-28 19:17:20 +0000 (Wed, 28 Dec 2022)
Log Message:
-----------
Add some metadata to the property ID classes.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/PropertyId.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/AxslPropertyId.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/FoPropertyId.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/xml/XmlPropertyId.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/PropertyId.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/PropertyId.java 2022-12-28 05:19:42 UTC (rev 12971)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/PropertyId.java 2022-12-28 19:17:20 UTC (rev 12972)
@@ -35,6 +35,21 @@
public interface PropertyId {
/**
+ * Enumeration of the various types of atomicity of properties.
+ */
+ enum Atomicity {
+
+ /** The property has a one-to-one relationship with traits. */
+ ATOMIC,
+
+ /** The property is a shorthand for more than one trait. */
+ SHORTHAND,
+
+ /** The property is a compound of more than one trait. */
+ COMPOUND
+ }
+
+ /**
* Returns the attribute name of this property as it appears in an XML input file.
* For example, an implementation might be an enum with an element called WRITING_MODE that was derived from an
* attribute named "writing-mode".
@@ -42,4 +57,16 @@
*/
String getAttributeName();
+ /**
+ * Returns the general atomicity of this property.
+ * @return The general atomicity of this property.
+ */
+ Atomicity getType();
+
+ /**
+ * Indicates whether this property is inherited or not.
+ * @return True if and only if this property is inherited.
+ */
+ boolean isInherited();
+
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/AxslPropertyId.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/AxslPropertyId.java 2022-12-28 05:19:42 UTC (rev 12971)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/AxslPropertyId.java 2022-12-28 19:17:20 UTC (rev 12972)
@@ -77,4 +77,14 @@
return AxslPropertyId.values()[ordinal];
}
+ @Override
+ public Atomicity getType() {
+ return Atomicity.ATOMIC;
+ }
+
+ @Override
+ public boolean isInherited() {
+ return false;
+ }
+
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/FoPropertyId.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/FoPropertyId.java 2022-12-28 05:19:42 UTC (rev 12971)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/FoPropertyId.java 2022-12-28 19:17:20 UTC (rev 12972)
@@ -40,825 +40,825 @@
public enum FoPropertyId implements PropertyId {
/** Constant indicating an "absolute-position" FO property. */
- ABSOLUTE_POSITION, // 0
+ ABSOLUTE_POSITION(Atomicity.ATOMIC, false), // 0
/** Constant indicating an "active-state" FO property. */
- ACTIVE_STATE, // 1
+ ACTIVE_STATE(Atomicity.ATOMIC, false), // 1
/** Constant indicating an "alignment-adjust" FO property. */
- ALIGNMENT_ADJUST, // 2
+ ALIGNMENT_ADJUST(Atomicity.ATOMIC, false), // 2
/** Constant indicating an "alignment-baseline" FO property. */
- ALIGNMENT_BASELINE, // 3
+ ALIGNMENT_BASELINE(Atomicity.ATOMIC, false), // 3
/** Constant indicating an "allowed-height-scale" FO property. */
- ALLOWED_HEIGHT_SCALE, // 4
+ ALLOWED_HEIGHT_SCALE(Atomicity.ATOMIC, true), // 4
/** Constant indicating an "allowed-width-scale" FO property. */
- ALLOWED_WIDTH_SCALE, // 5
+ ALLOWED_WIDTH_SCALE(Atomicity.ATOMIC, true), // 5
/** Constant indicating an "auto-restore" FO property. */
- AUTO_RESTORE, // 6
+ AUTO_RESTORE(Atomicity.ATOMIC, true), // 6
/** Constant indicating an "azimuth" FO property. */
- AZIMUTH, // 7
+ AZIMUTH(Atomicity.ATOMIC, true), // 7
/** Constant indicating a "background" FO property. */
- BACKGROUND, // 8
+ BACKGROUND(Atomicity.SHORTHAND, false), // 8
/** Constant indicating a "background-attachment" FO property. */
- BACKGROUND_ATTACHMENT, // 9
+ BACKGROUND_ATTACHMENT(Atomicity.ATOMIC, false), // 9
/** Constant indicating a "background-color" FO property. */
- BACKGROUND_COLOR, // 10
+ BACKGROUND_COLOR(Atomicity.ATOMIC, false), // 10
/** Constant indicating a "background-image" FO property. */
- BACKGROUND_IMAGE, // 11
+ BACKGROUND_IMAGE(Atomicity.ATOMIC, false), // 11
/** Constant indicating a "background-position" FO property. */
- BACKGROUND_POSITION, // 12
+ BACKGROUND_POSITION(Atomicity.SHORTHAND, false), // 12
/** Constant indicating a "background-position-horizontal" FO property. */
- BACKGROUND_POSITION_HORIZONTAL, // 13
+ BACKGROUND_POSITION_HORIZONTAL(Atomicity.ATOMIC, false), // 13
/** Constant indicating a "background-position-vertical" FO property. */
- BACKGROUND_POSITION_VERTICAL, // 14
+ BACKGROUND_POSITION_VERTICAL(Atomicity.ATOMIC, false), // 14
/** Constant indicating a "background-repeat" FO property. */
- BACKGROUND_REPEAT, // 15
+ BACKGROUND_REPEAT(Atomicity.ATOMIC, false), // 15
/** Constant indicating a "baseline-shift" FO property. */
- BASELINE_SHIFT, // 16
+ BASELINE_SHIFT(Atomicity.ATOMIC, false), // 16
/** Constant indicating a "blank-or-not-blank" FO property. */
- BLANK_OR_NOT_BLANK, // 17
+ BLANK_OR_NOT_BLANK(Atomicity.ATOMIC, false), // 17
/** Constant indicating a "block-progression-dimension" FO property. */
- BLOCK_PROGRESSION_DIMENSION, // 18
+ BLOCK_PROGRESSION_DIMENSION(Atomicity.ATOMIC, false), // 18
/** Constant indicating a "border" FO property. */
- BORDER, // 19
+ BORDER(Atomicity.SHORTHAND, false), // 19
/** Constant indicating a "border-after-color" FO property. */
- BORDER_AFTER_COLOR, // 20
+ BORDER_AFTER_COLOR(Atomicity.ATOMIC, false), // 20
/** Constant indicating a "border-after-precedence" FO property. */
- BORDER_AFTER_PRECEDENCE, // 21
+ BORDER_AFTER_PRECEDENCE(Atomicity.ATOMIC, false), // 21
/** Constant indicating a "border-after-style" FO property. */
- BORDER_AFTER_STYLE, // 22
+ BORDER_AFTER_STYLE(Atomicity.ATOMIC, false), // 22
/** Constant indicating a "border-after-width" FO property. */
- BORDER_AFTER_WIDTH, // 23
+ BORDER_AFTER_WIDTH(Atomicity.ATOMIC, false), // 23
/** Constant indicating a "border-before-color" FO property. */
- BORDER_BEFORE_COLOR, // 24
+ BORDER_BEFORE_COLOR(Atomicity.ATOMIC, false), // 24
/** Constant indicating a "border-before-precedence" FO property. */
- BORDER_BEFORE_PRECEDENCE, // 25
+ BORDER_BEFORE_PRECEDENCE(Atomicity.ATOMIC, false), // 25
/** Constant indicating a "border-before-style" FO property. */
- BORDER_BEFORE_STYLE, // 26
+ BORDER_BEFORE_STYLE(Atomicity.ATOMIC, false), // 26
/** Constant indicating a "border-before-width" FO property. */
- BORDER_BEFORE_WIDTH, // 27
+ BORDER_BEFORE_WIDTH(Atomicity.ATOMIC, false), // 27
/** Constant indicating a "border-bottom" FO property. */
- BORDER_BOTTOM, // 28
+ BORDER_BOTTOM(Atomicity.SHORTHAND, false), // 28
/** Constant indicating a "border-bottom-color" FO property. */
- BORDER_BOTTOM_COLOR, // 29
+ BORDER_BOTTOM_COLOR(Atomicity.ATOMIC, false), // 29
/** Constant indicating a "border-bottom-style" FO property. */
- BORDER_BOTTOM_STYLE, // 30
+ BORDER_BOTTOM_STYLE(Atomicity.ATOMIC, false), // 30
/** Constant indicating a "border-bottom-width" FO property. */
- BORDER_BOTTOM_WIDTH, // 31
+ BORDER_BOTTOM_WIDTH(Atomicity.ATOMIC, false), // 31
/** Constant indicating a "border-collapse" FO property. */
- BORDER_COLLAPSE, // 32
+ BORDER_COLLAPSE(Atomicity.ATOMIC, true), // 32
/** Constant indicating a "border-color" FO property. */
- BORDER_COLOR, // 33
+ BORDER_COLOR(Atomicity.SHORTHAND, false), // 33
/** Constant indicating a "border-end-color" FO property. */
- BORDER_END_COLOR, // 34
+ BORDER_END_COLOR(Atomicity.ATOMIC, false), // 34
/** Constant indicating a "border-end-precedence" FO property. */
- BORDER_END_PRECEDENCE, // 35
+ BORDER_END_PRECEDENCE(Atomicity.ATOMIC, false), // 35
/** Constant indicating a "border-end-style" FO property. */
- BORDER_END_STYLE, // 36
+ BORDER_END_STYLE(Atomicity.ATOMIC, false), // 36
/** Constant indicating a "border-end-width" FO property. */
- BORDER_END_WIDTH, // 37
+ BORDER_END_WIDTH(Atomicity.ATOMIC, false), // 37
/** Constant indicating a "border-left" FO property. */
- BORDER_LEFT, // 38
+ BORDER_LEFT(Atomicity.SHORTHAND, false), // 38
/** Constant indicating a "border-left-color" FO property. */
- BORDER_LEFT_COLOR, // 39
+ BORDER_LEFT_COLOR(Atomicity.ATOMIC, false), // 39
/** Constant indicating a "border-left-style" FO property. */
- BORDER_LEFT_STYLE, // 40
+ BORDER_LEFT_STYLE(Atomicity.ATOMIC, false), // 40
/** Constant indicating a "border-left-width" FO property. */
- BORDER_LEFT_WIDTH, // 41
+ BORDER_LEFT_WIDTH(Atomicity.ATOMIC, false), // 41
/** Constant indicating a "border-right" FO property. */
- BORDER_RIGHT, // 42
+ BORDER_RIGHT(Atomicity.SHORTHAND, false), // 42
/** Constant indicating a "border-right-color" FO property. */
- BORDER_RIGHT_COLOR, // 43
+ BORDER_RIGHT_COLOR(Atomicity.ATOMIC, false), // 43
/** Constant indicating a "border-right-style" FO property. */
- BORDER_RIGHT_STYLE, // 44
+ BORDER_RIGHT_STYLE(Atomicity.ATOMIC, false), // 44
/** Constant indicating a "border-right-width" FO property. */
- BORDER_RIGHT_WIDTH, // 45
+ BORDER_RIGHT_WIDTH(Atomicity.ATOMIC, false), // 45
/** Constant indicating a "border-separation" FO property. */
- BORDER_SEPARATION, // 46
+ BORDER_SEPARATION(Atomicity.ATOMIC, true), // 46
/** Constant indicating a "border-spacing" FO property. */
- BORDER_SPACING, // 47
+ BORDER_SPACING(Atomicity.SHORTHAND, true), // 47
/** Constant indicating a "border-start-color" FO property. */
- BORDER_START_COLOR, // 48
+ BORDER_START_COLOR(Atomicity.ATOMIC, false), // 48
/** Constant indicating a "border-start-precedence" FO property. */
- BORDER_START_PRECEDENCE, // 49
+ BORDER_START_PRECEDENCE(Atomicity.ATOMIC, false), // 49
/** Constant indicating a "border-start-style" FO property. */
- BORDER_START_STYLE, // 50
+ BORDER_START_STYLE(Atomicity.ATOMIC, false), // 50
/** Constant indicating a "border-start-width" FO property. */
- BORDER_START_WIDTH, // 51
+ BORDER_START_WIDTH(Atomicity.ATOMIC, false), // 51
/** Constant indicating a "border-style" FO property. */
- BORDER_STYLE, // 52
+ BORDER_STYLE(Atomicity.SHORTHAND, false), // 52
/** Constant indicating a "border-top" FO property. */
- BORDER_TOP, // 53
+ BORDER_TOP(Atomicity.SHORTHAND, false), // 53
/** Constant indicating a "border-top-color" FO property. */
- BORDER_TOP_COLOR, // 54
+ BORDER_TOP_COLOR(Atomicity.ATOMIC, false), // 54
/** Constant indicating a "border-top-style" FO property. */
- BORDER_TOP_STYLE, // 55
+ BORDER_TOP_STYLE(Atomicity.ATOMIC, false), // 55
/** Constant indicating a "border-top-width" FO property. */
- BORDER_TOP_WIDTH, // 56
+ BORDER_TOP_WIDTH(Atomicity.ATOMIC, false), // 56
/** Constant indicating a "border-width" FO property. */
- BORDER_WIDTH, // 57
+ BORDER_WIDTH(Atomicity.SHORTHAND, false), // 57
/** Constant indicating a "bottom" FO property. */
- BOTTOM, // 58
+ BOTTOM(Atomicity.ATOMIC, false), // 58
/** Constant indicating a "break-after" FO property. */
- BREAK_AFTER, // 59
+ BREAK_AFTER(Atomicity.ATOMIC, false), // 59
/** Constant indicating a "break-before" FO property. */
- BREAK_BEFORE, // 60
+ BREAK_BEFORE(Atomicity.ATOMIC, false), // 60
/** Constant indicating a "caption-side" FO property. */
- CAPTION_SIDE, // 61
+ CAPTION_SIDE(Atomicity.ATOMIC, true), // 61
/** Constant indicating a "case-name" FO property. */
- CASE_NAME, // 62
+ CASE_NAME(Atomicity.ATOMIC, false), // 62
/** Constant indicating a "case-title" FO property. */
- CASE_TITLE, // 63
+ CASE_TITLE(Atomicity.ATOMIC, false), // 63
/** Constant indicating a "change-bar-class" FO property. */
- CHANGE_BAR_CLASS, // 64
+ CHANGE_BAR_CLASS(Atomicity.ATOMIC, false), // 64
/** Constant indicating a "change-bar-color" FO property. */
- CHANGE_BAR_COLOR, // 65
+ CHANGE_BAR_COLOR(Atomicity.ATOMIC, true), // 65
/** Constant indicating a "change-bar-offset" FO property. */
- CHANGE_BAR_OFFSET, // 66
+ CHANGE_BAR_OFFSET(Atomicity.ATOMIC, true), // 66
/** Constant indicating a "change-bar-placement" FO property. */
- CHANGE_BAR_PLACEMENT, // 67
+ CHANGE_BAR_PLACEMENT(Atomicity.ATOMIC, true), // 67
/** Constant indicating a "change-bar-style" FO property. */
- CHANGE_BAR_STYLE, // 68
+ CHANGE_BAR_STYLE(Atomicity.ATOMIC, true), // 68
/** Constant indicating a "change-bar-width" FO property. */
- CHANGE_BAR_WIDTH, // 69
+ CHANGE_BAR_WIDTH(Atomicity.ATOMIC, true), // 69
/** Constant indicating a "character" FO property. */
- CHARACTER, // 70
+ CHARACTER(Atomicity.ATOMIC, false), // 70
/** Constant indicating a "clear" FO property. */
- CLEAR, // 71
+ CLEAR(Atomicity.ATOMIC, false), // 71
/** Constant indicating a "clip" FO property. */
- CLIP, // 72
+ CLIP(Atomicity.ATOMIC, false), // 72
/** Constant indicating a "color" FO property. */
- COLOR, // 73
+ COLOR(Atomicity.ATOMIC, true), // 73
/** Constant indicating a "color-profile-name" FO property. */
- COLOR_PROFILE_NAME, // 74
+ COLOR_PROFILE_NAME(Atomicity.ATOMIC, false), // 74
/** Constant indicating a "column-count" FO property. */
- COLUMN_COUNT, // 75
+ COLUMN_COUNT(Atomicity.ATOMIC, false), // 75
/** Constant indicating a "column-gap" FO property. */
- COLUMN_GAP, // 76
+ COLUMN_GAP(Atomicity.ATOMIC, false), // 76
/** Constant indicating a "column-number" FO property. */
- COLUMN_NUMBER, // 77
+ COLUMN_NUMBER(Atomicity.ATOMIC, false), // 77
/** Constant indicating a "column-width" FO property. */
- COLUMN_WIDTH, // 78
+ COLUMN_WIDTH(Atomicity.ATOMIC, false), // 78
/** Constant indicating a "content-height" FO property. */
- CONTENT_HEIGHT, // 79
+ CONTENT_HEIGHT(Atomicity.ATOMIC, false), // 79
/** Constant indicating a "content-type" FO property. */
- CONTENT_TYPE, // 80
+ CONTENT_TYPE(Atomicity.ATOMIC, false), // 80
/** Constant indicating a "content-width" FO property. */
- CONTENT_WIDTH, // 81
+ CONTENT_WIDTH(Atomicity.ATOMIC, false), // 81
/** Constant indicating a "country" FO property. */
- COUNTRY, // 82
+ COUNTRY(Atomicity.ATOMIC, true), // 82
/** Constant indicating a "cue" FO property. */
- CUE, // 83
+ CUE(Atomicity.SHORTHAND, false), // 83
/** Constant indicating a "cue-after" FO property. */
- CUE_AFTER, // 84
+ CUE_AFTER(Atomicity.ATOMIC, false), // 84
/** Constant indicating a "cue-before" FO property. */
- CUE_BEFORE, // 85
+ CUE_BEFORE(Atomicity.ATOMIC, false), // 85
/** Constant indicating a "destination-placement-offset" FO property. */
- DESTINATION_PLACEMENT_OFFSET, // 86
+ DESTINATION_PLACEMENT_OFFSET(Atomicity.ATOMIC, false), // 86
/** Constant indicating a "direction" FO property. */
- DIRECTION, // 87
+ DIRECTION(Atomicity.ATOMIC, true), // 87
/** Constant indicating a "display-align" FO property. */
- DISPLAY_ALIGN, // 88
+ DISPLAY_ALIGN(Atomicity.ATOMIC, true), // 88
/** Constant indicating a "dominant-baseline" FO property. */
- DOMINANT_BASELINE, // 89
+ DOMINANT_BASELINE(Atomicity.ATOMIC, false), // 89
/** Constant indicating an "elevation" FO property. */
- ELEVATION, // 90
+ ELEVATION(Atomicity.ATOMIC, true), // 90
/** Constant indicating an "empty-cells" FO property. */
- EMPTY_CELLS, // 91
+ EMPTY_CELLS(Atomicity.ATOMIC, true), // 91
/** Constant indicating an "end-indent" FO property. */
- END_INDENT, // 92
+ END_INDENT(Atomicity.ATOMIC, true), // 92
/** Constant indicating an "ends-row" FO property. */
- ENDS_ROW, // 93
+ ENDS_ROW(Atomicity.ATOMIC, false), // 93
/** Constant indicating an "extent" FO property. */
- EXTENT, // 94
+ EXTENT(Atomicity.ATOMIC, false), // 94
/** Constant indicating an "external-destination" FO property. */
- EXTERNAL_DESTINATION, // 95
+ EXTERNAL_DESTINATION(Atomicity.ATOMIC, false), // 95
/** Constant indicating a "float" FO property. */
- FLOAT, // 96
+ FLOAT(Atomicity.ATOMIC, false), // 96
/** Constant indicating a "flow-map-name" FO property. */
- FLOW_MAP_NAME, // 97
+ FLOW_MAP_NAME(Atomicity.ATOMIC, false), // 97
/** Constant indicating a "flow-map-reference" FO property. */
- FLOW_MAP_REFERENCE, // 98
+ FLOW_MAP_REFERENCE(Atomicity.ATOMIC, false), // 98
/** Constant indicating a "flow-name" FO property. */
- FLOW_NAME, // 99
+ FLOW_NAME(Atomicity.ATOMIC, false), // 99
/** Constant indicating a "flow-name-reference" FO property. */
- FLOW_NAME_REFERENCE, // 100
+ FLOW_NAME_REFERENCE(Atomicity.ATOMIC, false), // 100
/** Constant indicating a "font" FO property. */
- FONT, // 101
+ FONT(Atomicity.SHORTHAND, true), // 101
/** Constant indicating a "font-family" FO property. */
- FONT_FAMILY, // 102
+ FONT_FAMILY(Atomicity.ATOMIC, true), // 102
/** Constant indicating a "font-selection-strategy" FO property. */
- FONT_SELECTION_STRATEGY, // 103
+ FONT_SELECTION_STRATEGY(Atomicity.ATOMIC, true), // 103
/** Constant indicating a "font-size" FO property. */
- FONT_SIZE, // 104
+ FONT_SIZE(Atomicity.ATOMIC, true), // 104
/** Constant indicating a "font-size-adjust" FO property. */
- FONT_SIZE_ADJUST, // 105
+ FONT_SIZE_ADJUST(Atomicity.ATOMIC, true), // 105
/** Constant indicating a "font-stretch" FO property. */
- FONT_STRETCH, // 106
+ FONT_STRETCH(Atomicity.ATOMIC, true), // 106
/** Constant indicating a "font-style" FO property. */
- FONT_STYLE, // 107
+ FONT_STYLE(Atomicity.ATOMIC, true), // 107
/** Constant indicating a "font-variant" FO property. */
- FONT_VARIANT, // 108
+ FONT_VARIANT(Atomicity.ATOMIC, true), // 108
/** Constant indicating a "font-weight" FO property. */
- FONT_WEIGHT, // 109
+ FONT_WEIGHT(Atomicity.ATOMIC, true), // 109
/** Constant indicating a "force-page-count" FO property. */
- FORCE_PAGE_COUNT, // 110
+ FORCE_PAGE_COUNT(Atomicity.ATOMIC, false), // 110
/** Constant indicating a "format" FO property. */
- FORMAT, // 111
+ FORMAT(Atomicity.ATOMIC, false), // 111
/** Constant indicating a "glyph-orientation-horizontal" FO property. */
- GLYPH_ORIENTATION_HORIZONTAL, // 112
+ GLYPH_ORIENTATION_HORIZONTAL(Atomicity.ATOMIC, true), // 112
/** Constant indicating a "glyph-orientation-vertical" FO property. */
- GLYPH_ORIENTATION_VERTICAL, // 113
+ GLYPH_ORIENTATION_VERTICAL(Atomicity.ATOMIC, true), // 113
/** Constant indicating a "grouping-separator" FO property. */
- GROUPING_SEPARATOR, // 114
+ GROUPING_SEPARATOR(Atomicity.ATOMIC, false), // 114
/** Constant indicating a "grouping-size" FO property. */
- GROUPING_SIZE, // 115
+ GROUPING_SIZE(Atomicity.ATOMIC, false), // 115
/** Constant indicating a "height" FO property. */
- HEIGHT, // 116
+ HEIGHT(Atomicity.ATOMIC, false), // 116
/** Constant indicating a "hyphenate" FO property. */
- HYPHENATE, // 117
+ HYPHENATE(Atomicity.ATOMIC, true), // 117
/** Constant indicating a "hyphenation-character" FO property. */
- HYPHENATION_CHARACTER, // 118
+ HYPHENATION_CHARACTER(Atomicity.ATOMIC, true), // 118
/** Constant indicating a "hyphenation-keep" FO property. */
- HYPHENATION_KEEP, // 119
+ HYPHENATION_KEEP(Atomicity.ATOMIC, true), // 119
/** Constant indicating a "hyphenation-ladder-count" FO property. */
- HYPHENATION_LADDER_COUNT, // 120
+ HYPHENATION_LADDER_COUNT(Atomicity.ATOMIC, true), // 120
/** Constant indicating a "hyphenation-push-character-count" FO
* property. */
- HYPHENATION_PUSH_CHARACTER_COUNT, // 121
+ HYPHENATION_PUSH_CHARACTER_COUNT(Atomicity.ATOMIC, true), // 121
/** Constant indicating a "hyphenation-remain-character-count" FO
* property. */
- HYPHENATION_REMAIN_CHARACTER_COUNT, // 122
+ HYPHENATION_REMAIN_CHARACTER_COUNT(Atomicity.ATOMIC, true), // 122
/** Constant indicating an "id" FO property. */
- ID, // 123
+ ID(Atomicity.ATOMIC, false), // 123
/** Constant indicating an "index-class" FO property. */
- INDEX_CLASS, // 124
+ INDEX_CLASS(Atomicity.ATOMIC, false), // 124
/** Constant indicating an "index-key" FO property. */
- INDEX_KEY, // 125
+ INDEX_KEY(Atomicity.ATOMIC, false), // 125
/** Constant indicating an "indicate-destination" FO property. */
- INDICATE_DESTINATION, // 126
+ INDICATE_DESTINATION(Atomicity.ATOMIC, false), // 126
/** Constant indicating an "initial-page-number" FO property. */
- INITIAL_PAGE_NUMBER, // 127
+ INITIAL_PAGE_NUMBER(Atomicity.ATOMIC, false), // 127
/** Constant indicating an "inline-progression-dimension" FO property. */
- INLINE_PROGRESSION_DIMENSION, // 128
+ INLINE_PROGRESSION_DIMENSION(Atomicity.ATOMIC, false), // 128
/** Constant indicating an "internal-destination" FO property. */
- INTERNAL_DESTINATION, // 129
+ INTERNAL_DESTINATION(Atomicity.ATOMIC, false), // 129
/** Constant indicating an "intrinsic-scale-value" FO property. */
- INTRINSIC_SCALE_VALUE, // 130
+ INTRINSIC_SCALE_VALUE(Atomicity.ATOMIC, true), // 130
/** Constant indicating an "intrusion-displace" FO property. */
- INTRUSION_DISPLACE, // 131
+ INTRUSION_DISPLACE(Atomicity.ATOMIC, false), // 131
/** Constant indicating a "keep-together" FO property. */
- KEEP_TOGETHER, // 132
+ KEEP_TOGETHER(Atomicity.ATOMIC, true), // 132
/** Constant indicating a "keep-with-next" FO property. */
- KEEP_WITH_NEXT, // 133
+ KEEP_WITH_NEXT(Atomicity.ATOMIC, false), // 133
/** Constant indicating a "keep-with-previous" FO property. */
- KEEP_WITH_PREVIOUS, // 134
+ KEEP_WITH_PREVIOUS(Atomicity.ATOMIC, false), // 134
/** Constant indicating a "language" FO property. */
- LANGUAGE, // 135
+ LANGUAGE(Atomicity.ATOMIC, true), // 135
/** Constant indicating a "last-line-end-indent" FO property. */
- LAST_LINE_END_INDENT, // 136
+ LAST_LINE_END_INDENT(Atomicity.ATOMIC, true), // 136
/** Constant indicating a "leader-alignment" FO property. */
- LEADER_ALIGNMENT, // 137
+ LEADER_ALIGNMENT(Atomicity.ATOMIC, true), // 137
/** Constant indicating a "leader-length" FO property. */
- LEADER_LENGTH, // 138
+ LEADER_LENGTH(Atomicity.ATOMIC, true), // 138
/** Constant indicating a "leader-pattern" FO property. */
- LEADER_PATTERN, // 139
+ LEADER_PATTERN(Atomicity.ATOMIC, true), // 139
/** Constant indicating a "leader-pattern-width" FO property. */
- LEADER_PATTERN_WIDTH, // 140
+ LEADER_PATTERN_WIDTH(Atomicity.ATOMIC, true), // 140
/** Constant indicating a "left" FO property. */
- LEFT, // 141
+ LEFT(Atomicity.ATOMIC, false), // 141
/** Constant indicating a "letter-spacing" FO property. */
- LETTER_SPACING, // 142
+ LETTER_SPACING(Atomicity.ATOMIC, true), // 142
/** Constant indicating a "letter-value" FO property. */
- LETTER_VALUE, // 143
+ LETTER_VALUE(Atomicity.ATOMIC, false), // 143
/** Constant indicating a "line-height" FO property. */
- LINE_HEIGHT, // 144
+ LINE_HEIGHT(Atomicity.ATOMIC, true), // 144
/** Constant indicating a "line-height-shift-adjustment" FO property. */
- LINE_HEIGHT_SHIFT_ADJUSTMENT, // 145
+ LINE_HEIGHT_SHIFT_ADJUSTMENT(Atomicity.ATOMIC, true), // 145
/** Constant indicating a "line-stacking-strategy" FO property. */
- LINE_STACKING_STRATEGY, // 146
+ LINE_STACKING_STRATEGY(Atomicity.ATOMIC, true), // 146
/** Constant indicating a "linefeed-treatment" FO property. */
- LINEFEED_TREATMENT, // 147
+ LINEFEED_TREATMENT(Atomicity.ATOMIC, true), // 147
/** Constant indicating a "margin" FO property. */
- MARGIN, // 148
+ MARGIN(Atomicity.SHORTHAND, false), // 148
/** Constant indicating a "margin-bottom" FO property. */
- MARGIN_BOTTOM, // 149
+ MARGIN_BOTTOM(Atomicity.ATOMIC, false), // 149
/** Constant indicating a "margin-left" FO property. */
- MARGIN_LEFT, // 150
+ MARGIN_LEFT(Atomicity.ATOMIC, false), // 150
/** Constant indicating a "margin-right" FO property. */
- MARGIN_RIGHT, // 151
+ MARGIN_RIGHT(Atomicity.ATOMIC, false), // 151
/** Constant indicating a "margin-top" FO property. */
- MARGIN_TOP, // 152
+ MARGIN_TOP(Atomicity.ATOMIC, false), // 152
/** Constant indicating a "marker-class-name" FO property. */
- MARKER_CLASS_NAME, // 153
+ MARKER_CLASS_NAME(Atomicity.ATOMIC, false), // 153
/** Constant indicating a "master-name" FO property. */
- MASTER_NAME, // 154
+ MASTER_NAME(Atomicity.ATOMIC, false), // 154
/** Constant indicating a "master-reference" FO property. */
- MASTER_REFERENCE, // 155
+ MASTER_REFERENCE(Atomicity.ATOMIC, false), // 155
/** Constant indicating a "max-height" FO property. */
- MAX_HEIGHT, // 156
+ MAX_HEIGHT(Atomicity.ATOMIC, false), // 156
/** Constant indicating a "max-width" FO property. */
- MAX_WIDTH, // 157
+ MAX_WIDTH(Atomicity.ATOMIC, false), // 157
/** Constant indicating a "maximum-repeats" FO property. */
- MAXIMUM_REPEATS, // 158
+ MAXIMUM_REPEATS(Atomicity.ATOMIC, false), // 158
/** Constant indicating a "media-usage" FO property. */
- MEDIA_USAGE, // 159
+ MEDIA_USAGE(Atomicity.ATOMIC, false), // 159
/** Constant indicating a "merge-pages-across-index-key-references" FO
* property. */
- MERGE_PAGES_ACROSS_INDEX_KEY_REFERENCES, // 160
+ MERGE_PAGES_ACROSS_INDEX_KEY_REFERENCES(Atomicity.ATOMIC, true), // 160
/** Constant indicating a "merge-ranges-across-index-key-references" FO
* property. */
- MERGE_RANGES_ACROSS_INDEX_KEY_REFERENCES, // 161
+ MERGE_RANGES_ACROSS_INDEX_KEY_REFERENCES(Atomicity.ATOMIC, true), // 161
/** Constant indicating a "merge-sequential-page-numbers" FO property. */
- MERGE_SEQUENTIAL_PAGE_NUMBERS, // 162
+ MERGE_SEQUENTIAL_PAGE_NUMBERS(Atomicity.ATOMIC, true), // 162
/** Constant indicating a "min-height" FO property. */
- MIN_HEIGHT, // 163
+ MIN_HEIGHT(Atomicity.ATOMIC, false), // 163
/** Constant indicating a "min-width" FO property. */
- MIN_WIDTH, // 164
+ MIN_WIDTH(Atomicity.ATOMIC, false), // 164
/** Constant indicating a "number-columns-repeated" FO property. */
- NUMBER_COLUMNS_REPEATED, // 165
+ NUMBER_COLUMNS_REPEATED(Atomicity.ATOMIC, false), // 165
/** Constant indicating a "number-columns-spanned" FO property. */
- NUMBER_COLUMNS_SPANNED, // 166
+ NUMBER_COLUMNS_SPANNED(Atomicity.ATOMIC, false), // 166
/** Constant indicating a "number-rows-spanned" FO property. */
- NUMBER_ROWS_SPANNED, // 167
+ NUMBER_ROWS_SPANNED(Atomicity.ATOMIC, false), // 167
/** Constant indicating an "odd-or-even" FO property. */
- ODD_OR_EVEN, // 168
+ ODD_OR_EVEN(Atomicity.ATOMIC, false), // 168
/** Constant indicating an "orphans" FO property. */
- ORPHANS, // 169
+ ORPHANS(Atomicity.ATOMIC, true), // 169
/** Constant indicating an "overflow" FO property. */
- OVERFLOW, // 170
+ OVERFLOW(Atomicity.ATOMIC, false), // 170
/** Constant indicating a "padding" FO property. */
- PADDING, // 171
+ PADDING(Atomicity.SHORTHAND, false), // 171
/** Constant indicating a "padding-after" FO property. */
- PADDING_AFTER, // 172
+ PADDING_AFTER(Atomicity.ATOMIC, false), // 172
/** Constant indicating a "padding-before" FO property. */
- PADDING_BEFORE, // 173
+ PADDING_BEFORE(Atomicity.ATOMIC, false), // 173
/** Constant indicating a "padding-bottom" FO property. */
- PADDING_BOTTOM, // 174
+ PADDING_BOTTOM(Atomicity.ATOMIC, false), // 174
/** Constant indicating a "padding-end" FO property. */
- PADDING_END, // 175
+ PADDING_END(Atomicity.ATOMIC, false), // 175
/** Constant indicating a "padding-left" FO property. */
- PADDING_LEFT, // 176
+ PADDING_LEFT(Atomicity.ATOMIC, false), // 176
/** Constant indicating a "padding-right" FO property. */
- PADDING_RIGHT, // 177
+ PADDING_RIGHT(Atomicity.ATOMIC, false), // 177
/** Constant indicating a "padding-start" FO property. */
- PADDING_START, // 178
+ PADDING_START(Atomicity.ATOMIC, false), // 178
/** Constant indicating a "padding-top" FO property. */
- PADDING_TOP, // 179
+ PADDING_TOP(Atomicity.ATOMIC, false), // 179
/** Constant indicating a "page-break-after" FO property. */
- PAGE_BREAK_AFTER, // 180
+ PAGE_BREAK_AFTER(Atomicity.SHORTHAND, false), // 180
/** Constant indicating a "page-break-before" FO property. */
- PAGE_BREAK_BEFORE, // 181
+ PAGE_BREAK_BEFORE(Atomicity.SHORTHAND, false), // 181
/** Constant indicating a "page-break-inside" FO property. */
- PAGE_BREAK_INSIDE, // 182
+ PAGE_BREAK_INSIDE(Atomicity.SHORTHAND, true), // 182
/** Constant indicating a "page-citation-strategy" FO property. */
- PAGE_CITATION_STRATEGY, // 183
+ PAGE_CITATION_STRATEGY(Atomicity.ATOMIC, false), // 183
/** Constant indicating a "page-height" FO property. */
- PAGE_HEIGHT, // 184
+ PAGE_HEIGHT(Atomicity.ATOMIC, false), // 184
/** Constant indicating a "page-number-treatment" FO property. */
- PAGE_NUMBER_TREATMENT, // 185
+ PAGE_NUMBER_TREATMENT(Atomicity.ATOMIC, true), // 185
/** Constant indicating a "page-position" FO property. */
- PAGE_POSITION, // 186
+ PAGE_POSITION(Atomicity.ATOMIC, false), // 186
/** Constant indicating a "page-width" FO property. */
- PAGE_WIDTH, // 187
+ PAGE_WIDTH(Atomicity.ATOMIC, false), // 187
/** Constant indicating a "pause" FO property. */
- PAUSE, // 188
+ PAUSE(Atomicity.SHORTHAND, false), // 188
/** Constant indicating a "pause-after" FO property. */
- PAUSE_AFTER, // 189
+ PAUSE_AFTER(Atomicity.ATOMIC, false), // 189
/** Constant indicating a "pause-before" FO property. */
- PAUSE_BEFORE, // 190
+ PAUSE_BEFORE(Atomicity.ATOMIC, false), // 190
/** Constant indicating a "pitch" FO property. */
- PITCH, // 191
+ PITCH(Atomicity.ATOMIC, true), // 191
/** Constant indicating a "pitch-range" FO property. */
- PITCH_RANGE, // 192
+ PITCH_RANGE(Atomicity.ATOMIC, true), // 192
/** Constant indicating a "play-during" FO property. */
- PLAY_DURING, // 193
+ PLAY_DURING(Atomicity.ATOMIC, false), // 193
/** Constant indicating a "position" FO property. */
- POSITION, // 194
+ POSITION(Atomicity.SHORTHAND, false), // 194
/** Constant indicating a "precedence" FO property. */
- PRECEDENCE, // 195
+ PRECEDENCE(Atomicity.ATOMIC, false), // 195
/** Constant indicating a "provisional-distance-between-starts" FO
* property. */
- PROVISIONAL_DISTANCE_BETWEEN_STARTS, // 196
+ PROVISIONAL_DISTANCE_BETWEEN_STARTS(Atomicity.ATOMIC, true), // 196
/** Constant indicating a "provisional-label-separation" FO property. */
- PROVISIONAL_LABEL_SEPARATION, // 197
+ PROVISIONAL_LABEL_SEPARATION(Atomicity.ATOMIC, true), // 197
/** Constant indicating a "ref-id" FO property. */
- REF_ID, // 198
+ REF_ID(Atomicity.ATOMIC, false), // 198
/** Constant indicating a "ref-index-key" FO property. */
- REF_INDEX_KEY, // 199
+ REF_INDEX_KEY(Atomicity.ATOMIC, false), // 199
/** Constant indicating a "reference-orientation" FO property. */
- REFERENCE_ORIENTATION, // 200
+ REFERENCE_ORIENTATION(Atomicity.ATOMIC, false), // 200
/** Constant indicating a "region-name" FO property. */
- REGION_NAME, // 201
+ REGION_NAME(Atomicity.ATOMIC, false), // 201
/** Constant indicating a "region-name-reference" FO property. */
- REGION_NAME_REFERENCE, // 202
+ REGION_NAME_REFERENCE(Atomicity.ATOMIC, false), // 202
/** Constant indicating a "relative-align" FO property. */
- RELATIVE_ALIGN, // 203
+ RELATIVE_ALIGN(Atomicity.ATOMIC, true), // 203
/** Constant indicating a "relative-position" FO property. */
- RELATIVE_POSITION, // 204
+ RELATIVE_POSITION(Atomicity.ATOMIC, false), // 204
/** Constant indicating a "rendering-intent" FO property. */
- RENDERING_INTENT, // 205
+ RENDERING_INTENT(Atomicity.ATOMIC, false), // 205
/** Constant indicating a "retrieve-boundary" FO property. */
- RETRIEVE_BOUNDARY, // 206
+ RETRIEVE_BOUNDARY(Atomicity.ATOMIC, false), // 206
/** Constant indicating a "retrieve-boundary-within-table" FO property. */
- RETRIEVE_BOUNDARY_WITHIN_TABLE, // 207
+ RETRIEVE_BOUNDARY_WITHIN_TABLE(Atomicity.ATOMIC, false), // 207
/** Constant indicating a "retrieve-class-name" FO property. */
- RETRIEVE_CLASS_NAME, // 208
+ RETRIEVE_CLASS_NAME(Atomicity.ATOMIC, false), // 208
/** Constant indicating a "retrieve-position" FO property. */
- RETRIEVE_POSITION, // 209
+ RETRIEVE_POSITION(Atomicity.ATOMIC, false), // 209
/** Constant indicating a "retrieve-position-within-table" FO property. */
- RETRIEVE_POSITION_WITHIN_TABLE, // 210
+ RETRIEVE_POSITION_WITHIN_TABLE(Atomicity.ATOMIC, false), // 210
/** Constant indicating a "richness" FO property. */
- RICHNESS, // 211
+ RICHNESS(Atomicity.ATOMIC, true), // 211
/** Constant indicating a "right" FO property. */
- RIGHT, // 212
+ RIGHT(Atomicity.ATOMIC, false), // 212
/** Constant indicating a "role" FO property. */
- ROLE, // 213
+ ROLE(Atomicity.ATOMIC, false), // 213
/** Constant indicating a "rule-style" FO property. */
- RULE_STYLE, // 214
+ RULE_STYLE(Atomicity.ATOMIC, true), // 214
/** Constant indicating a "rule-thickness" FO property. */
- RULE_THICKNESS, // 215
+ RULE_THICKNESS(Atomicity.ATOMIC, true), // 215
/** Constant indicating a "scale-option" FO property. */
- SCALE_OPTION, // 216
+ SCALE_OPTION(Atomicity.ATOMIC, true), // 216
/** Constant indicating a "scaling" FO property. */
- SCALING, // 217
+ SCALING(Atomicity.ATOMIC, false), // 217
/** Constant indicating a "scaling-method" FO property. */
- SCALING_METHOD, // 218
+ SCALING_METHOD(Atomicity.ATOMIC, false), // 218
/** Constant indicating a "score-spaces" FO property. */
- SCORE_SPACES, // 219
+ SCORE_SPACES(Atomicity.ATOMIC, true), // 219
/** Constant indicating a "script" FO property. */
- SCRIPT, // 220
+ SCRIPT(Atomicity.ATOMIC, true), // 220
/** Constant indicating a "show-destination" FO property. */
- SHOW_DESTINATION, // 221
+ SHOW_DESTINATION(Atomicity.ATOMIC, false), // 221
/** Constant indicating a "size" FO property. */
- SIZE, // 222
+ SIZE(Atomicity.SHORTHAND, false), // 222
/** Constant indicating a "source-document" FO property. */
- SOURCE_DOCUMENT, // 223
+ SOURCE_DOCUMENT(Atomicity.ATOMIC, false), // 223
/** Constant indicating a "space-after" FO property. */
- SPACE_AFTER, // 224
+ SPACE_AFTER(Atomicity.ATOMIC, false), // 224
/** Constant indicating a "space-before" FO property. */
- SPACE_BEFORE, // 225
+ SPACE_BEFORE(Atomicity.ATOMIC, false), // 225
/** Constant indicating a "space-end" FO property. */
- SPACE_END, // 226
+ SPACE_END(Atomicity.ATOMIC, false), // 226
/** Constant indicating a "space-start" FO property. */
- SPACE_START, // 227
+ SPACE_START(Atomicity.ATOMIC, false), // 227
/** Constant indicating a "span" FO property. */
- SPAN, // 228
+ SPAN(Atomicity.ATOMIC, false), // 228
/** Constant indicating a "speak" FO property. */
- SPEAK, // 229
+ SPEAK(Atomicity.ATOMIC, true), // 229
/** Constant indicating a "speak-header" FO property. */
- SPEAK_HEADER, // 230
+ SPEAK_HEADER(Atomicity.ATOMIC, true), // 230
/** Constant indicating a "speak-numeral" FO property. */
- SPEAK_NUMERAL, // 231
+ SPEAK_NUMERAL(Atomicity.ATOMIC, true), // 231
/** Constant indicating a "speak-punctuation" FO property. */
- SPEAK_PUNCTUATION, // 232
+ SPEAK_PUNCTUATION(Atomicity.ATOMIC, true), // 232
/** Constant indicating a "speech-rate" FO property. */
- SPEECH_RATE, // 233
+ SPEECH_RATE(Atomicity.ATOMIC, true), // 233
/** Constant indicating a "src" FO property. */
- SRC, // 234
+ SRC(Atomicity.ATOMIC, false), // 234
/** Constant indicating a "start-indent" FO property. */
- START_INDENT, // 235
+ START_INDENT(Atomicity.ATOMIC, true), // 235
/** Constant indicating a "starting-state" FO property. */
- STARTING_STATE, // 236
+ STARTING_STATE(Atomicity.ATOMIC, false), // 236
/** Constant indicating a "starts-row" FO property. */
- STARTS_ROW, // 237
+ STARTS_ROW(Atomicity.ATOMIC, false), // 237
/** Constant indicating a "stress" FO property. */
- STRESS, // 238
+ STRESS(Atomicity.ATOMIC, true), // 238
/** Constant indicating a "suppress-at-line-break" FO property. */
- SUPPRESS_AT_LINE_BREAK, // 239
+ SUPPRESS_AT_LINE_BREAK(Atomicity.ATOMIC, false), // 239
/** Constant indicating a "switch-to" FO property. */
- SWITCH_TO, // 240
+ SWITCH_TO(Atomicity.ATOMIC, false), // 240
/** Constant indicating a "table-layout" FO property. */
- TABLE_LAYOUT, // 241
+ TABLE_LAYOUT(Atomicity.ATOMIC, false), // 241
/** Constant indicating a "table-omit-footer-at-break" FO property. */
- TABLE_OMIT_FOOTER_AT_BREAK, // 242
+ TABLE_OMIT_FOOTER_AT_BREAK(Atomicity.ATOMIC, false), // 242
/** Constant indicating a "table-omit-header-at-break" FO property. */
- TABLE_OMIT_HEADER_AT_BREAK, // 243
+ TABLE_OMIT_HEADER_AT_BREAK(Atomicity.ATOMIC, false), // 243
/** Constant indicating a "target-presentation-context" FO property. */
- TARGET_PRESENTATION_CONTEXT, // 244
+ TARGET_PRESENTATION_CONTEXT(Atomicity.ATOMIC, false), // 244
/** Constant indicating a "target-processing-context" FO property. */
- TARGET_PROCESSING_CONTEXT, // 245
+ TARGET_PROCESSING_CONTEXT(Atomicity.ATOMIC, false), // 245
/** Constant indicating a "target-stylesheet" FO property. */
- TARGET_STYLESHEET, // 246
+ TARGET_STYLESHEET(Atomicity.ATOMIC, false), // 246
/** Constant indicating a "text-align" FO property. */
- TEXT_ALIGN, // 247
+ TEXT_ALIGN(Atomicity.ATOMIC, true), // 247
/** Constant indicating a "text-align-last" FO property. */
- TEXT_ALIGN_LAST, // 248
+ TEXT_ALIGN_LAST(Atomicity.ATOMIC, true), // 248
/** Constant indicating a "text-altitude" FO property. */
- TEXT_ALTITUDE, // 249
+ TEXT_ALTITUDE(Atomicity.ATOMIC, false), // 249
/** Constant indicating a "text-decoration" FO property. */
- TEXT_DECORATION, // 250
+ TEXT_DECORATION(Atomicity.ATOMIC, false), // 250
/** Constant indicating a "text-depth" FO property. */
- TEXT_DEPTH, // 251
+ TEXT_DEPTH(Atomicity.ATOMIC, false), // 251
/** Constant indicating a "text-indent" FO property. */
- TEXT_INDENT, // 252
+ TEXT_INDENT(Atomicity.ATOMIC, true), // 252
/** Constant indicating a "text-shadow" FO property. */
- TEXT_SHADOW, // 253
+ TEXT_SHADOW(Atomicity.ATOMIC, false), // 253
/** Constant indicating a "text-transform" FO property. */
- TEXT_TRANSFORM, // 254
+ TEXT_TRANSFORM(Atomicity.ATOMIC, true), // 254
/** Constant indicating a "top" FO property. */
- TOP, // 255
+ TOP(Atomicity.ATOMIC, false), // 255
/** Constant indicating a "treat-as-word-space" FO property. */
- TREAT_AS_WORD_SPACE, // 256
+ TREAT_AS_WORD_SPACE(Atomicity.ATOMIC, false), // 256
/** Constant indicating a "unicode-bidi" FO property. */
- UNICODE_BIDI, // 257
+ UNICODE_BIDI(Atomicity.ATOMIC, false), // 257
/** Constant indicating a "vertical-align" FO property. */
- VERTICAL_ALIGN, // 258
+ VERTICAL_ALIGN(Atomicity.SHORTHAND, false), // 258
/** Constant indicating a "visibility" FO property. */
- VISIBILITY, // 259
+ VISIBILITY(Atomicity.ATOMIC, true), // 259
/** Constant indicating a "voice-family" FO property. */
- VOICE_FAMILY, // 260
+ VOICE_FAMILY(Atomicity.ATOMIC, true), // 260
/** Constant indicating a "volume" FO property. */
- VOLUME, // 261
+ VOLUME(Atomicity.ATOMIC, true), // 261
/** Constant indicating a "white-space" FO property. */
- WHITE_SPACE, // 262
+ WHITE_SPACE(Atomicity.SHORTHAND, true), // 262
/** Constant indicating a "white-space-collapse" FO property. */
- WHITE_SPACE_COLLAPSE, // 263
+ WHITE_SPACE_COLLAPSE(Atomicity.ATOMIC, true), // 263
/** Constant indicating a "white-space-treatment" FO property. */
- WHITE_SPACE_TREATMENT, // 264
+ WHITE_SPACE_TREATMENT(Atomicity.ATOMIC, true), // 264
/** Constant indicating a "widows" FO property. */
- WIDOWS, // 265
+ WIDOWS(Atomicity.ATOMIC, true), // 265
/** Constant indicating a "width" FO property. */
- WIDTH, // 266
+ WIDTH(Atomicity.ATOMIC, false), // 266
/** Constant indicating a "word-spacing" FO property. */
- WORD_SPACING, // 267
+ WORD_SPACING(Atomicity.ATOMIC, true), // 267
/** Constant indicating a "wrap-option" FO property. */
- WRAP_OPTION, // 268
+ WRAP_OPTION(Atomicity.ATOMIC, true), // 268
/** Constant indicating a "writing-mode" FO property. */
- WRITING_MODE, // 269
+ WRITING_MODE(Atomicity.ATOMIC, true), // 269
/** Constant indicating a "z-index" FO property. */
- Z_INDEX; // 270
+ Z_INDEX(Atomicity.ATOMIC, false); // 270
/**
- * Keep this list sorted alphabetically, so that we can use a binary
+ * Keep this list sorted alphabetically(Atomicity.ATOMIC), so that we can use a binary
* search on it.
*/
private static final String[] PROPERTY_NAME_LIST = {
@@ -1135,6 +1135,22 @@
"z-index", // 270
};
+ /** The atomicity of this property. */
+ private Atomicity atomicity;
+
+ /** Indicates whether this property is inherited or not. */
+ private boolean isInherited;
+
+ /**
+ * Constructor.
+ * @param atomicity The atomicity of this property.
+ * @param isInherited Indicates whether this property is inherited or not.
+ */
+ FoPropertyId(final Atomicity atomicity, final boolean isInherited) {
+ this.atomicity = atomicity;
+ this.isInherited = isInherited;
+ }
+
@Override
public String getAttributeName() {
return FoPropertyId.PROPERTY_NAME_LIST[this.ordinal()];
@@ -1172,4 +1188,14 @@
return FoPropertyId.values()[ordinal];
}
+ @Override
+ public Atomicity getType() {
+ return this.atomicity;
+ }
+
+ @Override
+ public boolean isInherited() {
+ return this.isInherited;
+ }
+
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/xml/XmlPropertyId.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/xml/XmlPropertyId.java 2022-12-28 05:19:42 UTC (rev 12971)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/xml/XmlPropertyId.java 2022-12-28 19:17:20 UTC (rev 12972)
@@ -74,4 +74,14 @@
return XmlPropertyId.values()[ordinal];
}
+ @Override
+ ...
[truncated message content] |
|
From: <vic...@us...> - 2022-12-28 05:19:44
|
Revision: 12971
http://sourceforge.net/p/foray/code/12971
Author: victormote
Date: 2022-12-28 05:19:42 +0000 (Wed, 28 Dec 2022)
Log Message:
-----------
Minor improvements to property parsing.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdDominantBaseline.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnAbstractNamedProperty.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromNearestSpecifiedValue.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromPageMasterRegion.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromParent.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromTableColumn.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnInheritedPropertyValue.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnMergePropertyValues.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdDominantBaseline.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdDominantBaseline.java 2022-12-28 05:12:51 UTC (rev 12970)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdDominantBaseline.java 2022-12-28 05:19:42 UTC (rev 12971)
@@ -29,10 +29,13 @@
package org.foray.fotree.fo.prop;
import org.foray.fotree.FoObj;
+import org.foray.fotree.PropertyException;
import org.foray.fotree.fo.AbstractFoProperty;
import org.foray.fotree.fo.FoPropertyId;
import org.foray.fotree.fo.FoPropertyKeyword;
import org.foray.fotree.fo.FoValue;
+import org.foray.fotree.parse.PropertyParser;
+import org.foray.fotree.value.FnAbstractNamedProperty;
import org.foray.fotree.value.PropertyValue;
import org.axsl.fotree.FoContext;
@@ -114,6 +117,15 @@
}
/**
+ * Private constructor.
+ * To obtain an instance of this class, use {@link #getInstance(String)}.
+ * @param attributeValue The unparsed property value.
+ */
+ private PdDominantBaseline(final FnAbstractNamedProperty attributeValue) {
+ this.value = attributeValue;
+ }
+
+ /**
* Converts the unparsed property value into its parsed, storable value.
* @param value The unparsed property value.
* @return The instance of this property whose value is {@code value}, or null if it is not valid.
@@ -147,7 +159,24 @@
case "inherit":
return PdDominantBaseline.INHERIT;
default:
- return null;
+ try {
+ final PropertyValue parsedValue =
+ PropertyParser.getInstance().parse(value, FoPropertyId.DOMINANT_BASELINE);
+ if (parsedValue == null) {
+ return null;
+ }
+ if (! (parsedValue instanceof FnAbstractNamedProperty)) {
+ return null;
+ }
+ final FnAbstractNamedProperty named = (FnAbstractNamedProperty) parsedValue;
+ if (! (named.getPropertyType() == FoPropertyId.DOMINANT_BASELINE)
+ && ! (named.getPropertyType() == null)) {
+ return null;
+ }
+ return new PdDominantBaseline(named);
+ } catch (final PropertyException e) {
+ return null;
+ }
}
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnAbstractNamedProperty.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnAbstractNamedProperty.java 2022-12-28 05:12:51 UTC (rev 12970)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnAbstractNamedProperty.java 2022-12-28 05:19:42 UTC (rev 12971)
@@ -42,7 +42,7 @@
* Returns the property type to be operated on by the subclass.
* @return The property type operand.
*/
- protected abstract FoPropertyId getPropertyType();
+ public abstract FoPropertyId getPropertyType();
@Override
public boolean canEvalNumeric() {
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromNearestSpecifiedValue.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromNearestSpecifiedValue.java 2022-12-28 05:12:51 UTC (rev 12970)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromNearestSpecifiedValue.java 2022-12-28 05:19:42 UTC (rev 12971)
@@ -86,7 +86,7 @@
}
@Override
- protected FoPropertyId getPropertyType() {
+ public FoPropertyId getPropertyType() {
return this.operand;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromPageMasterRegion.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromPageMasterRegion.java 2022-12-28 05:12:51 UTC (rev 12970)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromPageMasterRegion.java 2022-12-28 05:19:42 UTC (rev 12971)
@@ -85,7 +85,7 @@
}
@Override
- protected FoPropertyId getPropertyType() {
+ public FoPropertyId getPropertyType() {
return this.operand;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromParent.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromParent.java 2022-12-28 05:12:51 UTC (rev 12970)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromParent.java 2022-12-28 05:19:42 UTC (rev 12971)
@@ -86,7 +86,7 @@
}
@Override
- protected FoPropertyId getPropertyType() {
+ public FoPropertyId getPropertyType() {
return this.operand;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromTableColumn.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromTableColumn.java 2022-12-28 05:12:51 UTC (rev 12970)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromTableColumn.java 2022-12-28 05:19:42 UTC (rev 12971)
@@ -83,7 +83,7 @@
}
@Override
- protected FoPropertyId getPropertyType() {
+ public FoPropertyId getPropertyType() {
return this.operand;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnInheritedPropertyValue.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnInheritedPropertyValue.java 2022-12-28 05:12:51 UTC (rev 12970)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnInheritedPropertyValue.java 2022-12-28 05:19:42 UTC (rev 12971)
@@ -86,7 +86,7 @@
}
@Override
- protected FoPropertyId getPropertyType() {
+ public FoPropertyId getPropertyType() {
return this.operand;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnMergePropertyValues.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnMergePropertyValues.java 2022-12-28 05:12:51 UTC (rev 12970)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnMergePropertyValues.java 2022-12-28 05:19:42 UTC (rev 12971)
@@ -85,7 +85,7 @@
}
@Override
- protected FoPropertyId getPropertyType() {
+ public FoPropertyId getPropertyType() {
return this.operand;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-12-28 05:12:54
|
Revision: 12970
http://sourceforge.net/p/foray/code/12970
Author: victormote
Date: 2022-12-28 05:12:51 +0000 (Wed, 28 Dec 2022)
Log Message:
-----------
Fix apparent bug in property parser.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/parse/PropertyParser.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/parse/PropertyParser.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/parse/PropertyParser.java 2022-12-28 03:03:56 UTC (rev 12969)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/parse/PropertyParser.java 2022-12-28 05:12:51 UTC (rev 12970)
@@ -278,8 +278,8 @@
break;
case FUNCTION_LPAR: {
+ final String functionType = tokenizer.getCurrentTokenValue();
tokenizer.next();
- final String functionType = tokenizer.getCurrentTokenValue();
final Expr[] functionArguments = parseArgs(tokenizer, propertyType);
final Function function = Function.makeFunction(functionType, functionArguments, propertyType);
if (function == null) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-12-28 03:04:02
|
Revision: 12969
http://sourceforge.net/p/foray/code/12969
Author: victormote
Date: 2022-12-28 03:03:56 +0000 (Wed, 28 Dec 2022)
Log Message:
-----------
Convert PropertyParser to a true singleton.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/AbstractAxslProperty.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/AbstractFoProperty.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/parse/PropertyParser.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/xml/AbstractXmlProperty.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/AbstractAxslProperty.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/AbstractAxslProperty.java 2022-12-28 02:42:12 UTC (rev 12968)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/AbstractAxslProperty.java 2022-12-28 03:03:56 UTC (rev 12969)
@@ -55,7 +55,7 @@
if (pv != null) {
return pv;
}
- pv = PropertyParser.parse(rawPropertyValue, this.getPropertyType());
+ pv = PropertyParser.getInstance().parse(rawPropertyValue, this.getPropertyType());
return pv;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/AbstractFoProperty.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/AbstractFoProperty.java 2022-12-28 02:42:12 UTC (rev 12968)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/AbstractFoProperty.java 2022-12-28 03:03:56 UTC (rev 12969)
@@ -78,7 +78,7 @@
if (pv != null) {
return pv;
}
- return PropertyParser.parse(rawPropertyValue, this.getPropertyType());
+ return PropertyParser.getInstance().parse(rawPropertyValue, this.getPropertyType());
}
/**
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/parse/PropertyParser.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/parse/PropertyParser.java 2022-12-28 02:42:12 UTC (rev 12968)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/parse/PropertyParser.java 2022-12-28 03:03:56 UTC (rev 12969)
@@ -54,20 +54,28 @@
import java.util.List;
/**
- * Class to parse XSL-FO property expressions.
+ * Parses an XSL-FO property expressions.
* This class is heavily based on the expression parser in James Clark's XT, an XSLT processor.
+ * This class maintains no state of its own, and gets a new {@link PropertyTokenizer} for each parse task, so we think
+ * this class should be thread-safe.
*/
public final class PropertyParser {
- /** The tokenizer. */
- private PropertyTokenizer tokenizer;
+ /** The singleton instance of this class. */
+ private static PropertyParser theInstance = new PropertyParser();
/**
- * Private constructor. Called by the static parse() method.
- * @param expression The XML attribute which will be parsed.
+ * Private constructor.
+ * Use {@link #getInstance()} to obtain the singleton instance of this class.
*/
- private PropertyParser(final String expression) {
- this.tokenizer = new PropertyTokenizer(expression);
+ private PropertyParser() { }
+
+ /**
+ * Returns the singleton instance of this class.
+ * @return The singleton instance of this class.
+ */
+ public static PropertyParser getInstance() {
+ return theInstance;
}
/**
@@ -78,9 +86,9 @@
* @return A PropertyValue instance holding the parsed result.
* @throws PropertyException If the "expr" cannot be parsed as a Property.
*/
- public static PropertyValue parse(final String expr, final PropertyId propertyType) throws PropertyException {
- final PropertyParser parser = new PropertyParser(expr);
- PropertyValue pv = parser.parseProperty(propertyType);
+ public PropertyValue parse(final String expr, final PropertyId propertyType) throws PropertyException {
+ final PropertyTokenizer tokenizer = new PropertyTokenizer(expr);
+ PropertyValue pv = parseProperty(tokenizer, propertyType);
if (pv == null) {
pv = new DtString(expr);
}
@@ -90,19 +98,21 @@
/**
* Parse the property expression described in the instance variables.
* Note: If the property expression String is empty, a StringProperty object holding an empty String is returned.
+ * @param tokenizer The PropertyTokenizer.
* @param propertyType The property type for which the value is being parsed.
* @return A Property object holding the parsed result.
* @throws PropertyException If the "expr" cannot be parsed as a Property.
*/
- private PropertyValue parseProperty(final PropertyId propertyType) throws PropertyException {
- this.tokenizer.next();
- if (this.tokenizer.getCurrentToken() == PropertyTokenizer.Token.EOF) {
+ private PropertyValue parseProperty(final PropertyTokenizer tokenizer, final PropertyId propertyType)
+ throws PropertyException {
+ tokenizer.next();
+ if (tokenizer.getCurrentToken() == PropertyTokenizer.Token.EOF) {
// if prop value is empty string, force to StringProperty
return new DtString("");
}
while (true) {
- final PropertyValue prop = parseAdditiveExpr(propertyType);
- if (this.tokenizer.getCurrentToken() == PropertyTokenizer.Token.EOF) {
+ final PropertyValue prop = parseAdditiveExpr(tokenizer, propertyType);
+ if (tokenizer.getCurrentToken() == PropertyTokenizer.Token.EOF) {
return prop;
}
/* If what is parsed so far is not numeric, it cannot be a part of
@@ -116,24 +126,25 @@
/**
* Parse an addition or subtraction expression.
+ * @param tokenizer The PropertyTokenizer.
* @param propertyType The property type for which the value is being parsed.
* @return The expression parsed.
* @throws PropertyException For errors parsing the expression.
*/
- private ExprAdditive parseAdditiveExpr(final PropertyId propertyType) throws PropertyException {
+ private ExprAdditive parseAdditiveExpr(final PropertyTokenizer tokenizer, final PropertyId propertyType)
+ throws PropertyException {
// Evaluate and put result on the operand stack
- ExprAdditive prop = parseMultiplicativeExpr(propertyType);
+ ExprAdditive prop = parseMultiplicativeExpr(tokenizer, propertyType);
loop:
for (;;) {
- switch (this.tokenizer.getCurrentToken()) {
+ switch (tokenizer.getCurrentToken()) {
case PLUS:
- this.tokenizer.next();
- prop = evalAddition(prop, parseMultiplicativeExpr(propertyType));
+ tokenizer.next();
+ prop = evalAddition(prop, parseMultiplicativeExpr(tokenizer, propertyType));
break;
case MINUS:
- this.tokenizer.next();
- prop =
- evalSubtraction(prop, parseMultiplicativeExpr(propertyType));
+ tokenizer.next();
+ prop = evalSubtraction(prop, parseMultiplicativeExpr(tokenizer, propertyType));
break;
default:
break loop;
@@ -144,27 +155,28 @@
/**
* Parse a multiply, divide or modulo expression.
+ * @param tokenizer The PropertyTokenizer.
* @param propertyType The property type for which the value is being parsed.
* @return The expression parsed.
* @throws PropertyException For errors parsing the expression.
*/
- private ExprMultiplicative parseMultiplicativeExpr(final PropertyId propertyType)
+ private ExprMultiplicative parseMultiplicativeExpr(final PropertyTokenizer tokenizer, final PropertyId propertyType)
throws PropertyException {
- ExprMultiplicative prop = parseUnaryExpr(propertyType);
+ ExprMultiplicative prop = parseUnaryExpr(tokenizer, propertyType);
loop:
for (;;) {
- switch (this.tokenizer.getCurrentToken()) {
+ switch (tokenizer.getCurrentToken()) {
case DIV:
- this.tokenizer.next();
- prop = evalDivide(prop, parseUnaryExpr(propertyType));
+ tokenizer.next();
+ prop = evalDivide(prop, parseUnaryExpr(tokenizer, propertyType));
break;
case MOD:
- this.tokenizer.next();
- prop = evalModulo(prop, parseUnaryExpr(propertyType));
+ tokenizer.next();
+ prop = evalModulo(prop, parseUnaryExpr(tokenizer, propertyType));
break;
case MULTIPLY:
- this.tokenizer.next();
- prop = evalMultiply(prop, parseUnaryExpr(propertyType));
+ tokenizer.next();
+ prop = evalMultiply(prop, parseUnaryExpr(tokenizer, propertyType));
break;
default:
break loop;
@@ -175,30 +187,31 @@
/**
* Parse a unary minus expression.
+ * @param tokenizer The PropertyTokenizer.
* @param propertyType The property type for which the value is being parsed.
* @return The expression parsed.
* @throws PropertyException For errors parsing the expression.
*/
- private ExprUnary parseUnaryExpr(final PropertyId propertyType) throws PropertyException {
- if (this.tokenizer.getCurrentToken() == PropertyTokenizer.Token.MINUS) {
- this.tokenizer.next();
- return evalNegate(parseUnaryExpr(propertyType));
+ private ExprUnary parseUnaryExpr(final PropertyTokenizer tokenizer, final PropertyId propertyType)
+ throws PropertyException {
+ if (tokenizer.getCurrentToken() == PropertyTokenizer.Token.MINUS) {
+ tokenizer.next();
+ return evalNegate(parseUnaryExpr(tokenizer, propertyType));
}
- return parsePrimaryExpr(propertyType);
+ return parsePrimaryExpr(tokenizer, propertyType);
}
/**
- * Checks that the current token is a right parenthesis and throws an
- * exception if this isn't the case.
- * @throws PropertyException If the current token is not a right
- * parenthesis.
+ * Checks that the current token is a right parenthesis and throws an exception if this isn't the case.
+ * @param tokenizer The PropertyTokenizer.
+ * @throws PropertyException If the current token is not a right parenthesis.
*/
- private void expectRpar() throws PropertyException {
- if (this.tokenizer.getCurrentToken() != PropertyTokenizer.Token.RPAR) {
+ private void expectRpar(final PropertyTokenizer tokenizer) throws PropertyException {
+ if (tokenizer.getCurrentToken() != PropertyTokenizer.Token.RPAR) {
throw new PropertyException("expected )");
}
- this.tokenizer.next();
+ tokenizer.next();
}
/**
@@ -205,43 +218,44 @@
* Parse a primary expression.
* A primary expression is either a parenthesized expression or an expression representing a primitive Property
* datatype, such as a string literal, an NCname, a number or a unit expression, or a function call expression.
+ * @param tokenizer The PropertyTokenizer.
* @param propertyType The property type for which the value is being parsed.
* @return The expression parsed.
* @throws PropertyException For errors parsing the expression.
*/
- private ExprPrimary parsePrimaryExpr(final PropertyId propertyType)
+ private ExprPrimary parsePrimaryExpr(final PropertyTokenizer tokenizer, final PropertyId propertyType)
throws PropertyException {
final ExprPrimary prop;
- final PropertyTokenizer.Token currentToken = this.tokenizer.getCurrentToken();
+ final PropertyTokenizer.Token currentToken = tokenizer.getCurrentToken();
switch (currentToken) {
case LPAR:
- this.tokenizer.next();
- prop = parseInnerExpression(propertyType);
- expectRpar();
+ tokenizer.next();
+ prop = parseInnerExpression(tokenizer, propertyType);
+ expectRpar(tokenizer);
return prop;
case LITERAL:
- prop = new DtString(this.tokenizer.getCurrentTokenValue());
+ prop = new DtString(tokenizer.getCurrentTokenValue());
break;
case NCNAME:
// Interpret this in context of the property or do it later?
- prop = new DtName(this.tokenizer.getCurrentTokenValue());
+ prop = new DtName(tokenizer.getCurrentTokenValue());
break;
case FLOAT:
- final double floatValue = Double.parseDouble(this.tokenizer.getCurrentTokenValue());
+ final double floatValue = Double.parseDouble(tokenizer.getCurrentTokenValue());
prop = new DtNumber(floatValue);
break;
case INTEGER:
- final int integerValue = Integer.parseInt(this.tokenizer.getCurrentTokenValue());
+ final int integerValue = Integer.parseInt(tokenizer.getCurrentTokenValue());
prop = new DtInteger(integerValue);
break;
case PERCENT:
- final String asString = this.tokenizer.getCurrentTokenValue().substring(
- 0, this.tokenizer.getCurrentTokenValue().length() - 1);
+ final String asString = tokenizer.getCurrentTokenValue().substring(
+ 0, tokenizer.getCurrentTokenValue().length() - 1);
final double pcval = Double.parseDouble(asString);
prop = new DtPercentage((float) pcval);
break;
@@ -248,9 +262,9 @@
case NUMERIC_WITH_UNITS:
// A number plus a valid unit name.
- final int numLen = this.tokenizer.getCurrentTokenValue().length() - this.tokenizer.getCurrentUnitLength();
- final String valuePart = this.tokenizer.getCurrentTokenValue().substring(0, numLen);
- final String unitPart = this.tokenizer.getCurrentTokenValue().substring(numLen);
+ final int numLen = tokenizer.getCurrentTokenValue().length() - tokenizer.getCurrentUnitLength();
+ final String valuePart = tokenizer.getCurrentTokenValue().substring(0, numLen);
+ final String unitPart = tokenizer.getCurrentTokenValue().substring(numLen);
final float value = Float.parseFloat(valuePart);
prop = new DtLength(value, unitPart);
break;
@@ -257,7 +271,7 @@
case COLORSPEC:
try {
- prop = DtColor.parseColorDescription(this.tokenizer.getCurrentTokenValue());
+ prop = DtColor.parseColorDescription(tokenizer.getCurrentTokenValue());
} catch (final PropertyException e) {
throw new PropertyException(e.getMessage());
}
@@ -264,12 +278,12 @@
break;
case FUNCTION_LPAR: {
- this.tokenizer.next();
- final String functionType = this.tokenizer.getCurrentTokenValue();
- final Expr[] functionArguments = parseArgs(propertyType);
+ tokenizer.next();
+ final String functionType = tokenizer.getCurrentTokenValue();
+ final Expr[] functionArguments = parseArgs(tokenizer, propertyType);
final Function function = Function.makeFunction(functionType, functionArguments, propertyType);
if (function == null) {
- throw new PropertyException("No such function: " + this.tokenizer.getCurrentTokenValue());
+ throw new PropertyException("No such function: " + tokenizer.getCurrentTokenValue());
}
return function;
}
@@ -276,18 +290,20 @@
default:
return null;
}
- this.tokenizer.next();
+ tokenizer.next();
return prop;
}
/**
* Parse an inner expression.
+ * @param tokenizer The PropertyTokenizer.
* @param propertyType The property type for which the value is being parsed.
* @return The expression parsed.
* @throws PropertyException For errors parsing the expression.
*/
- private ExprInner parseInnerExpression(final PropertyId propertyType) throws PropertyException {
- final ExprAdditive expr = parseAdditiveExpr(propertyType);
+ private ExprInner parseInnerExpression(final PropertyTokenizer tokenizer, final PropertyId propertyType)
+ throws PropertyException {
+ final ExprAdditive expr = parseAdditiveExpr(tokenizer, propertyType);
return new ExprInner(expr);
}
@@ -298,26 +314,27 @@
* This method does not care how many arguments the function is supposed to have.
* It simply parses them and passes them on.
* They can be counted and evaluated downstream.
+ * @param tokenizer The PropertyTokenizer.
* @param propertyType The property type for which the value is being parsed.
* @return An array of PropertyValue instances representing the arguments found.
* @throws PropertyException If the number of arguments found isn't equal to the number expected.
*/
- Expr[] parseArgs(final PropertyId propertyType) throws PropertyException {
+ Expr[] parseArgs(final PropertyTokenizer tokenizer, final PropertyId propertyType) throws PropertyException {
final List<PropertyValue> args = new ArrayList<PropertyValue>();
PropertyValue prop;
- if (this.tokenizer.getCurrentToken() == PropertyTokenizer.Token.RPAR) {
+ if (tokenizer.getCurrentToken() == PropertyTokenizer.Token.RPAR) {
// No args: func()
- this.tokenizer.next();
+ tokenizer.next();
} else {
while (true) {
- prop = parseAdditiveExpr(propertyType);
+ prop = parseAdditiveExpr(tokenizer, propertyType);
args.add(prop);
- if (this.tokenizer.getCurrentToken() != PropertyTokenizer.Token.COMMA) {
+ if (tokenizer.getCurrentToken() != PropertyTokenizer.Token.COMMA) {
break;
}
- this.tokenizer.next();
+ tokenizer.next();
}
- expectRpar();
+ expectRpar(tokenizer);
}
final Expr[] propertyArray = new Expr[args.size()];
args.toArray(propertyArray);
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/xml/AbstractXmlProperty.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/xml/AbstractXmlProperty.java 2022-12-28 02:42:12 UTC (rev 12968)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/xml/AbstractXmlProperty.java 2022-12-28 03:03:56 UTC (rev 12969)
@@ -54,7 +54,7 @@
if (pv != null) {
return pv;
}
- pv = PropertyParser.parse(rawPropertyValue, getPropertyType());
+ pv = PropertyParser.getInstance().parse(rawPropertyValue, getPropertyType());
return pv;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-12-28 02:42:15
|
Revision: 12968
http://sourceforge.net/p/foray/code/12968
Author: victormote
Date: 2022-12-28 02:42:12 +0000 (Wed, 28 Dec 2022)
Log Message:
-----------
Separate PropertyParser from PropertyTokenizer.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/parse/PropertyParser.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/parse/PropertyParser.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/parse/PropertyParser.java 2022-12-28 01:02:20 UTC (rev 12967)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/parse/PropertyParser.java 2022-12-28 02:42:12 UTC (rev 12968)
@@ -55,16 +55,19 @@
/**
* Class to parse XSL-FO property expressions.
- * This class is heavily based on the epxression parser in James Clark's XT, an XSLT processor.
+ * This class is heavily based on the expression parser in James Clark's XT, an XSLT processor.
*/
-public final class PropertyParser extends PropertyTokenizer {
+public final class PropertyParser {
+ /** The tokenizer. */
+ private PropertyTokenizer tokenizer;
+
/**
* Private constructor. Called by the static parse() method.
* @param expression The XML attribute which will be parsed.
*/
private PropertyParser(final String expression) {
- super(expression);
+ this.tokenizer = new PropertyTokenizer(expression);
}
/**
@@ -92,14 +95,14 @@
* @throws PropertyException If the "expr" cannot be parsed as a Property.
*/
private PropertyValue parseProperty(final PropertyId propertyType) throws PropertyException {
- next();
- if (getCurrentToken() == Token.EOF) {
+ this.tokenizer.next();
+ if (this.tokenizer.getCurrentToken() == PropertyTokenizer.Token.EOF) {
// if prop value is empty string, force to StringProperty
return new DtString("");
}
while (true) {
final PropertyValue prop = parseAdditiveExpr(propertyType);
- if (getCurrentToken() == Token.EOF) {
+ if (this.tokenizer.getCurrentToken() == PropertyTokenizer.Token.EOF) {
return prop;
}
/* If what is parsed so far is not numeric, it cannot be a part of
@@ -122,13 +125,13 @@
ExprAdditive prop = parseMultiplicativeExpr(propertyType);
loop:
for (;;) {
- switch (getCurrentToken()) {
+ switch (this.tokenizer.getCurrentToken()) {
case PLUS:
- next();
+ this.tokenizer.next();
prop = evalAddition(prop, parseMultiplicativeExpr(propertyType));
break;
case MINUS:
- next();
+ this.tokenizer.next();
prop =
evalSubtraction(prop, parseMultiplicativeExpr(propertyType));
break;
@@ -150,17 +153,17 @@
ExprMultiplicative prop = parseUnaryExpr(propertyType);
loop:
for (;;) {
- switch (getCurrentToken()) {
+ switch (this.tokenizer.getCurrentToken()) {
case DIV:
- next();
+ this.tokenizer.next();
prop = evalDivide(prop, parseUnaryExpr(propertyType));
break;
case MOD:
- next();
+ this.tokenizer.next();
prop = evalModulo(prop, parseUnaryExpr(propertyType));
break;
case MULTIPLY:
- next();
+ this.tokenizer.next();
prop = evalMultiply(prop, parseUnaryExpr(propertyType));
break;
default:
@@ -177,8 +180,8 @@
* @throws PropertyException For errors parsing the expression.
*/
private ExprUnary parseUnaryExpr(final PropertyId propertyType) throws PropertyException {
- if (getCurrentToken() == Token.MINUS) {
- next();
+ if (this.tokenizer.getCurrentToken() == PropertyTokenizer.Token.MINUS) {
+ this.tokenizer.next();
return evalNegate(parseUnaryExpr(propertyType));
}
return parsePrimaryExpr(propertyType);
@@ -192,10 +195,10 @@
* parenthesis.
*/
private void expectRpar() throws PropertyException {
- if (getCurrentToken() != Token.RPAR) {
+ if (this.tokenizer.getCurrentToken() != PropertyTokenizer.Token.RPAR) {
throw new PropertyException("expected )");
}
- next();
+ this.tokenizer.next();
}
/**
@@ -209,35 +212,36 @@
private ExprPrimary parsePrimaryExpr(final PropertyId propertyType)
throws PropertyException {
final ExprPrimary prop;
- final Token currentToken = this.getCurrentToken();
+ final PropertyTokenizer.Token currentToken = this.tokenizer.getCurrentToken();
switch (currentToken) {
case LPAR:
- next();
+ this.tokenizer.next();
prop = parseInnerExpression(propertyType);
expectRpar();
return prop;
case LITERAL:
- prop = new DtString(getCurrentTokenValue());
+ prop = new DtString(this.tokenizer.getCurrentTokenValue());
break;
case NCNAME:
// Interpret this in context of the property or do it later?
- prop = new DtName(getCurrentTokenValue());
+ prop = new DtName(this.tokenizer.getCurrentTokenValue());
break;
case FLOAT:
- final double floatValue = Double.parseDouble(getCurrentTokenValue());
+ final double floatValue = Double.parseDouble(this.tokenizer.getCurrentTokenValue());
prop = new DtNumber(floatValue);
break;
case INTEGER:
- final int integerValue = Integer.parseInt(getCurrentTokenValue());
+ final int integerValue = Integer.parseInt(this.tokenizer.getCurrentTokenValue());
prop = new DtInteger(integerValue);
break;
case PERCENT:
- final String asString = getCurrentTokenValue().substring(0, getCurrentTokenValue().length() - 1);
+ final String asString = this.tokenizer.getCurrentTokenValue().substring(
+ 0, this.tokenizer.getCurrentTokenValue().length() - 1);
final double pcval = Double.parseDouble(asString);
prop = new DtPercentage((float) pcval);
break;
@@ -244,9 +248,9 @@
case NUMERIC_WITH_UNITS:
// A number plus a valid unit name.
- final int numLen = getCurrentTokenValue().length() - getCurrentUnitLength();
- final String valuePart = getCurrentTokenValue().substring(0, numLen);
- final String unitPart = getCurrentTokenValue().substring(numLen);
+ final int numLen = this.tokenizer.getCurrentTokenValue().length() - this.tokenizer.getCurrentUnitLength();
+ final String valuePart = this.tokenizer.getCurrentTokenValue().substring(0, numLen);
+ final String unitPart = this.tokenizer.getCurrentTokenValue().substring(numLen);
final float value = Float.parseFloat(valuePart);
prop = new DtLength(value, unitPart);
break;
@@ -253,7 +257,7 @@
case COLORSPEC:
try {
- prop = DtColor.parseColorDescription(getCurrentTokenValue());
+ prop = DtColor.parseColorDescription(this.tokenizer.getCurrentTokenValue());
} catch (final PropertyException e) {
throw new PropertyException(e.getMessage());
}
@@ -260,12 +264,12 @@
break;
case FUNCTION_LPAR: {
- next();
- final String functionType = getCurrentTokenValue();
+ this.tokenizer.next();
+ final String functionType = this.tokenizer.getCurrentTokenValue();
final Expr[] functionArguments = parseArgs(propertyType);
final Function function = Function.makeFunction(functionType, functionArguments, propertyType);
if (function == null) {
- throw new PropertyException("No such function: " + getCurrentTokenValue());
+ throw new PropertyException("No such function: " + this.tokenizer.getCurrentTokenValue());
}
return function;
}
@@ -272,7 +276,7 @@
default:
return null;
}
- next();
+ this.tokenizer.next();
return prop;
}
@@ -301,17 +305,17 @@
Expr[] parseArgs(final PropertyId propertyType) throws PropertyException {
final List<PropertyValue> args = new ArrayList<PropertyValue>();
PropertyValue prop;
- if (getCurrentToken() == Token.RPAR) {
+ if (this.tokenizer.getCurrentToken() == PropertyTokenizer.Token.RPAR) {
// No args: func()
- next();
+ this.tokenizer.next();
} else {
while (true) {
prop = parseAdditiveExpr(propertyType);
args.add(prop);
- if (getCurrentToken() != Token.COMMA) {
+ if (this.tokenizer.getCurrentToken() != PropertyTokenizer.Token.COMMA) {
break;
}
- next();
+ this.tokenizer.next();
}
expectRpar();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-12-28 01:02:23
|
Revision: 12967
http://sourceforge.net/p/foray/code/12967
Author: victormote
Date: 2022-12-28 01:02:20 +0000 (Wed, 28 Dec 2022)
Log Message:
-----------
Add abstract superclasses for number and color functions, and move common code to them.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnAbs.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnCeiling.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFloor.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnMax.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnMin.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnRgb.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnRgbIcc.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnRound.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnSystemColor.java
Added Paths:
-----------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnAbstractColor.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnAbstractNumber.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnAbs.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnAbs.java 2022-12-28 00:30:16 UTC (rev 12966)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnAbs.java 2022-12-28 01:02:20 UTC (rev 12967)
@@ -30,13 +30,11 @@
import org.foray.fotree.PropertyException;
-import java.awt.Color;
-
/**
* The "abs" function in XSL-FO.
* @see "XSL-FO Recommendation 1.1, Section 5.10.1."
*/
-public class FnAbs extends Function {
+public class FnAbs extends FnAbstractNumber {
/** The operand to this function. */
private Expr operand1;
@@ -66,11 +64,6 @@
}
@Override
- public boolean canEvalNumeric() {
- return true;
- }
-
- @Override
public double evalNumeric() {
return Math.abs(this.operand1.evalNumeric());
}
@@ -96,16 +89,6 @@
}
@Override
- public boolean canEvalColor() {
- return false;
- }
-
- @Override
- public Color evalColor() {
- throw evalColorException();
- }
-
- @Override
public boolean canEvalInteger() {
return this.operand1.canEvalInteger();
}
@@ -116,16 +99,6 @@
}
@Override
- public boolean canEvalKeyword() {
- return false;
- }
-
- @Override
- public PvKeyword evalKeyword() {
- throw this.evalKeywordException();
- }
-
- @Override
public boolean canEvalPercentage() {
return this.operand1.canEvalPercentage();
}
Added: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnAbstractColor.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnAbstractColor.java (rev 0)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnAbstractColor.java 2022-12-28 01:02:20 UTC (rev 12967)
@@ -0,0 +1,102 @@
+/*
+ * Copyright 2022 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.foray.fotree.value;
+
+/**
+ * Abstract superclass for color functions.
+ * @see "XSL-FO Recommendation 1.1, Section 5.10.2."
+ */
+public abstract class FnAbstractColor extends Function {
+
+ @Override
+ public boolean canEvalColor() {
+ return true;
+ }
+
+ @Override
+ public boolean canEvalNumeric() {
+ return false;
+ }
+
+ @Override
+ public double evalNumeric() {
+ throw this.evalNumericException();
+ }
+
+ @Override
+ public boolean canEvalLength() {
+ return false;
+ }
+
+ @Override
+ public byte getUnitPower() {
+ throw this.evalNumericException();
+ }
+
+ @Override
+ public int evalLength(final int pointSize) {
+ throw this.evalLengthException();
+ }
+
+ @Override
+ public boolean lengthRequiresFontSize() {
+ return false;
+ }
+
+ @Override
+ public boolean canEvalInteger() {
+ return false;
+ }
+
+ @Override
+ public int evalInteger() {
+ throw evalIntegerException();
+ }
+
+ @Override
+ public boolean canEvalKeyword() {
+ return false;
+ }
+
+ @Override
+ public PvKeyword evalKeyword() {
+ throw this.evalKeywordException();
+ }
+
+ @Override
+ public boolean canEvalPercentage() {
+ return false;
+ }
+
+ @Override
+ public float evalPercentage() {
+ throw evalPercentageException();
+ }
+
+}
Property changes on: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnAbstractColor.java
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev
\ No newline at end of property
Added: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnAbstractNumber.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnAbstractNumber.java (rev 0)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnAbstractNumber.java 2022-12-28 01:02:20 UTC (rev 12967)
@@ -0,0 +1,64 @@
+/*
+ * Copyright 2022 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.foray.fotree.value;
+
+import java.awt.Color;
+
+/**
+ * Abstract superclass for number functions.
+ * @see "XSL-FO Recommendation 1.1, Section 5.10.1."
+ */
+public abstract class FnAbstractNumber extends Function {
+
+ @Override
+ public boolean canEvalNumeric() {
+ return true;
+ }
+
+ @Override
+ public boolean canEvalColor() {
+ return false;
+ }
+
+ @Override
+ public Color evalColor() {
+ throw evalColorException();
+ }
+
+ @Override
+ public boolean canEvalKeyword() {
+ return false;
+ }
+
+ @Override
+ public PvKeyword evalKeyword() {
+ throw this.evalKeywordException();
+ }
+
+}
Property changes on: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnAbstractNumber.java
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev
\ No newline at end of property
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnCeiling.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnCeiling.java 2022-12-28 00:30:16 UTC (rev 12966)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnCeiling.java 2022-12-28 01:02:20 UTC (rev 12967)
@@ -30,13 +30,11 @@
import org.foray.fotree.PropertyException;
-import java.awt.Color;
-
/**
* The "ceiling" function in XSL-FO.
* @see "XSL-FO Recommendation 1.1, Section 5.10.1."
*/
-public class FnCeiling extends Function {
+public class FnCeiling extends FnAbstractNumber {
/** The operand to this function. */
private Expr operand1;
@@ -69,11 +67,6 @@
}
@Override
- public boolean canEvalNumeric() {
- return true;
- }
-
- @Override
public double evalNumeric() {
return Math.ceil(this.operand1.evalNumeric());
}
@@ -100,16 +93,6 @@
}
@Override
- public boolean canEvalColor() {
- return false;
- }
-
- @Override
- public Color evalColor() {
- throw evalColorException();
- }
-
- @Override
public boolean lengthRequiresFontSize() {
return false;
}
@@ -125,16 +108,6 @@
}
@Override
- public boolean canEvalKeyword() {
- return false;
- }
-
- @Override
- public PvKeyword evalKeyword() {
- throw this.evalKeywordException();
- }
-
- @Override
public boolean canEvalPercentage() {
return this.operand1.canEvalPercentage();
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFloor.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFloor.java 2022-12-28 00:30:16 UTC (rev 12966)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFloor.java 2022-12-28 01:02:20 UTC (rev 12967)
@@ -30,13 +30,11 @@
import org.foray.fotree.PropertyException;
-import java.awt.Color;
-
/**
* The "floor" function in XSL-FO.
* @see "XSL-FO Recommendation 1.1, Section 5.10.1."
*/
-public class FnFloor extends Function {
+public class FnFloor extends FnAbstractNumber {
/** The operand to this function. */
private Expr operand1;
@@ -69,11 +67,6 @@
}
@Override
- public boolean canEvalNumeric() {
- return true;
- }
-
- @Override
public double evalNumeric() {
return Math.floor(this.operand1.evalNumeric());
}
@@ -100,16 +93,6 @@
}
@Override
- public boolean canEvalColor() {
- return false;
- }
-
- @Override
- public Color evalColor() {
- throw evalColorException();
- }
-
- @Override
public boolean lengthRequiresFontSize() {
return false;
}
@@ -125,16 +108,6 @@
}
@Override
- public boolean canEvalKeyword() {
- return false;
- }
-
- @Override
- public PvKeyword evalKeyword() {
- throw this.evalKeywordException();
- }
-
- @Override
public boolean canEvalPercentage() {
return this.operand1.canEvalPercentage();
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnMax.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnMax.java 2022-12-28 00:30:16 UTC (rev 12966)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnMax.java 2022-12-28 01:02:20 UTC (rev 12967)
@@ -30,13 +30,11 @@
import org.foray.fotree.PropertyException;
-import java.awt.Color;
-
/**
* The "max" function in XSL-FO.
* @see "XSL-FO Recommendation 1.1, Section 5.10.1."
*/
-public class FnMax extends Function {
+public class FnMax extends FnAbstractNumber {
/** The first operand to this function. */
private Expr operand1;
@@ -76,11 +74,6 @@
}
@Override
- public boolean canEvalNumeric() {
- return true;
- }
-
- @Override
public double evalNumeric() {
return Math.max(this.operand1.evalNumeric(),
this.operand2.evalNumeric());
@@ -112,16 +105,6 @@
}
@Override
- public boolean canEvalColor() {
- return false;
- }
-
- @Override
- public Color evalColor() {
- throw evalColorException();
- }
-
- @Override
public boolean canEvalInteger() {
return this.operand1.canEvalInteger()
&& this.operand2.canEvalInteger();
@@ -134,16 +117,6 @@
}
@Override
- public boolean canEvalKeyword() {
- return false;
- }
-
- @Override
- public PvKeyword evalKeyword() {
- throw this.evalKeywordException();
- }
-
- @Override
public boolean canEvalPercentage() {
return this.operand1.canEvalPercentage()
&& this.operand2.canEvalPercentage();
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnMin.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnMin.java 2022-12-28 00:30:16 UTC (rev 12966)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnMin.java 2022-12-28 01:02:20 UTC (rev 12967)
@@ -30,13 +30,11 @@
import org.foray.fotree.PropertyException;
-import java.awt.Color;
-
/**
* The "min" function in XSL-FO.
* @see "XSL-FO Recommendation 1.1, Section 5.10.1."
*/
-public class FnMin extends Function {
+public class FnMin extends FnAbstractNumber {
/** The first operand to this function. */
private Expr operand1;
@@ -77,11 +75,6 @@
}
@Override
- public boolean canEvalNumeric() {
- return true;
- }
-
- @Override
public double evalNumeric() {
return Math.min(this.operand1.evalNumeric(),
this.operand2.evalNumeric());
@@ -113,16 +106,6 @@
}
@Override
- public boolean canEvalColor() {
- return false;
- }
-
- @Override
- public Color evalColor() {
- throw evalColorException();
- }
-
- @Override
public boolean canEvalInteger() {
return this.operand1.canEvalInteger()
&& this.operand2.canEvalInteger();
@@ -135,16 +118,6 @@
}
@Override
- public boolean canEvalKeyword() {
- return false;
- }
-
- @Override
- public PvKeyword evalKeyword() {
- throw this.evalKeywordException();
- }
-
- @Override
public boolean canEvalPercentage() {
return this.operand1.canEvalPercentage()
&& this.operand2.canEvalPercentage();
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnRgb.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnRgb.java 2022-12-28 00:30:16 UTC (rev 12966)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnRgb.java 2022-12-28 01:02:20 UTC (rev 12967)
@@ -38,7 +38,7 @@
* The "rgb" function in XSL-FO.
* @see "XSL-FO Recommendation 1.1, Section 5.10.2."
*/
-public class FnRgb extends Function {
+public class FnRgb extends FnAbstractColor {
/** Constant indicating the number of channels in the RGB color space, that
* is, 3. */
@@ -119,77 +119,8 @@
* Overrides the base class, because this function can evaluate to a color.
*/
@Override
- public boolean canEvalColor() {
- return true;
- }
-
- /**
- * {@inheritDoc}
- * Overrides the base class, because this function can evaluate to a color.
- */
- @Override
public Color evalColor() {
return eval();
}
- @Override
- public boolean canEvalNumeric() {
- return false;
- }
-
- @Override
- public double evalNumeric() {
- throw this.evalNumericException();
- }
-
- @Override
- public boolean canEvalLength() {
- return false;
- }
-
- @Override
- public byte getUnitPower() {
- throw this.evalNumericException();
- }
-
- @Override
- public int evalLength(final int pointSize) {
- throw this.evalLengthException();
- }
-
- @Override
- public boolean lengthRequiresFontSize() {
- return false;
- }
-
- @Override
- public boolean canEvalInteger() {
- return false;
- }
-
- @Override
- public int evalInteger() {
- throw evalIntegerException();
- }
-
- @Override
- public boolean canEvalKeyword() {
- return false;
- }
-
- @Override
- public PvKeyword evalKeyword() {
- throw this.evalKeywordException();
- }
-
- @Override
- public boolean canEvalPercentage() {
- return false;
- }
-
- @Override
- public float evalPercentage() {
- throw evalPercentageException();
- }
-
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnRgbIcc.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnRgbIcc.java 2022-12-28 00:30:16 UTC (rev 12966)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnRgbIcc.java 2022-12-28 01:02:20 UTC (rev 12967)
@@ -38,7 +38,7 @@
* The "rgb-icc" function in XSL-FO.
* @see "XSL-FO Recommendation 1.1, Section 5.10.2."
*/
-public class FnRgbIcc extends Function {
+public class FnRgbIcc extends FnAbstractColor {
/** Constant indicating the number of channels in the RGB color space, that
* is, 3. */
@@ -122,15 +122,6 @@
* Overrides the base class, because this function can evaluate to a color.
*/
@Override
- public boolean canEvalColor() {
- return true;
- }
-
- /**
- * {@inheritDoc}
- * Overrides the base class, because this function can evaluate to a color.
- */
- @Override
public Color evalColor() {
return eval();
}
@@ -164,64 +155,4 @@
return this.colorProfileName.getValue();
}
- @Override
- public boolean canEvalNumeric() {
- return false;
- }
-
- @Override
- public double evalNumeric() {
- throw this.evalNumericException();
- }
-
- @Override
- public boolean canEvalLength() {
- return false;
- }
-
- @Override
- public byte getUnitPower() {
- throw this.evalNumericException();
- }
-
- @Override
- public int evalLength(final int pointSize) {
- throw this.evalLengthException();
- }
-
- @Override
- public boolean lengthRequiresFontSize() {
- return false;
- }
-
- @Override
- public boolean canEvalInteger() {
- return false;
- }
-
- @Override
- public int evalInteger() {
- throw evalIntegerException();
- }
-
- @Override
- public boolean canEvalKeyword() {
- return false;
- }
-
- @Override
- public PvKeyword evalKeyword() {
- throw this.evalKeywordException();
- }
-
- @Override
- public boolean canEvalPercentage() {
- return false;
- }
-
- @Override
- public float evalPercentage() {
- throw evalPercentageException();
- }
-
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnRound.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnRound.java 2022-12-28 00:30:16 UTC (rev 12966)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnRound.java 2022-12-28 01:02:20 UTC (rev 12967)
@@ -30,13 +30,11 @@
import org.foray.fotree.PropertyException;
-import java.awt.Color;
-
/**
* The "round" function in XSL-FO.
* @see "XSL-FO Recommendation 1.1, Section 5.10.1."
*/
-public class FnRound extends Function {
+public class FnRound extends FnAbstractNumber {
/** The arguments to this function. */
private Expr operand1;
@@ -69,11 +67,6 @@
}
@Override
- public boolean canEvalNumeric() {
- return true;
- }
-
- @Override
public double evalNumeric() {
return Math.round(this.operand1.evalNumeric());
}
@@ -100,16 +93,6 @@
}
@Override
- public boolean canEvalColor() {
- return false;
- }
-
- @Override
- public Color evalColor() {
- throw evalColorException();
- }
-
- @Override
public boolean lengthRequiresFontSize() {
return this.operand1.lengthRequiresFontSize();
}
@@ -125,16 +108,6 @@
}
@Override
- public boolean canEvalKeyword() {
- return false;
- }
-
- @Override
- public PvKeyword evalKeyword() {
- throw this.evalKeywordException();
- }
-
- @Override
public boolean canEvalPercentage() {
return this.operand1.canEvalPercentage();
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnSystemColor.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnSystemColor.java 2022-12-28 00:30:16 UTC (rev 12966)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnSystemColor.java 2022-12-28 01:02:20 UTC (rev 12967)
@@ -36,7 +36,7 @@
* The "system-color" function in XSL-FO.
* @see "XSL-FO Recommendation 1.1, Section 5.10.2."
*/
-public class FnSystemColor extends Function {
+public class FnSystemColor extends FnAbstractColor {
/** The name of this system color. */
private DtName colorName;
@@ -74,77 +74,8 @@
* Overrides the base class, because this function can evaluate to a color.
*/
@Override
- public boolean canEvalColor() {
- return true;
- }
-
- /**
- * {@inheritDoc}
- * Overrides the base class, because this function can evaluate to a color.
- */
- @Override
public Color evalColor() {
return eval();
}
- @Override
- public boolean canEvalNumeric() {
- return false;
- }
-
- @Override
- public double evalNumeric() {
- throw this.evalNumericException();
- }
-
- @Override
- public boolean canEvalLength() {
- return false;
- }
-
- @Override
- public byte getUnitPower() {
- throw this.evalNumericException();
- }
-
- @Override
- public int evalLength(final int pointSize) {
- throw this.evalLengthException();
- }
-
- @Override
- public boolean lengthRequiresFontSize() {
- return false;
- }
-
- @Override
- public boolean canEvalInteger() {
- return false;
- }
-
- @Override
- public int evalInteger() {
- throw evalIntegerException();
- }
-
- @Override
- public boolean canEvalKeyword() {
- return false;
- }
-
- @Override
- public PvKeyword evalKeyword() {
- throw this.evalKeywordException();
- }
-
- @Override
- public boolean canEvalPercentage() {
- return false;
- }
-
- @Override
- public float evalPercentage() {
- throw evalPercentageException();
- }
-
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-12-28 00:30:19
|
Revision: 12966
http://sourceforge.net/p/foray/code/12966
Author: victormote
Date: 2022-12-28 00:30:16 +0000 (Wed, 28 Dec 2022)
Log Message:
-----------
1. Remove no-longer-needed "throws" clauses. 2. Add special instance for an unspecified property name.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromNearestSpecifiedValue.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromPageMasterRegion.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromParent.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromTableColumn.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnInheritedPropertyValue.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnMergePropertyValues.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromNearestSpecifiedValue.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromNearestSpecifiedValue.java 2022-12-28 00:12:56 UTC (rev 12965)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromNearestSpecifiedValue.java 2022-12-28 00:30:16 UTC (rev 12966)
@@ -30,7 +30,6 @@
import org.foray.fotree.FoObj;
import org.foray.fotree.Property;
-import org.foray.fotree.PropertyException;
import org.foray.fotree.fo.FoPropertyId;
import java.util.EnumMap;
@@ -43,6 +42,10 @@
*/
public final class FnFromNearestSpecifiedValue extends FnAbstractNamedProperty {
+ /** Instance whose operand is null, indicating that the current property should be evaluated by this function. */
+ private static final FnFromNearestSpecifiedValue UNSPECIFIED_PROPERTY_INSTANCE =
+ new FnFromNearestSpecifiedValue(null);
+
/** Internal map of the instances. The key is the property id of the instance and the value is the instance.
* This is used to ensure that at most one instance per property ID is created. */
private static final Map<FoPropertyId, FnFromNearestSpecifiedValue> INSTANCE_MAP =
@@ -55,9 +58,8 @@
* Private constructor.
* Use {@link #procureInstance(FoPropertyId)} to obtain an instance of this class.
* @param operand The ID of the property to be retrieved by this function.
- * @throws PropertyException For errors creating this function.
*/
- private FnFromNearestSpecifiedValue(final FoPropertyId operand) throws PropertyException {
+ private FnFromNearestSpecifiedValue(final FoPropertyId operand) {
this.operand = operand;
}
@@ -65,9 +67,11 @@
* Procure the instance of this function for a specific property type.
* @param operand The ID of the property to be retrieved by this function.
* @return The instance of this function for {@code propertyType}.
- * @throws PropertyException For errors parsing the
*/
- public static FnFromNearestSpecifiedValue procureInstance(final FoPropertyId operand) throws PropertyException {
+ public static FnFromNearestSpecifiedValue procureInstance(final FoPropertyId operand) {
+ if (operand == null) {
+ return UNSPECIFIED_PROPERTY_INSTANCE;
+ }
FnFromNearestSpecifiedValue instance = INSTANCE_MAP.get(operand);
if (instance == null) {
instance = new FnFromNearestSpecifiedValue(operand);
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromPageMasterRegion.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromPageMasterRegion.java 2022-12-28 00:12:56 UTC (rev 12965)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromPageMasterRegion.java 2022-12-28 00:30:16 UTC (rev 12966)
@@ -42,6 +42,9 @@
*/
public final class FnFromPageMasterRegion extends FnAbstractNamedProperty {
+ /** Instance whose operand is null, indicating that the current property should be evaluated by this function. */
+ private static final FnFromPageMasterRegion UNSPECIFIED_PROPERTY_INSTANCE = new FnFromPageMasterRegion(null);
+
/** Internal map of the instances. The key is the property id of the instance and the value is the instance.
* This is used to ensure that at most one instance per property ID is created. */
private static final Map<FoPropertyId, FnFromPageMasterRegion> INSTANCE_MAP =
@@ -54,9 +57,8 @@
* Private constructor.
* Use {@link #procureInstance(FoPropertyId)} to obtain an instance of this class.
* @param operand The ID of the property to be retrieved by this function.
- * @throws PropertyException For errors creating this function.
*/
- private FnFromPageMasterRegion(final FoPropertyId operand) throws PropertyException {
+ private FnFromPageMasterRegion(final FoPropertyId operand) {
this.operand = operand;
}
@@ -64,9 +66,11 @@
* Procure the instance of this function for a specific property type.
* @param operand The ID of the property to be retrieved by this function.
* @return The instance of this function for {@code propertyType}.
- * @throws PropertyException For errors parsing the
*/
- public static FnFromPageMasterRegion procureInstance(final FoPropertyId operand) throws PropertyException {
+ public static FnFromPageMasterRegion procureInstance(final FoPropertyId operand) {
+ if (operand == null) {
+ return UNSPECIFIED_PROPERTY_INSTANCE;
+ }
FnFromPageMasterRegion instance = INSTANCE_MAP.get(operand);
if (instance == null) {
instance = new FnFromPageMasterRegion(operand);
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromParent.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromParent.java 2022-12-28 00:12:56 UTC (rev 12965)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromParent.java 2022-12-28 00:30:16 UTC (rev 12966)
@@ -43,6 +43,9 @@
*/
public final class FnFromParent extends FnAbstractNamedProperty {
+ /** Instance whose operand is null, indicating that the current property should be evaluated by this function. */
+ private static final FnFromParent UNSPECIFIED_PROPERTY_INSTANCE = new FnFromParent(null);
+
/** Internal map of the instances. The key is the property id of the instance and the value is the instance.
* This is used to ensure that at most one instance per property ID is created. */
private static final Map<FoPropertyId, FnFromParent> INSTANCE_MAP =
@@ -55,9 +58,8 @@
* Private constructor.
* Use {@link #procureInstance(FoPropertyId)} to obtain an instance of this class.
* @param operand The ID of the property to be retrieved by this function.
- * @throws PropertyException For errors creating this function.
*/
- private FnFromParent(final FoPropertyId operand) throws PropertyException {
+ private FnFromParent(final FoPropertyId operand) {
this.operand = operand;
}
@@ -65,9 +67,11 @@
* Procure the instance of this function for a specific property type.
* @param operand The ID of the property to be retrieved by this function.
* @return The instance of this function for {@code propertyType}.
- * @throws PropertyException For errors parsing the
*/
- public static FnFromParent procureInstance(final FoPropertyId operand) throws PropertyException {
+ public static FnFromParent procureInstance(final FoPropertyId operand) {
+ if (operand == null) {
+ return UNSPECIFIED_PROPERTY_INSTANCE;
+ }
FnFromParent instance = INSTANCE_MAP.get(operand);
if (instance == null) {
instance = new FnFromParent(operand);
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromTableColumn.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromTableColumn.java 2022-12-28 00:12:56 UTC (rev 12965)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromTableColumn.java 2022-12-28 00:30:16 UTC (rev 12966)
@@ -28,7 +28,6 @@
package org.foray.fotree.value;
-import org.foray.fotree.PropertyException;
import org.foray.fotree.fo.FoPropertyId;
import java.util.EnumMap;
@@ -41,6 +40,9 @@
*/
public final class FnFromTableColumn extends FnAbstractNamedProperty {
+ /** Instance whose operand is null, indicating that the current property should be evaluated by this function. */
+ private static final FnFromTableColumn UNSPECIFIED_PROPERTY_INSTANCE = new FnFromTableColumn(null);
+
/** Internal map of the instances. The key is the property id of the instance and the value is the instance.
* This is used to ensure that at most one instance per property ID is created. */
private static final Map<FoPropertyId, FnFromTableColumn> INSTANCE_MAP =
@@ -53,9 +55,8 @@
* Private constructor.
* Use {@link #procureInstance(FoPropertyId)} to obtain an instance of this class.
* @param operand The ID of the property to be retrieved by this function.
- * @throws PropertyException For errors creating this function.
*/
- private FnFromTableColumn(final FoPropertyId operand) throws PropertyException {
+ private FnFromTableColumn(final FoPropertyId operand) {
this.operand = operand;
}
@@ -63,9 +64,11 @@
* Procure the instance of this function for a specific property type.
* @param operand The ID of the property to be retrieved by this function.
* @return The instance of this function for {@code propertyType}.
- * @throws PropertyException For errors parsing the
*/
- public static FnFromTableColumn procureInstance(final FoPropertyId operand) throws PropertyException {
+ public static FnFromTableColumn procureInstance(final FoPropertyId operand) {
+ if (operand == null) {
+ return UNSPECIFIED_PROPERTY_INSTANCE;
+ }
FnFromTableColumn instance = INSTANCE_MAP.get(operand);
if (instance == null) {
instance = new FnFromTableColumn(operand);
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnInheritedPropertyValue.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnInheritedPropertyValue.java 2022-12-28 00:12:56 UTC (rev 12965)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnInheritedPropertyValue.java 2022-12-28 00:30:16 UTC (rev 12966)
@@ -43,6 +43,9 @@
*/
public final class FnInheritedPropertyValue extends FnAbstractNamedProperty {
+ /** Instance whose operand is null, indicating that the current property should be evaluated by this function. */
+ private static final FnInheritedPropertyValue UNSPECIFIED_PROPERTY_INSTANCE = new FnInheritedPropertyValue(null);
+
/** Internal map of the instances. The key is the property id of the instance and the value is the instance.
* This is used to ensure that at most one instance per property ID is created. */
private static final Map<FoPropertyId, FnInheritedPropertyValue> INSTANCE_MAP =
@@ -55,9 +58,8 @@
* Private constructor.
* Use {@link #procureInstance(FoPropertyId)} to obtain an instance of this class.
* @param operand The ID of the property to be retrieved by this function.
- * @throws PropertyException For errors creating this function.
*/
- private FnInheritedPropertyValue(final FoPropertyId operand) throws PropertyException {
+ private FnInheritedPropertyValue(final FoPropertyId operand) {
this.operand = operand;
}
@@ -65,9 +67,11 @@
* Procure the instance of this function for a specific property type.
* @param operand The ID of the property to be retrieved by this function.
* @return The instance of this function for {@code propertyType}.
- * @throws PropertyException For errors parsing the
*/
- public static FnInheritedPropertyValue procureInstance(final FoPropertyId operand) throws PropertyException {
+ public static FnInheritedPropertyValue procureInstance(final FoPropertyId operand) {
+ if (operand == null) {
+ return UNSPECIFIED_PROPERTY_INSTANCE;
+ }
FnInheritedPropertyValue instance = INSTANCE_MAP.get(operand);
if (instance == null) {
instance = new FnInheritedPropertyValue(operand);
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnMergePropertyValues.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnMergePropertyValues.java 2022-12-28 00:12:56 UTC (rev 12965)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnMergePropertyValues.java 2022-12-28 00:30:16 UTC (rev 12966)
@@ -42,6 +42,9 @@
*/
public final class FnMergePropertyValues extends FnAbstractNamedProperty {
+ /** Instance whose operand is null, indicating that the current property should be evaluated by this function. */
+ private static final FnMergePropertyValues UNSPECIFIED_PROPERTY_INSTANCE = new FnMergePropertyValues(null);
+
/** Internal map of the instances. The key is the property id of the instance and the value is the instance.
* This is used to ensure that at most one instance per property ID is created. */
private static final Map<FoPropertyId, FnMergePropertyValues> INSTANCE_MAP =
@@ -54,9 +57,8 @@
* Private constructor.
* Use {@link #procureInstance(FoPropertyId)} to obtain an instance of this class.
* @param operand The ID of the property to be retrieved by this function.
- * @throws PropertyException For errors creating this function.
*/
- private FnMergePropertyValues(final FoPropertyId operand) throws PropertyException {
+ private FnMergePropertyValues(final FoPropertyId operand) {
this.operand = operand;
}
@@ -64,9 +66,11 @@
* Procure the instance of this function for a specific property type.
* @param operand The ID of the property to be retrieved by this function.
* @return The instance of this function for {@code propertyType}.
- * @throws PropertyException For errors parsing the
*/
- public static FnMergePropertyValues procureInstance(final FoPropertyId operand) throws PropertyException {
+ public static FnMergePropertyValues procureInstance(final FoPropertyId operand) {
+ if (operand == null) {
+ return UNSPECIFIED_PROPERTY_INSTANCE;
+ }
FnMergePropertyValues instance = INSTANCE_MAP.get(operand);
if (instance == null) {
instance = new FnMergePropertyValues(operand);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-12-28 00:12:58
|
Revision: 12965
http://sourceforge.net/p/foray/code/12965
Author: victormote
Date: 2022-12-28 00:12:56 +0000 (Wed, 28 Dec 2022)
Log Message:
-----------
Compute the operand in the factory method. Create EnumMap for each named-property function.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnAbstractNamedProperty.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromNearestSpecifiedValue.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromPageMasterRegion.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromParent.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromTableColumn.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnInheritedPropertyValue.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnMergePropertyValues.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/Function.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnAbstractNamedProperty.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnAbstractNamedProperty.java 2022-12-27 22:25:59 UTC (rev 12964)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnAbstractNamedProperty.java 2022-12-28 00:12:56 UTC (rev 12965)
@@ -28,8 +28,6 @@
package org.foray.fotree.value;
-import org.foray.fotree.PropertyException;
-import org.foray.fotree.PropertyId;
import org.foray.fotree.fo.FoPropertyId;
import java.awt.Color;
@@ -41,34 +39,6 @@
public abstract class FnAbstractNamedProperty extends Function {
/**
- * Computes the operand from the arguments and property type.
- * @param arguments The arguments to this function.
- * @param propertyType The property which is calling this function.
- * @return The operand to be used for {@code arguments} and {@code propertyType}.
- * @throws PropertyException For errors creating this function.
- */
- protected FoPropertyId computeOperand(final Expr[] arguments, final PropertyId propertyType)
- throws PropertyException {
- final DtName name = validateNoneOrOneName(arguments);
- if (name == null) {
- if (propertyType instanceof FoPropertyId) {
- return (FoPropertyId) propertyType;
- } else {
- throw new PropertyException("Function " + this.getFunctionName()
- + " is valid only for properties in the fo: "
- + "namespace.");
- }
- } else {
- final FoPropertyId foProperty = FoPropertyId.xslValueOf(name.getValue());
- if (foProperty == null) {
- throw new PropertyException("Not a valid property in the fo: "
- + "namespace: " + name.getValue());
- }
- return foProperty;
- }
- }
-
- /**
* Returns the property type to be operated on by the subclass.
* @return The property type operand.
*/
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromNearestSpecifiedValue.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromNearestSpecifiedValue.java 2022-12-27 22:25:59 UTC (rev 12964)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromNearestSpecifiedValue.java 2022-12-28 00:12:56 UTC (rev 12965)
@@ -31,28 +31,51 @@
import org.foray.fotree.FoObj;
import org.foray.fotree.Property;
import org.foray.fotree.PropertyException;
-import org.foray.fotree.PropertyId;
import org.foray.fotree.fo.FoPropertyId;
+import java.util.EnumMap;
+import java.util.Map;
+
/**
* The "from-nearest-specified-value" function in XSL-FO.
+ * Instances of this class are immutable.
* @see "XSL-FO Recommendation 1.1, Section 5.10.4."
*/
-public class FnFromNearestSpecifiedValue extends FnAbstractNamedProperty {
+public final class FnFromNearestSpecifiedValue extends FnAbstractNamedProperty {
+ /** Internal map of the instances. The key is the property id of the instance and the value is the instance.
+ * This is used to ensure that at most one instance per property ID is created. */
+ private static final Map<FoPropertyId, FnFromNearestSpecifiedValue> INSTANCE_MAP =
+ new EnumMap<FoPropertyId, FnFromNearestSpecifiedValue>(FoPropertyId.class);
+
/** The parameter to this function. */
- private FoPropertyId operand1;
+ private FoPropertyId operand;
/**
- * Constructor.
- * @param arguments The arguments to this function.
- * @param propertyType The property which is calling this function.
+ * Private constructor.
+ * Use {@link #procureInstance(FoPropertyId)} to obtain an instance of this class.
+ * @param operand The ID of the property to be retrieved by this function.
* @throws PropertyException For errors creating this function.
*/
- public FnFromNearestSpecifiedValue(final Expr[] arguments, final PropertyId propertyType) throws PropertyException {
- this.operand1 = computeOperand(arguments, propertyType);
+ private FnFromNearestSpecifiedValue(final FoPropertyId operand) throws PropertyException {
+ this.operand = operand;
}
+ /**
+ * Procure the instance of this function for a specific property type.
+ * @param operand The ID of the property to be retrieved by this function.
+ * @return The instance of this function for {@code propertyType}.
+ * @throws PropertyException For errors parsing the
+ */
+ public static FnFromNearestSpecifiedValue procureInstance(final FoPropertyId operand) throws PropertyException {
+ FnFromNearestSpecifiedValue instance = INSTANCE_MAP.get(operand);
+ if (instance == null) {
+ instance = new FnFromNearestSpecifiedValue(operand);
+ INSTANCE_MAP.put(operand, instance);
+ }
+ return instance;
+ }
+
@Override
public String getFunctionName() {
return "from-nearest-specified-value";
@@ -60,7 +83,7 @@
@Override
protected FoPropertyId getPropertyType() {
- return this.operand1;
+ return this.operand;
}
/**
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromPageMasterRegion.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromPageMasterRegion.java 2022-12-27 22:25:59 UTC (rev 12964)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromPageMasterRegion.java 2022-12-28 00:12:56 UTC (rev 12965)
@@ -30,28 +30,51 @@
import org.foray.fotree.FoObj;
import org.foray.fotree.PropertyException;
-import org.foray.fotree.PropertyId;
import org.foray.fotree.fo.FoPropertyId;
+import java.util.EnumMap;
+import java.util.Map;
+
/**
* The "from-page-master-region" function in XSL-FO.
+ * Instances of this class are immutable.
* @see "XSL-FO Recommendation 1.1, Section 5.10.4."
*/
-public class FnFromPageMasterRegion extends FnAbstractNamedProperty {
+public final class FnFromPageMasterRegion extends FnAbstractNamedProperty {
+ /** Internal map of the instances. The key is the property id of the instance and the value is the instance.
+ * This is used to ensure that at most one instance per property ID is created. */
+ private static final Map<FoPropertyId, FnFromPageMasterRegion> INSTANCE_MAP =
+ new EnumMap<FoPropertyId, FnFromPageMasterRegion>(FoPropertyId.class);
+
/** The parameter to this function. */
- private FoPropertyId operand1;
+ private FoPropertyId operand;
/**
- * Constructor.
- * @param arguments The arguments to this function.
- * @param propertyType The property which is calling this function.
+ * Private constructor.
+ * Use {@link #procureInstance(FoPropertyId)} to obtain an instance of this class.
+ * @param operand The ID of the property to be retrieved by this function.
* @throws PropertyException For errors creating this function.
*/
- public FnFromPageMasterRegion(final Expr[] arguments, final PropertyId propertyType) throws PropertyException {
- this.operand1 = computeOperand(arguments, propertyType);
+ private FnFromPageMasterRegion(final FoPropertyId operand) throws PropertyException {
+ this.operand = operand;
}
+ /**
+ * Procure the instance of this function for a specific property type.
+ * @param operand The ID of the property to be retrieved by this function.
+ * @return The instance of this function for {@code propertyType}.
+ * @throws PropertyException For errors parsing the
+ */
+ public static FnFromPageMasterRegion procureInstance(final FoPropertyId operand) throws PropertyException {
+ FnFromPageMasterRegion instance = INSTANCE_MAP.get(operand);
+ if (instance == null) {
+ instance = new FnFromPageMasterRegion(operand);
+ INSTANCE_MAP.put(operand, instance);
+ }
+ return instance;
+ }
+
@Override
public String getFunctionName() {
return "from-page-master-region";
@@ -59,7 +82,7 @@
@Override
protected FoPropertyId getPropertyType() {
- return this.operand1;
+ return this.operand;
}
/**
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromParent.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromParent.java 2022-12-27 22:25:59 UTC (rev 12964)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromParent.java 2022-12-28 00:12:56 UTC (rev 12965)
@@ -31,28 +31,51 @@
import org.foray.fotree.FoObj;
import org.foray.fotree.Property;
import org.foray.fotree.PropertyException;
-import org.foray.fotree.PropertyId;
import org.foray.fotree.fo.FoPropertyId;
+import java.util.EnumMap;
+import java.util.Map;
+
/**
* The "from-parent" function in XSL-FO.
+ * Instances of this class are immutable.
* @see "XSL-FO Recommendation 1.1, Section 5.10.4."
*/
-public class FnFromParent extends FnAbstractNamedProperty {
+public final class FnFromParent extends FnAbstractNamedProperty {
+ /** Internal map of the instances. The key is the property id of the instance and the value is the instance.
+ * This is used to ensure that at most one instance per property ID is created. */
+ private static final Map<FoPropertyId, FnFromParent> INSTANCE_MAP =
+ new EnumMap<FoPropertyId, FnFromParent>(FoPropertyId.class);
+
/** The parameter to this function. */
- private FoPropertyId operand1;
+ private FoPropertyId operand;
/**
- * Constructor.
- * @param arguments The arguments to this function.
- * @param propertyType The property which is calling this function.
+ * Private constructor.
+ * Use {@link #procureInstance(FoPropertyId)} to obtain an instance of this class.
+ * @param operand The ID of the property to be retrieved by this function.
* @throws PropertyException For errors creating this function.
*/
- public FnFromParent(final Expr[] arguments, final PropertyId propertyType) throws PropertyException {
- this.operand1 = computeOperand(arguments, propertyType);
+ private FnFromParent(final FoPropertyId operand) throws PropertyException {
+ this.operand = operand;
}
+ /**
+ * Procure the instance of this function for a specific property type.
+ * @param operand The ID of the property to be retrieved by this function.
+ * @return The instance of this function for {@code propertyType}.
+ * @throws PropertyException For errors parsing the
+ */
+ public static FnFromParent procureInstance(final FoPropertyId operand) throws PropertyException {
+ FnFromParent instance = INSTANCE_MAP.get(operand);
+ if (instance == null) {
+ instance = new FnFromParent(operand);
+ INSTANCE_MAP.put(operand, instance);
+ }
+ return instance;
+ }
+
@Override
public String getFunctionName() {
return "from-parent";
@@ -60,7 +83,7 @@
@Override
protected FoPropertyId getPropertyType() {
- return this.operand1;
+ return this.operand;
}
/**
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromTableColumn.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromTableColumn.java 2022-12-27 22:25:59 UTC (rev 12964)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromTableColumn.java 2022-12-28 00:12:56 UTC (rev 12965)
@@ -29,28 +29,51 @@
package org.foray.fotree.value;
import org.foray.fotree.PropertyException;
-import org.foray.fotree.PropertyId;
import org.foray.fotree.fo.FoPropertyId;
+import java.util.EnumMap;
+import java.util.Map;
+
/**
* The "from-table-column" function in XSL-FO.
+ * Instances of this class are immutable.
* @see "XSL-FO Recommendation 1.1, Section 5.10.4."
*/
-public class FnFromTableColumn extends FnAbstractNamedProperty {
+public final class FnFromTableColumn extends FnAbstractNamedProperty {
+ /** Internal map of the instances. The key is the property id of the instance and the value is the instance.
+ * This is used to ensure that at most one instance per property ID is created. */
+ private static final Map<FoPropertyId, FnFromTableColumn> INSTANCE_MAP =
+ new EnumMap<FoPropertyId, FnFromTableColumn>(FoPropertyId.class);
+
/** The parameter to this function. */
- private FoPropertyId operand1;
+ private FoPropertyId operand;
/**
- * Constructor.
- * @param arguments The arguments to this function.
- * @param propertyType The property which is calling this function.
+ * Private constructor.
+ * Use {@link #procureInstance(FoPropertyId)} to obtain an instance of this class.
+ * @param operand The ID of the property to be retrieved by this function.
* @throws PropertyException For errors creating this function.
*/
- public FnFromTableColumn(final Expr[] arguments, final PropertyId propertyType) throws PropertyException {
- this.operand1 = computeOperand(arguments, propertyType);
+ private FnFromTableColumn(final FoPropertyId operand) throws PropertyException {
+ this.operand = operand;
}
+ /**
+ * Procure the instance of this function for a specific property type.
+ * @param operand The ID of the property to be retrieved by this function.
+ * @return The instance of this function for {@code propertyType}.
+ * @throws PropertyException For errors parsing the
+ */
+ public static FnFromTableColumn procureInstance(final FoPropertyId operand) throws PropertyException {
+ FnFromTableColumn instance = INSTANCE_MAP.get(operand);
+ if (instance == null) {
+ instance = new FnFromTableColumn(operand);
+ INSTANCE_MAP.put(operand, instance);
+ }
+ return instance;
+ }
+
@Override
public String getFunctionName() {
return "from-table-column";
@@ -58,7 +81,7 @@
@Override
protected FoPropertyId getPropertyType() {
- return this.operand1;
+ return this.operand;
}
/**
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnInheritedPropertyValue.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnInheritedPropertyValue.java 2022-12-27 22:25:59 UTC (rev 12964)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnInheritedPropertyValue.java 2022-12-28 00:12:56 UTC (rev 12965)
@@ -31,28 +31,51 @@
import org.foray.fotree.FoObj;
import org.foray.fotree.Property;
import org.foray.fotree.PropertyException;
-import org.foray.fotree.PropertyId;
import org.foray.fotree.fo.FoPropertyId;
+import java.util.EnumMap;
+import java.util.Map;
+
/**
* The "inherited-property-value" function in XSL-FO.
+ * Instances of this class are immutable.
* @see "XSL-FO Recommendation 1.1, Section 5.10.4."
*/
-public class FnInheritedPropertyValue extends FnAbstractNamedProperty {
+public final class FnInheritedPropertyValue extends FnAbstractNamedProperty {
+ /** Internal map of the instances. The key is the property id of the instance and the value is the instance.
+ * This is used to ensure that at most one instance per property ID is created. */
+ private static final Map<FoPropertyId, FnInheritedPropertyValue> INSTANCE_MAP =
+ new EnumMap<FoPropertyId, FnInheritedPropertyValue>(FoPropertyId.class);
+
/** The parameter to this function. */
- private FoPropertyId operand1;
+ private FoPropertyId operand;
/**
- * Constructor.
- * @param arguments The arguments to this function.
- * @param propertyType The property which is calling this function.
+ * Private constructor.
+ * Use {@link #procureInstance(FoPropertyId)} to obtain an instance of this class.
+ * @param operand The ID of the property to be retrieved by this function.
* @throws PropertyException For errors creating this function.
*/
- public FnInheritedPropertyValue(final Expr[] arguments, final PropertyId propertyType) throws PropertyException {
- this.operand1 = computeOperand(arguments, propertyType);
+ private FnInheritedPropertyValue(final FoPropertyId operand) throws PropertyException {
+ this.operand = operand;
}
+ /**
+ * Procure the instance of this function for a specific property type.
+ * @param operand The ID of the property to be retrieved by this function.
+ * @return The instance of this function for {@code propertyType}.
+ * @throws PropertyException For errors parsing the
+ */
+ public static FnInheritedPropertyValue procureInstance(final FoPropertyId operand) throws PropertyException {
+ FnInheritedPropertyValue instance = INSTANCE_MAP.get(operand);
+ if (instance == null) {
+ instance = new FnInheritedPropertyValue(operand);
+ INSTANCE_MAP.put(operand, instance);
+ }
+ return instance;
+ }
+
@Override
public String getFunctionName() {
return "inherited-property-value";
@@ -60,7 +83,7 @@
@Override
protected FoPropertyId getPropertyType() {
- return this.operand1;
+ return this.operand;
}
/**
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnMergePropertyValues.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnMergePropertyValues.java 2022-12-27 22:25:59 UTC (rev 12964)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnMergePropertyValues.java 2022-12-28 00:12:56 UTC (rev 12965)
@@ -30,28 +30,51 @@
import org.foray.fotree.FoObj;
import org.foray.fotree.PropertyException;
-import org.foray.fotree.PropertyId;
import org.foray.fotree.fo.FoPropertyId;
+import java.util.EnumMap;
+import java.util.Map;
+
/**
* The "merge-property-values" function in XSL-FO.
+ * Instances of this class are immutable.
* @see "XSL-FO Recommendation 1.1, Section 5.10.4."
*/
-public class FnMergePropertyValues extends FnAbstractNamedProperty {
+public final class FnMergePropertyValues extends FnAbstractNamedProperty {
+ /** Internal map of the instances. The key is the property id of the instance and the value is the instance.
+ * This is used to ensure that at most one instance per property ID is created. */
+ private static final Map<FoPropertyId, FnMergePropertyValues> INSTANCE_MAP =
+ new EnumMap<FoPropertyId, FnMergePropertyValues>(FoPropertyId.class);
+
/** The parameter to this function. */
- private FoPropertyId operand1;
+ private FoPropertyId operand;
/**
- * Constructor.
- * @param arguments The arguments to this function.
- * @param propertyType The property which is calling this function.
+ * Private constructor.
+ * Use {@link #procureInstance(FoPropertyId)} to obtain an instance of this class.
+ * @param operand The ID of the property to be retrieved by this function.
* @throws PropertyException For errors creating this function.
*/
- public FnMergePropertyValues(final Expr[] arguments, final PropertyId propertyType) throws PropertyException {
- this.operand1 = computeOperand(arguments, propertyType);
+ private FnMergePropertyValues(final FoPropertyId operand) throws PropertyException {
+ this.operand = operand;
}
+ /**
+ * Procure the instance of this function for a specific property type.
+ * @param operand The ID of the property to be retrieved by this function.
+ * @return The instance of this function for {@code propertyType}.
+ * @throws PropertyException For errors parsing the
+ */
+ public static FnMergePropertyValues procureInstance(final FoPropertyId operand) throws PropertyException {
+ FnMergePropertyValues instance = INSTANCE_MAP.get(operand);
+ if (instance == null) {
+ instance = new FnMergePropertyValues(operand);
+ INSTANCE_MAP.put(operand, instance);
+ }
+ return instance;
+ }
+
@Override
public String getFunctionName() {
return "merge-property-values";
@@ -59,7 +82,7 @@
@Override
protected FoPropertyId getPropertyType() {
- return this.operand1;
+ return this.operand;
}
/**
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/Function.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/Function.java 2022-12-27 22:25:59 UTC (rev 12964)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/Function.java 2022-12-28 00:12:56 UTC (rev 12965)
@@ -31,6 +31,7 @@
import org.foray.fotree.PropertyException;
import org.foray.fotree.PropertyId;
+import org.foray.fotree.fo.FoPropertyId;
/**
* Abstract superclass for all XSL-FO functions.
@@ -39,10 +40,19 @@
/**
* Throws an exception indicating that the parameters are invalid.
+ * @param functionName The name of the function being parsed.
* @throws PropertyException Always, as that is the purpose of this method.
*/
+ protected static void invalidParameters(final String functionName) throws PropertyException {
+ throw new PropertyException("Invalid Parameters, function " + functionName);
+ }
+
+ /**
+ * Throws an exception indicating that the parameters are invalid.
+ * @throws PropertyException Always, as that is the purpose of this method.
+ */
protected void invalidParameters() throws PropertyException {
- throw new PropertyException("Invalid Parameters, function " + getFunctionName());
+ invalidParameters(this.getFunctionName());
}
/**
@@ -75,19 +85,24 @@
return new FnFloor(arguments);
}
case "from-nearest-specified-value": {
- return new FnFromNearestSpecifiedValue(arguments, propertyType);
+ final FoPropertyId propertyId = computeNamedPropertyOperand(functionType, arguments, propertyType);
+ return FnFromNearestSpecifiedValue.procureInstance(propertyId);
}
case "from-page-master-region": {
- return new FnFromPageMasterRegion(arguments, propertyType);
+ final FoPropertyId propertyId = computeNamedPropertyOperand(functionType, arguments, propertyType);
+ return FnFromPageMasterRegion.procureInstance(propertyId);
}
case "from-parent": {
- return new FnFromParent(arguments, propertyType);
+ final FoPropertyId propertyId = computeNamedPropertyOperand(functionType, arguments, propertyType);
+ return FnFromParent.procureInstance(propertyId);
}
case "from-table-column": {
- return new FnFromTableColumn(arguments, propertyType);
+ final FoPropertyId propertyId = computeNamedPropertyOperand(functionType, arguments, propertyType);
+ return FnFromTableColumn.procureInstance(propertyId);
}
case "inherited-property-value": {
- return new FnInheritedPropertyValue(arguments, propertyType);
+ final FoPropertyId propertyId = computeNamedPropertyOperand(functionType, arguments, propertyType);
+ return FnInheritedPropertyValue.procureInstance(propertyId);
}
case "label-end": {
return new FnLabelEnd(arguments);
@@ -96,7 +111,8 @@
return new FnMax(arguments);
}
case "merge-property-values": {
- return new FnMergePropertyValues(arguments, propertyType);
+ final FoPropertyId propertyId = computeNamedPropertyOperand(functionType, arguments, propertyType);
+ return FnMergePropertyValues.procureInstance(propertyId);
}
case "min": {
return new FnMin(arguments);
@@ -127,10 +143,11 @@
/**
* Validates that this function has no arguments, and throws an exception if it does.
+ * @param functionName The name of the function being parsed.
* @param arguments The arguments passed to this function.
* @throws PropertyException If this function has any arguments.
*/
- protected void validateNoArguments(final Expr[] arguments)
+ protected static void validateNoArguments(final String functionName, final Expr[] arguments)
throws PropertyException {
if (arguments == null) {
return;
@@ -138,17 +155,28 @@
if (arguments.length == 0) {
return;
}
- this.invalidParameters();
+ invalidParameters(functionName);
}
/**
+ * Validates that this function has no arguments, and throws an exception if it does.
+ * @param arguments The arguments passed to this function.
+ * @throws PropertyException If this function has any arguments.
+ */
+ protected void validateNoArguments(final Expr[] arguments) throws PropertyException {
+ validateNoArguments(getFunctionName(), arguments);
+ }
+
+ /**
* Validates that this function either 1) has no arguments, or 2) has exactly one argument and that a Name.
* Throws an exception otherwise.
+ * @param functionName The name of the function being parsed.
* @param arguments The arguments passed to this function.
* @return The Name instance if any, or null otherwise.
* @throws PropertyException If this function does not meet the stated requirements.
*/
- protected DtName validateNoneOrOneName(final Expr[] arguments) throws PropertyException {
+ protected static DtName validateNoneOrOneName(final String functionName, final Expr[] arguments)
+ throws PropertyException {
if (arguments == null) {
return null;
}
@@ -156,13 +184,53 @@
return null;
}
if (arguments.length > 1) {
- this.invalidParameters();
+ invalidParameters(functionName);
}
if (arguments[0] instanceof DtName) {
return (DtName) arguments[0];
}
- this.invalidParameters();
+ invalidParameters(functionName);
return null;
}
+ /**
+ * Validates that this function either 1) has no arguments, or 2) has exactly one argument and that a Name.
+ * Throws an exception otherwise.
+ * @param arguments The arguments passed to this function.
+ * @return The Name instance if any, or null otherwise.
+ * @throws PropertyException If this function does not meet the stated requirements.
+ */
+ protected DtName validateNoneOrOneName(final Expr[] arguments) throws PropertyException {
+ return validateNoneOrOneName(this.getFunctionName(), arguments);
+ }
+
+ /**
+ * Computes the operand of a named property function from the arguments and property type.
+ * @param functionName The name of the function being parsed.
+ * @param arguments The arguments to this function.
+ * @param propertyType The property which is calling this function.
+ * @return The operand to be used for {@code arguments} and {@code propertyType}.
+ * @throws PropertyException For errors creating this function.
+ */
+ private static FoPropertyId computeNamedPropertyOperand(final String functionName, final Expr[] arguments,
+ final PropertyId propertyType) throws PropertyException {
+ final DtName name = validateNoneOrOneName(functionName, arguments);
+ if (name == null) {
+ if (propertyType instanceof FoPropertyId) {
+ return (FoPropertyId) propertyType;
+ } else {
+ throw new PropertyException("Function " + functionName
+ + " is valid only for properties in the fo: "
+ + "namespace.");
+ }
+ } else {
+ final FoPropertyId foProperty = FoPropertyId.xslValueOf(name.getValue());
+ if (foProperty == null) {
+ throw new PropertyException("Not a valid property in the fo: "
+ + "namespace: " + name.getValue());
+ }
+ return foProperty;
+ }
+ }
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-12-27 22:26:01
|
Revision: 12964
http://sourceforge.net/p/foray/code/12964
Author: victormote
Date: 2022-12-27 22:25:59 +0000 (Tue, 27 Dec 2022)
Log Message:
-----------
Move storage of named property to the subclasses.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnAbstractNamedProperty.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromNearestSpecifiedValue.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromPageMasterRegion.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromParent.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromTableColumn.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnInheritedPropertyValue.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnMergePropertyValues.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnAbstractNamedProperty.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnAbstractNamedProperty.java 2022-12-27 22:06:49 UTC (rev 12963)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnAbstractNamedProperty.java 2022-12-27 22:25:59 UTC (rev 12964)
@@ -40,22 +40,19 @@
*/
public abstract class FnAbstractNamedProperty extends Function {
- /** The parameter to this function. */
- private FoPropertyId operand1;
-
/**
- * Constructor.
+ * Computes the operand from the arguments and property type.
* @param arguments The arguments to this function.
* @param propertyType The property which is calling this function.
+ * @return The operand to be used for {@code arguments} and {@code propertyType}.
* @throws PropertyException For errors creating this function.
*/
- public FnAbstractNamedProperty(final Expr[] arguments,
- final PropertyId propertyType) throws PropertyException {
- super();
+ protected FoPropertyId computeOperand(final Expr[] arguments, final PropertyId propertyType)
+ throws PropertyException {
final DtName name = validateNoneOrOneName(arguments);
if (name == null) {
if (propertyType instanceof FoPropertyId) {
- this.operand1 = (FoPropertyId) propertyType;
+ return (FoPropertyId) propertyType;
} else {
throw new PropertyException("Function " + this.getFunctionName()
+ " is valid only for properties in the fo: "
@@ -62,13 +59,12 @@
+ "namespace.");
}
} else {
- final FoPropertyId foProperty = FoPropertyId.xslValueOf(
- name.getValue());
+ final FoPropertyId foProperty = FoPropertyId.xslValueOf(name.getValue());
if (foProperty == null) {
throw new PropertyException("Not a valid property in the fo: "
+ "namespace: " + name.getValue());
}
- this.operand1 = foProperty;
+ return foProperty;
}
}
@@ -76,9 +72,7 @@
* Returns the property type to be operated on by the subclass.
* @return The property type operand.
*/
- protected FoPropertyId getPropertyType() {
- return this.operand1;
- }
+ protected abstract FoPropertyId getPropertyType();
@Override
public boolean canEvalNumeric() {
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromNearestSpecifiedValue.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromNearestSpecifiedValue.java 2022-12-27 22:06:49 UTC (rev 12963)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromNearestSpecifiedValue.java 2022-12-27 22:25:59 UTC (rev 12964)
@@ -40,6 +40,9 @@
*/
public class FnFromNearestSpecifiedValue extends FnAbstractNamedProperty {
+ /** The parameter to this function. */
+ private FoPropertyId operand1;
+
/**
* Constructor.
* @param arguments The arguments to this function.
@@ -46,9 +49,8 @@
* @param propertyType The property which is calling this function.
* @throws PropertyException For errors creating this function.
*/
- public FnFromNearestSpecifiedValue(final Expr[] arguments,
- final PropertyId propertyType) throws PropertyException {
- super(arguments, propertyType);
+ public FnFromNearestSpecifiedValue(final Expr[] arguments, final PropertyId propertyType) throws PropertyException {
+ this.operand1 = computeOperand(arguments, propertyType);
}
@Override
@@ -56,6 +58,11 @@
return "from-nearest-specified-value";
}
+ @Override
+ protected FoPropertyId getPropertyType() {
+ return this.operand1;
+ }
+
/**
* Returns the value of this function.
* @param callingProperty The property which is calling this function.
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromPageMasterRegion.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromPageMasterRegion.java 2022-12-27 22:06:49 UTC (rev 12963)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromPageMasterRegion.java 2022-12-27 22:25:59 UTC (rev 12964)
@@ -31,6 +31,7 @@
import org.foray.fotree.FoObj;
import org.foray.fotree.PropertyException;
import org.foray.fotree.PropertyId;
+import org.foray.fotree.fo.FoPropertyId;
/**
* The "from-page-master-region" function in XSL-FO.
@@ -38,6 +39,9 @@
*/
public class FnFromPageMasterRegion extends FnAbstractNamedProperty {
+ /** The parameter to this function. */
+ private FoPropertyId operand1;
+
/**
* Constructor.
* @param arguments The arguments to this function.
@@ -44,9 +48,8 @@
* @param propertyType The property which is calling this function.
* @throws PropertyException For errors creating this function.
*/
- public FnFromPageMasterRegion(final Expr[] arguments,
- final PropertyId propertyType) throws PropertyException {
- super(arguments, propertyType);
+ public FnFromPageMasterRegion(final Expr[] arguments, final PropertyId propertyType) throws PropertyException {
+ this.operand1 = computeOperand(arguments, propertyType);
}
@Override
@@ -54,6 +57,11 @@
return "from-page-master-region";
}
+ @Override
+ protected FoPropertyId getPropertyType() {
+ return this.operand1;
+ }
+
/**
* Returns the value of this function.
* @param fobj The FO object for whom this property is being evaluated.
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromParent.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromParent.java 2022-12-27 22:06:49 UTC (rev 12963)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromParent.java 2022-12-27 22:25:59 UTC (rev 12964)
@@ -40,6 +40,9 @@
*/
public class FnFromParent extends FnAbstractNamedProperty {
+ /** The parameter to this function. */
+ private FoPropertyId operand1;
+
/**
* Constructor.
* @param arguments The arguments to this function.
@@ -46,9 +49,8 @@
* @param propertyType The property which is calling this function.
* @throws PropertyException For errors creating this function.
*/
- public FnFromParent(final Expr[] arguments, final PropertyId propertyType)
- throws PropertyException {
- super(arguments, propertyType);
+ public FnFromParent(final Expr[] arguments, final PropertyId propertyType) throws PropertyException {
+ this.operand1 = computeOperand(arguments, propertyType);
}
@Override
@@ -56,6 +58,11 @@
return "from-parent";
}
+ @Override
+ protected FoPropertyId getPropertyType() {
+ return this.operand1;
+ }
+
/**
* Returns the value of this function.
* @param fobj The FO object for whom this property is being evaluated.
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromTableColumn.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromTableColumn.java 2022-12-27 22:06:49 UTC (rev 12963)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromTableColumn.java 2022-12-27 22:25:59 UTC (rev 12964)
@@ -30,6 +30,7 @@
import org.foray.fotree.PropertyException;
import org.foray.fotree.PropertyId;
+import org.foray.fotree.fo.FoPropertyId;
/**
* The "from-table-column" function in XSL-FO.
@@ -38,7 +39,7 @@
public class FnFromTableColumn extends FnAbstractNamedProperty {
/** The parameter to this function. */
- private DtName operand1;
+ private FoPropertyId operand1;
/**
* Constructor.
@@ -47,8 +48,7 @@
* @throws PropertyException For errors creating this function.
*/
public FnFromTableColumn(final Expr[] arguments, final PropertyId propertyType) throws PropertyException {
- super(arguments, propertyType);
- this.operand1 = validateNoneOrOneName(arguments);
+ this.operand1 = computeOperand(arguments, propertyType);
}
@Override
@@ -56,12 +56,18 @@
return "from-table-column";
}
+ @Override
+ protected FoPropertyId getPropertyType() {
+ return this.operand1;
+ }
+
/**
* Returns the value of this function.
* @return The value of this function.
*/
public PropertyValue eval() {
- return this.operand1;
+ /* TODO: Implement this. */
+ return null;
}
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnInheritedPropertyValue.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnInheritedPropertyValue.java 2022-12-27 22:06:49 UTC (rev 12963)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnInheritedPropertyValue.java 2022-12-27 22:25:59 UTC (rev 12964)
@@ -40,6 +40,9 @@
*/
public class FnInheritedPropertyValue extends FnAbstractNamedProperty {
+ /** The parameter to this function. */
+ private FoPropertyId operand1;
+
/**
* Constructor.
* @param arguments The arguments to this function.
@@ -46,9 +49,8 @@
* @param propertyType The property which is calling this function.
* @throws PropertyException For errors creating this function.
*/
- public FnInheritedPropertyValue(final Expr[] arguments,
- final PropertyId propertyType) throws PropertyException {
- super(arguments, propertyType);
+ public FnInheritedPropertyValue(final Expr[] arguments, final PropertyId propertyType) throws PropertyException {
+ this.operand1 = computeOperand(arguments, propertyType);
}
@Override
@@ -56,6 +58,11 @@
return "inherited-property-value";
}
+ @Override
+ protected FoPropertyId getPropertyType() {
+ return this.operand1;
+ }
+
/**
* Returns the value of this function.
* @param callingProperty The property which is calling this function.
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnMergePropertyValues.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnMergePropertyValues.java 2022-12-27 22:06:49 UTC (rev 12963)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnMergePropertyValues.java 2022-12-27 22:25:59 UTC (rev 12964)
@@ -31,6 +31,7 @@
import org.foray.fotree.FoObj;
import org.foray.fotree.PropertyException;
import org.foray.fotree.PropertyId;
+import org.foray.fotree.fo.FoPropertyId;
/**
* The "merge-property-values" function in XSL-FO.
@@ -38,6 +39,9 @@
*/
public class FnMergePropertyValues extends FnAbstractNamedProperty {
+ /** The parameter to this function. */
+ private FoPropertyId operand1;
+
/**
* Constructor.
* @param arguments The arguments to this function.
@@ -45,7 +49,7 @@
* @throws PropertyException For errors creating this function.
*/
public FnMergePropertyValues(final Expr[] arguments, final PropertyId propertyType) throws PropertyException {
- super(arguments, propertyType);
+ this.operand1 = computeOperand(arguments, propertyType);
}
@Override
@@ -53,6 +57,11 @@
return "merge-property-values";
}
+ @Override
+ protected FoPropertyId getPropertyType() {
+ return this.operand1;
+ }
+
/**
* Returns the value of this function.
* @param fobj The FO object for whom this property is being evaluated.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-12-27 22:06:52
|
Revision: 12963
http://sourceforge.net/p/foray/code/12963
Author: victormote
Date: 2022-12-27 22:06:49 +0000 (Tue, 27 Dec 2022)
Log Message:
-----------
Make FnFromTableColumn extend FnAbstractNamedProperty.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromTableColumn.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnMergePropertyValues.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/Function.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/FnFromTableColumnTests.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromTableColumn.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromTableColumn.java 2022-12-27 21:32:26 UTC (rev 12962)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromTableColumn.java 2022-12-27 22:06:49 UTC (rev 12963)
@@ -29,14 +29,13 @@
package org.foray.fotree.value;
import org.foray.fotree.PropertyException;
+import org.foray.fotree.PropertyId;
-import java.awt.Color;
-
/**
* The "from-table-column" function in XSL-FO.
* @see "XSL-FO Recommendation 1.1, Section 5.10.4."
*/
-public class FnFromTableColumn extends Function {
+public class FnFromTableColumn extends FnAbstractNamedProperty {
/** The parameter to this function. */
private DtName operand1;
@@ -44,10 +43,11 @@
/**
* Constructor.
* @param arguments The arguments to this function.
+ * @param propertyType The property which is calling this function.
* @throws PropertyException For errors creating this function.
*/
- public FnFromTableColumn(final Expr[] arguments) throws PropertyException {
- super();
+ public FnFromTableColumn(final Expr[] arguments, final PropertyId propertyType) throws PropertyException {
+ super(arguments, propertyType);
this.operand1 = validateNoneOrOneName(arguments);
}
@@ -64,74 +64,4 @@
return this.operand1;
}
- @Override
- public boolean canEvalNumeric() {
- return false;
- }
-
- @Override
- public double evalNumeric() {
- throw this.evalNumericException();
- }
-
- @Override
- public boolean canEvalLength() {
- return false;
- }
-
- @Override
- public byte getUnitPower() {
- throw this.evalNumericException();
- }
-
- @Override
- public int evalLength(final int pointSize) {
- throw this.evalLengthException();
- }
-
- @Override
- public boolean canEvalColor() {
- return false;
- }
-
- @Override
- public Color evalColor() {
- throw evalColorException();
- }
-
- @Override
- public boolean lengthRequiresFontSize() {
- return false;
- }
-
- @Override
- public boolean canEvalInteger() {
- return false;
- }
-
- @Override
- public int evalInteger() {
- throw evalIntegerException();
- }
-
- @Override
- public boolean canEvalKeyword() {
- return false;
- }
-
- @Override
- public PvKeyword evalKeyword() {
- throw this.evalKeywordException();
- }
-
- @Override
- public boolean canEvalPercentage() {
- return false;
- }
-
- @Override
- public float evalPercentage() {
- throw evalPercentageException();
- }
-
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnMergePropertyValues.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnMergePropertyValues.java 2022-12-27 21:32:26 UTC (rev 12962)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnMergePropertyValues.java 2022-12-27 22:06:49 UTC (rev 12963)
@@ -44,8 +44,7 @@
* @param propertyType The property which is calling this function.
* @throws PropertyException For errors creating this function.
*/
- public FnMergePropertyValues(final Expr[] arguments,
- final PropertyId propertyType) throws PropertyException {
+ public FnMergePropertyValues(final Expr[] arguments, final PropertyId propertyType) throws PropertyException {
super(arguments, propertyType);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/Function.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/Function.java 2022-12-27 21:32:26 UTC (rev 12962)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/Function.java 2022-12-27 22:06:49 UTC (rev 12963)
@@ -84,7 +84,7 @@
return new FnFromParent(arguments, propertyType);
}
case "from-table-column": {
- return new FnFromTableColumn(arguments);
+ return new FnFromTableColumn(arguments, propertyType);
}
case "inherited-property-value": {
return new FnInheritedPropertyValue(arguments, propertyType);
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/FnFromTableColumnTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/FnFromTableColumnTests.java 2022-12-27 21:32:26 UTC (rev 12962)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/FnFromTableColumnTests.java 2022-12-27 22:06:49 UTC (rev 12963)
@@ -38,6 +38,14 @@
*/
public class FnFromTableColumnTests {
+ /** Constant used for testing. */
+ private static final DtName NAME_1 = new DtName("orphans");
+
+ /** Constant used for testing. */
+ private static final Expr[] OPERAND_ARRAY_1 = new Expr[] {
+ FnFromTableColumnTests.NAME_1,
+ };
+
/**
* Unit test of a function creation.
* @throws PropertyException For errors during function creation.
@@ -44,7 +52,7 @@
*/
@Test
public void testBasic() throws PropertyException {
- final Function fn = Function.makeFunction("from-table-column", null, null);
+ final Function fn = Function.makeFunction("from-table-column", OPERAND_ARRAY_1, null);
assertTrue(fn instanceof FnFromTableColumn);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-12-27 21:32:29
|
Revision: 12962
http://sourceforge.net/p/foray/code/12962
Author: victormote
Date: 2022-12-27 21:32:26 +0000 (Tue, 27 Dec 2022)
Log Message:
-----------
Javadoc improvements.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnAbs.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnAbstractNamedProperty.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnBodyStart.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnCeiling.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFloor.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromNearestSpecifiedValue.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromPageMasterRegion.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromParent.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromTableColumn.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnInheritedPropertyValue.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnLabelEnd.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnMax.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnMergePropertyValues.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnMin.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnProportionalColumnWidth.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnRgb.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnRgbIcc.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnRound.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnSystemColor.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnSystemFont.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnAbs.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnAbs.java 2022-12-27 21:16:34 UTC (rev 12961)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnAbs.java 2022-12-27 21:32:26 UTC (rev 12962)
@@ -34,6 +34,7 @@
/**
* The "abs" function in XSL-FO.
+ * @see "XSL-FO Recommendation 1.1, Section 5.10.1."
*/
public class FnAbs extends Function {
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnAbstractNamedProperty.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnAbstractNamedProperty.java 2022-12-27 21:16:34 UTC (rev 12961)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnAbstractNamedProperty.java 2022-12-27 21:32:26 UTC (rev 12962)
@@ -35,9 +35,8 @@
import java.awt.Color;
/**
- * Abstract superclass for the "inherited-property-value", "from-parent",
- * "from-nearest-specified-value", "from-page-master-region", and
- * "merge-property-values" functions.
+ * Abstract superclass for the "inherited-property-value", "from-parent", "from-nearest-specified-value",
+ * "from-page-master-region", and "merge-property-values" functions.
*/
public abstract class FnAbstractNamedProperty extends Function {
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnBodyStart.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnBodyStart.java 2022-12-27 21:16:34 UTC (rev 12961)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnBodyStart.java 2022-12-27 21:32:26 UTC (rev 12962)
@@ -39,6 +39,7 @@
/**
* The "body-start" function in XSL-FO.
+ * @see "XSL-FO Recommendation 1.1, Section 5.10.4."
*/
public class FnBodyStart extends Function {
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnCeiling.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnCeiling.java 2022-12-27 21:16:34 UTC (rev 12961)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnCeiling.java 2022-12-27 21:32:26 UTC (rev 12962)
@@ -34,6 +34,7 @@
/**
* The "ceiling" function in XSL-FO.
+ * @see "XSL-FO Recommendation 1.1, Section 5.10.1."
*/
public class FnCeiling extends Function {
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFloor.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFloor.java 2022-12-27 21:16:34 UTC (rev 12961)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFloor.java 2022-12-27 21:32:26 UTC (rev 12962)
@@ -34,6 +34,7 @@
/**
* The "floor" function in XSL-FO.
+ * @see "XSL-FO Recommendation 1.1, Section 5.10.1."
*/
public class FnFloor extends Function {
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromNearestSpecifiedValue.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromNearestSpecifiedValue.java 2022-12-27 21:16:34 UTC (rev 12961)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromNearestSpecifiedValue.java 2022-12-27 21:32:26 UTC (rev 12962)
@@ -36,6 +36,7 @@
/**
* The "from-nearest-specified-value" function in XSL-FO.
+ * @see "XSL-FO Recommendation 1.1, Section 5.10.4."
*/
public class FnFromNearestSpecifiedValue extends FnAbstractNamedProperty {
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromPageMasterRegion.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromPageMasterRegion.java 2022-12-27 21:16:34 UTC (rev 12961)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromPageMasterRegion.java 2022-12-27 21:32:26 UTC (rev 12962)
@@ -34,6 +34,7 @@
/**
* The "from-page-master-region" function in XSL-FO.
+ * @see "XSL-FO Recommendation 1.1, Section 5.10.4."
*/
public class FnFromPageMasterRegion extends FnAbstractNamedProperty {
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromParent.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromParent.java 2022-12-27 21:16:34 UTC (rev 12961)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromParent.java 2022-12-27 21:32:26 UTC (rev 12962)
@@ -36,6 +36,7 @@
/**
* The "from-parent" function in XSL-FO.
+ * @see "XSL-FO Recommendation 1.1, Section 5.10.4."
*/
public class FnFromParent extends FnAbstractNamedProperty {
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromTableColumn.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromTableColumn.java 2022-12-27 21:16:34 UTC (rev 12961)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromTableColumn.java 2022-12-27 21:32:26 UTC (rev 12962)
@@ -34,6 +34,7 @@
/**
* The "from-table-column" function in XSL-FO.
+ * @see "XSL-FO Recommendation 1.1, Section 5.10.4."
*/
public class FnFromTableColumn extends Function {
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnInheritedPropertyValue.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnInheritedPropertyValue.java 2022-12-27 21:16:34 UTC (rev 12961)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnInheritedPropertyValue.java 2022-12-27 21:32:26 UTC (rev 12962)
@@ -36,6 +36,7 @@
/**
* The "inherited-property-value" function in XSL-FO.
+ * @see "XSL-FO Recommendation 1.1, Section 5.10.4."
*/
public class FnInheritedPropertyValue extends FnAbstractNamedProperty {
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnLabelEnd.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnLabelEnd.java 2022-12-27 21:16:34 UTC (rev 12961)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnLabelEnd.java 2022-12-27 21:32:26 UTC (rev 12962)
@@ -40,6 +40,7 @@
/**
* The "label-end" function in XSL-FO.
+ * @see "XSL-FO Recommendation 1.1, Section 5.10.4."
*/
public class FnLabelEnd extends Function {
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnMax.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnMax.java 2022-12-27 21:16:34 UTC (rev 12961)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnMax.java 2022-12-27 21:32:26 UTC (rev 12962)
@@ -34,6 +34,7 @@
/**
* The "max" function in XSL-FO.
+ * @see "XSL-FO Recommendation 1.1, Section 5.10.1."
*/
public class FnMax extends Function {
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnMergePropertyValues.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnMergePropertyValues.java 2022-12-27 21:16:34 UTC (rev 12961)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnMergePropertyValues.java 2022-12-27 21:32:26 UTC (rev 12962)
@@ -34,6 +34,7 @@
/**
* The "merge-property-values" function in XSL-FO.
+ * @see "XSL-FO Recommendation 1.1, Section 5.10.4."
*/
public class FnMergePropertyValues extends FnAbstractNamedProperty {
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnMin.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnMin.java 2022-12-27 21:16:34 UTC (rev 12961)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnMin.java 2022-12-27 21:32:26 UTC (rev 12962)
@@ -34,6 +34,7 @@
/**
* The "min" function in XSL-FO.
+ * @see "XSL-FO Recommendation 1.1, Section 5.10.1."
*/
public class FnMin extends Function {
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnProportionalColumnWidth.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnProportionalColumnWidth.java 2022-12-27 21:16:34 UTC (rev 12961)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnProportionalColumnWidth.java 2022-12-27 21:32:26 UTC (rev 12962)
@@ -39,6 +39,7 @@
/**
* The "proportional-column-width" function in XSL-FO.
+ * @see "XSL-FO Recommendation 1.1, Section 5.10.4."
*/
public class FnProportionalColumnWidth extends Function {
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnRgb.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnRgb.java 2022-12-27 21:16:34 UTC (rev 12961)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnRgb.java 2022-12-27 21:32:26 UTC (rev 12962)
@@ -36,6 +36,7 @@
/**
* The "rgb" function in XSL-FO.
+ * @see "XSL-FO Recommendation 1.1, Section 5.10.2."
*/
public class FnRgb extends Function {
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnRgbIcc.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnRgbIcc.java 2022-12-27 21:16:34 UTC (rev 12961)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnRgbIcc.java 2022-12-27 21:32:26 UTC (rev 12962)
@@ -36,6 +36,7 @@
/**
* The "rgb-icc" function in XSL-FO.
+ * @see "XSL-FO Recommendation 1.1, Section 5.10.2."
*/
public class FnRgbIcc extends Function {
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnRound.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnRound.java 2022-12-27 21:16:34 UTC (rev 12961)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnRound.java 2022-12-27 21:32:26 UTC (rev 12962)
@@ -34,6 +34,7 @@
/**
* The "round" function in XSL-FO.
+ * @see "XSL-FO Recommendation 1.1, Section 5.10.1."
*/
public class FnRound extends Function {
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnSystemColor.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnSystemColor.java 2022-12-27 21:16:34 UTC (rev 12961)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnSystemColor.java 2022-12-27 21:32:26 UTC (rev 12962)
@@ -34,6 +34,7 @@
/**
* The "system-color" function in XSL-FO.
+ * @see "XSL-FO Recommendation 1.1, Section 5.10.2."
*/
public class FnSystemColor extends Function {
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnSystemFont.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnSystemFont.java 2022-12-27 21:16:34 UTC (rev 12961)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnSystemFont.java 2022-12-27 21:32:26 UTC (rev 12962)
@@ -37,6 +37,7 @@
/**
* The "system-font" function in XSL-FO.
+ * @see "XSL-FO Recommendation 1.1, Section 5.10.2."
*/
public class FnSystemFont extends Function {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-12-27 21:16:37
|
Revision: 12961
http://sourceforge.net/p/foray/code/12961
Author: victormote
Date: 2022-12-27 21:16:34 +0000 (Tue, 27 Dec 2022)
Log Message:
-----------
Consolidate identical methods in superclass.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnAbstractNamedProperty.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromNearestSpecifiedValue.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromPageMasterRegion.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromParent.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnInheritedPropertyValue.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnMergePropertyValues.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnAbstractNamedProperty.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnAbstractNamedProperty.java 2022-12-27 20:53:09 UTC (rev 12960)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnAbstractNamedProperty.java 2022-12-27 21:16:34 UTC (rev 12961)
@@ -32,6 +32,8 @@
import org.foray.fotree.PropertyId;
import org.foray.fotree.fo.FoPropertyId;
+import java.awt.Color;
+
/**
* Abstract superclass for the "inherited-property-value", "from-parent",
* "from-nearest-specified-value", "from-page-master-region", and
@@ -79,4 +81,74 @@
return this.operand1;
}
+ @Override
+ public boolean canEvalNumeric() {
+ return false;
+ }
+
+ @Override
+ public double evalNumeric() {
+ throw this.evalNumericException();
+ }
+
+ @Override
+ public boolean canEvalLength() {
+ return false;
+ }
+
+ @Override
+ public byte getUnitPower() {
+ throw this.evalNumericException();
+ }
+
+ @Override
+ public int evalLength(final int pointSize) {
+ throw this.evalLengthException();
+ }
+
+ @Override
+ public boolean canEvalColor() {
+ return false;
+ }
+
+ @Override
+ public Color evalColor() {
+ throw evalColorException();
+ }
+
+ @Override
+ public boolean lengthRequiresFontSize() {
+ return false;
+ }
+
+ @Override
+ public boolean canEvalInteger() {
+ return false;
+ }
+
+ @Override
+ public int evalInteger() {
+ throw evalIntegerException();
+ }
+
+ @Override
+ public boolean canEvalKeyword() {
+ return false;
+ }
+
+ @Override
+ public PvKeyword evalKeyword() {
+ throw this.evalKeywordException();
+ }
+
+ @Override
+ public boolean canEvalPercentage() {
+ return false;
+ }
+
+ @Override
+ public float evalPercentage() {
+ throw evalPercentageException();
+ }
+
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromNearestSpecifiedValue.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromNearestSpecifiedValue.java 2022-12-27 20:53:09 UTC (rev 12960)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromNearestSpecifiedValue.java 2022-12-27 21:16:34 UTC (rev 12961)
@@ -34,8 +34,6 @@
import org.foray.fotree.PropertyId;
import org.foray.fotree.fo.FoPropertyId;
-import java.awt.Color;
-
/**
* The "from-nearest-specified-value" function in XSL-FO.
*/
@@ -79,74 +77,4 @@
return ps.value();
}
- @Override
- public boolean canEvalNumeric() {
- return false;
- }
-
- @Override
- public double evalNumeric() {
- throw this.evalNumericException();
- }
-
- @Override
- public boolean canEvalLength() {
- return false;
- }
-
- @Override
- public byte getUnitPower() {
- throw this.evalNumericException();
- }
-
- @Override
- public int evalLength(final int pointSize) {
- throw this.evalLengthException();
- }
-
- @Override
- public boolean canEvalColor() {
- return false;
- }
-
- @Override
- public Color evalColor() {
- throw evalColorException();
- }
-
- @Override
- public boolean lengthRequiresFontSize() {
- return false;
- }
-
- @Override
- public boolean canEvalInteger() {
- return false;
- }
-
- @Override
- public int evalInteger() {
- throw evalIntegerException();
- }
-
- @Override
- public boolean canEvalKeyword() {
- return false;
- }
-
- @Override
- public PvKeyword evalKeyword() {
- throw this.evalKeywordException();
- }
-
- @Override
- public boolean canEvalPercentage() {
- return false;
- }
-
- @Override
- public float evalPercentage() {
- throw evalPercentageException();
- }
-
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromPageMasterRegion.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromPageMasterRegion.java 2022-12-27 20:53:09 UTC (rev 12960)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromPageMasterRegion.java 2022-12-27 21:16:34 UTC (rev 12961)
@@ -32,8 +32,6 @@
import org.foray.fotree.PropertyException;
import org.foray.fotree.PropertyId;
-import java.awt.Color;
-
/**
* The "from-page-master-region" function in XSL-FO.
*/
@@ -66,74 +64,4 @@
return null;
}
- @Override
- public boolean canEvalNumeric() {
- return false;
- }
-
- @Override
- public double evalNumeric() {
- throw this.evalNumericException();
- }
-
- @Override
- public boolean canEvalLength() {
- return false;
- }
-
- @Override
- public byte getUnitPower() {
- throw this.evalNumericException();
- }
-
- @Override
- public int evalLength(final int pointSize) {
- throw this.evalLengthException();
- }
-
- @Override
- public boolean canEvalColor() {
- return false;
- }
-
- @Override
- public Color evalColor() {
- throw evalColorException();
- }
-
- @Override
- public boolean lengthRequiresFontSize() {
- return false;
- }
-
- @Override
- public boolean canEvalInteger() {
- return false;
- }
-
- @Override
- public int evalInteger() {
- throw evalIntegerException();
- }
-
- @Override
- public boolean canEvalKeyword() {
- return false;
- }
-
- @Override
- public PvKeyword evalKeyword() {
- throw this.evalKeywordException();
- }
-
- @Override
- public boolean canEvalPercentage() {
- return false;
- }
-
- @Override
- public float evalPercentage() {
- throw evalPercentageException();
- }
-
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromParent.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromParent.java 2022-12-27 20:53:09 UTC (rev 12960)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromParent.java 2022-12-27 21:16:34 UTC (rev 12961)
@@ -34,8 +34,6 @@
import org.foray.fotree.PropertyId;
import org.foray.fotree.fo.FoPropertyId;
-import java.awt.Color;
-
/**
* The "from-parent" function in XSL-FO.
*/
@@ -88,74 +86,4 @@
return ps.value();
}
- @Override
- public boolean canEvalNumeric() {
- return false;
- }
-
- @Override
- public double evalNumeric() {
- throw this.evalNumericException();
- }
-
- @Override
- public boolean canEvalLength() {
- return false;
- }
-
- @Override
- public byte getUnitPower() {
- throw this.evalNumericException();
- }
-
- @Override
- public int evalLength(final int pointSize) {
- throw this.evalLengthException();
- }
-
- @Override
- public boolean canEvalColor() {
- return false;
- }
-
- @Override
- public Color evalColor() {
- throw evalColorException();
- }
-
- @Override
- public boolean lengthRequiresFontSize() {
- return false;
- }
-
- @Override
- public boolean canEvalInteger() {
- return false;
- }
-
- @Override
- public int evalInteger() {
- throw evalIntegerException();
- }
-
- @Override
- public boolean canEvalKeyword() {
- return false;
- }
-
- @Override
- public PvKeyword evalKeyword() {
- throw this.evalKeywordException();
- }
-
- @Override
- public boolean canEvalPercentage() {
- return false;
- }
-
- @Override
- public float evalPercentage() {
- throw evalPercentageException();
- }
-
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnInheritedPropertyValue.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnInheritedPropertyValue.java 2022-12-27 20:53:09 UTC (rev 12960)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnInheritedPropertyValue.java 2022-12-27 21:16:34 UTC (rev 12961)
@@ -34,8 +34,6 @@
import org.foray.fotree.PropertyId;
import org.foray.fotree.fo.FoPropertyId;
-import java.awt.Color;
-
/**
* The "inherited-property-value" function in XSL-FO.
*/
@@ -81,74 +79,4 @@
return ps.value();
}
- @Override
- public boolean canEvalNumeric() {
- return false;
- }
-
- @Override
- public double evalNumeric() {
- throw this.evalNumericException();
- }
-
- @Override
- public boolean canEvalLength() {
- return false;
- }
-
- @Override
- public byte getUnitPower() {
- throw this.evalNumericException();
- }
-
- @Override
- public int evalLength(final int pointSize) {
- throw this.evalLengthException();
- }
-
- @Override
- public boolean canEvalColor() {
- return false;
- }
-
- @Override
- public Color evalColor() {
- throw evalColorException();
- }
-
- @Override
- public boolean lengthRequiresFontSize() {
- return false;
- }
-
- @Override
- public boolean canEvalInteger() {
- return false;
- }
-
- @Override
- public int evalInteger() {
- throw evalIntegerException();
- }
-
- @Override
- public boolean canEvalKeyword() {
- return false;
- }
-
- @Override
- public PvKeyword evalKeyword() {
- throw this.evalKeywordException();
- }
-
- @Override
- public boolean canEvalPercentage() {
- return false;
- }
-
- @Override
- public float evalPercentage() {
- throw evalPercentageException();
- }
-
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnMergePropertyValues.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnMergePropertyValues.java 2022-12-27 20:53:09 UTC (rev 12960)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnMergePropertyValues.java 2022-12-27 21:16:34 UTC (rev 12961)
@@ -32,8 +32,6 @@
import org.foray.fotree.PropertyException;
import org.foray.fotree.PropertyId;
-import java.awt.Color;
-
/**
* The "merge-property-values" function in XSL-FO.
*/
@@ -66,74 +64,4 @@
return null;
}
- @Override
- public boolean canEvalNumeric() {
- return false;
- }
-
- @Override
- public double evalNumeric() {
- throw this.evalNumericException();
- }
-
- @Override
- public boolean canEvalLength() {
- return false;
- }
-
- @Override
- public byte getUnitPower() {
- throw this.evalNumericException();
- }
-
- @Override
- public int evalLength(final int pointSize) {
- throw this.evalLengthException();
- }
-
- @Override
- public boolean canEvalColor() {
- return false;
- }
-
- @Override
- public Color evalColor() {
- throw evalColorException();
- }
-
- @Override
- public boolean lengthRequiresFontSize() {
- return false;
- }
-
- @Override
- public boolean canEvalInteger() {
- return false;
- }
-
- @Override
- public int evalInteger() {
- throw evalIntegerException();
- }
-
- @Override
- public boolean canEvalKeyword() {
- return false;
- }
-
- @Override
- public PvKeyword evalKeyword() {
- throw this.evalKeywordException();
- }
-
- @Override
- public boolean canEvalPercentage() {
- return false;
- }
-
- @Override
- public float evalPercentage() {
- throw evalPercentageException();
- }
-
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-12-27 20:53:11
|
Revision: 12960
http://sourceforge.net/p/foray/code/12960
Author: victormote
Date: 2022-12-27 20:53:09 +0000 (Tue, 27 Dec 2022)
Log Message:
-----------
Add tests.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnInheritedPropertyValue.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/DominantBaselineTests.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnInheritedPropertyValue.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnInheritedPropertyValue.java 2022-12-26 22:41:04 UTC (rev 12959)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnInheritedPropertyValue.java 2022-12-27 20:53:09 UTC (rev 12960)
@@ -65,8 +65,7 @@
* @throws PropertyException If the operand cannot be found in the ancestor
* values.
*/
- public PropertyValue eval(final Property callingProperty, final FoObj fobj)
- throws PropertyException {
+ public PropertyValue eval(final Property callingProperty, final FoObj fobj) throws PropertyException {
/* TODO: Provide the right context. */
final FoObj parent = fobj.effectiveParent(null);
final FoPropertyId propertyType = this.getPropertyType();
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/DominantBaselineTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/DominantBaselineTests.java 2022-12-26 22:41:04 UTC (rev 12959)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/DominantBaselineTests.java 2022-12-27 20:53:09 UTC (rev 12960)
@@ -30,8 +30,12 @@
import org.foray.fotree.AbstractPropertyTests;
import org.foray.fotree.PropertyException;
+import org.foray.fotree.value.FnInheritedPropertyValue;
+import org.foray.fotree.value.PropertyValue;
import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
/**
@@ -176,4 +180,20 @@
assertEquals(PdDominantBaseline.INHERIT, actual);
}
+ /**
+ * Test of {@code dominant-baseline="inherited-property-value('dominant-baseline')"}.
+ * @throws PropertyException Not expected here.
+ */
+ @Test
+ @Disabled("Waiting for FnInheritedPropertyValue to be completed.")
+ public void inheritedPropertyValueParseTest() throws PropertyException {
+ final PdDominantBaseline property = createProperty("inherited-property-value(\"dominant-baseline\")");
+ final PropertyValue actualOutside = property.value();
+ assertTrue(actualOutside instanceof FnInheritedPropertyValue);
+ final FnInheritedPropertyValue ipv = (FnInheritedPropertyValue) actualOutside;
+ final PropertyValue actualInside = ipv.eval(property, makeTestFObj());
+ /* For this test, the initial value should be returned. */
+ assertEquals(PdDominantBaseline.AUTO, actualInside);
+ }
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-12-26 22:41:07
|
Revision: 12959
http://sourceforge.net/p/foray/code/12959
Author: victormote
Date: 2022-12-26 22:41:04 +0000 (Mon, 26 Dec 2022)
Log Message:
-----------
Add some tests for dominant-baseline.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/AbstractPropertyTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/DominantBaselineTests.java
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/AbstractPropertyTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/AbstractPropertyTests.java 2022-12-26 22:10:19 UTC (rev 12958)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/AbstractPropertyTests.java 2022-12-26 22:41:04 UTC (rev 12959)
@@ -277,8 +277,7 @@
* @param attributeValue The attribute value used to create the property.
* @throws PropertyException If {@code property} is null.
*/
- public void checkNullProperty(final Property property, final String attributeValue)
- throws PropertyException {
+ public void checkNullProperty(final Property property, final String attributeValue) throws PropertyException {
if (property == null) {
final String message = "Could not create property for value: \"" + attributeValue + "\".";
throw new PropertyException(message);
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/DominantBaselineTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/DominantBaselineTests.java 2022-12-26 22:10:19 UTC (rev 12958)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/DominantBaselineTests.java 2022-12-26 22:41:04 UTC (rev 12959)
@@ -31,6 +31,9 @@
import org.foray.fotree.AbstractPropertyTests;
import org.foray.fotree.PropertyException;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import org.junit.jupiter.api.Test;
+
/**
* JUnit test class for the class {@link PdDominantBaseline}.
*/
@@ -37,11 +40,140 @@
public class DominantBaselineTests extends AbstractPropertyTests {
@Override
- protected PdDominantBaseline createProperty(final String attributeValue)
- throws PropertyException {
+ protected PdDominantBaseline createProperty(final String attributeValue) throws PropertyException {
final PdDominantBaseline property = PdDominantBaseline.getInstance(attributeValue);
checkNullProperty(property, attributeValue);
return property;
}
+ /**
+ * Test of {@code dominant-baseline="auto"}.
+ * @throws PropertyException Not expected here.
+ */
+ @Test
+ public void autoParseTest() throws PropertyException {
+ final PdDominantBaseline actual = createProperty("auto");
+ assertEquals(PdDominantBaseline.AUTO, actual);
+ }
+
+ /**
+ * Test of {@code dominant-baseline="use-script"}.
+ * @throws PropertyException Not expected here.
+ */
+ @Test
+ public void useScriptParseTest() throws PropertyException {
+ final PdDominantBaseline actual = createProperty("use-script");
+ assertEquals(PdDominantBaseline.USE_SCRIPT, actual);
+ }
+
+ /**
+ * Test of {@code dominant-baseline="no-change"}.
+ * @throws PropertyException Not expected here.
+ */
+ @Test
+ public void noChangeParseTest() throws PropertyException {
+ final PdDominantBaseline actual = createProperty("no-change");
+ assertEquals(PdDominantBaseline.NO_CHANGE, actual);
+ }
+
+ /**
+ * Test of {@code dominant-baseline="reset-size"}.
+ * @throws PropertyException Not expected here.
+ */
+ @Test
+ public void resetSizeParseTest() throws PropertyException {
+ final PdDominantBaseline actual = createProperty("reset-size");
+ assertEquals(PdDominantBaseline.RESET_SIZE, actual);
+ }
+
+ /**
+ * Test of {@code dominant-baseline="ideographic"}.
+ * @throws PropertyException Not expected here.
+ */
+ @Test
+ public void ideographicParseTest() throws PropertyException {
+ final PdDominantBaseline actual = createProperty("ideographic");
+ assertEquals(PdDominantBaseline.IDEOGRAPHIC, actual);
+ }
+
+ /**
+ * Test of {@code dominant-baseline="alphabetic"}.
+ * @throws PropertyException Not expected here.
+ */
+ @Test
+ public void alphabeticParseTest() throws PropertyException {
+ final PdDominantBaseline actual = createProperty("alphabetic");
+ assertEquals(PdDominantBaseline.ALPHABETIC, actual);
+ }
+
+ /**
+ * Test of {@code dominant-baseline="hanging"}.
+ * @throws PropertyException Not expected here.
+ */
+ @Test
+ public void hangingParseTest() throws PropertyException {
+ final PdDominantBaseline actual = createProperty("hanging");
+ assertEquals(PdDominantBaseline.HANGING, actual);
+ }
+
+ /**
+ * Test of {@code dominant-baseline="mathematical"}.
+ * @throws PropertyException Not expected here.
+ */
+ @Test
+ public void mathematicalParseTest() throws PropertyException {
+ final PdDominantBaseline actual = createProperty("mathematical");
+ assertEquals(PdDominantBaseline.MATHEMATICAL, actual);
+ }
+
+ /**
+ * Test of {@code dominant-baseline="central"}.
+ * @throws PropertyException Not expected here.
+ */
+ @Test
+ public void centralParseTest() throws PropertyException {
+ final PdDominantBaseline actual = createProperty("central");
+ assertEquals(PdDominantBaseline.CENTRAL, actual);
+ }
+
+ /**
+ * Test of {@code dominant-baseline="middle"}.
+ * @throws PropertyException Not expected here.
+ */
+ @Test
+ public void middleParseTest() throws PropertyException {
+ final PdDominantBaseline actual = createProperty("middle");
+ assertEquals(PdDominantBaseline.MIDDLE, actual);
+ }
+
+ /**
+ * Test of {@code dominant-baseline="text-after-edge"}.
+ * @throws PropertyException Not expected here.
+ */
+ @Test
+ public void textAfterEdgeParseTest() throws PropertyException {
+ final PdDominantBaseline actual = createProperty("text-after-edge");
+ assertEquals(PdDominantBaseline.TEXT_AFTER_EDGE, actual);
+ }
+
+ /**
+ * Test of {@code dominant-baseline="text-before-edge"}.
+ * @throws PropertyException Not expected here.
+ */
+ @Test
+ public void textBeforeEdgeParseTest() throws PropertyException {
+ final PdDominantBaseline actual = createProperty("text-before-edge");
+ assertEquals(PdDominantBaseline.TEXT_BEFORE_EDGE, actual);
+ }
+
+ /**
+ * Test of {@code dominant-baseline="inherit"}.
+ * @throws PropertyException Not expected here.
+ */
+ @Test
+ public void inheritParseTest() throws PropertyException {
+ final PdDominantBaseline actual = createProperty("inherit");
+ assertEquals(PdDominantBaseline.INHERIT, actual);
+ }
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-12-26 22:10:25
|
Revision: 12958
http://sourceforge.net/p/foray/code/12958
Author: victormote
Date: 2022-12-26 22:10:19 +0000 (Mon, 26 Dec 2022)
Log Message:
-----------
Simplify creation of test properties.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/AbstractPropertyTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbsoluteDimensionTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbsoluteOffsetTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbsolutePositionTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractBackgroundPositionTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractBorderWidthTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractMarginTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractPaddingTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ActiveStateTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AlignmentAdjustTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AlignmentBaselineTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AllowedHeightScaleTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AllowedWidthScaleTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AutoRestoreTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AzimuthTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundAttachmentTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundColorTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundImageTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundPositionHorizontalTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundPositionTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundPositionVerticalTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundRepeatTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BaselineShiftTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BlankOrNotBlankTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BlockProgressionDimensionTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderAfterColorTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderAfterPrecedenceTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderAfterStyleTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderAfterWidthTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderBeforeColorTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderBeforePrecedenceTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderBeforeStyleTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderBeforeWidthTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderBottomColorTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderBottomStyleTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderBottomTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderBottomWidthTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderCollapseTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderColorTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderEndColorTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderEndPrecedenceTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderEndStyleTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderEndWidthTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderLeftColorTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderLeftStyleTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderLeftTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderLeftWidthTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderRightColorTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderRightStyleTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderRightTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderRightWidthTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderSeparationTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderSpacingTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderStartColorTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderStartPrecedenceTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderStartStyleTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderStartWidthTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderStyleTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderTopColorTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderTopStyleTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderTopTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderTopWidthTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderWidthTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BottomTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BreakAfterTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BreakBeforeTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/CaptionSideTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/CaseNameTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/CaseTitleTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ChangeBarClassTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ChangeBarColorTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ChangeBarOffsetTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ChangeBarPlacementTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ChangeBarStyleTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ChangeBarWidthTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/CharacterTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ClearTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ClipTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ColorProfileNameTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ColorTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ColumnCountTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ColumnGapTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ColumnNumberTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ColumnWidthTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ContentDimensionTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ContentHeightTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ContentTypeTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ContentWidthTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/CountryTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/CueAfterTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/CueBeforeTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/CueTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/DestinationPlacementOffsetTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/DirectionTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/DisplayAlignTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/DominantBaselineTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ElevationTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/EmptyCellsTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/EndIndentTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/EndsRowTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ExtentTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ExternalDestinationTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/FloatTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/FlowMapNameTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/FlowMapReferenceTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/FlowNameReferenceTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/FlowNameTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/FontFamilyTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/FontSelectionStrategyTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/FontSizeAdjustTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/FontSizeTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/FontStretchTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/FontStyleTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/FontTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/FontVariantTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/FontWeightTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ForcePageCountTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/FormatTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/GlyphOrientationHorizontalTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/GlyphOrientationVerticalTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/GroupingSeparatorTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/GroupingSizeTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/HeightTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/HyphenateTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/HyphenationCharacterTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/HyphenationKeepTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/HyphenationLadderCountTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/HyphenationPushCharacterCountTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/HyphenationRemainCharacterCountTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/IdTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/IndentTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/IndexClassTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/IndexKeyTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/IndicateDestinationTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/InitialPageNumberTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/InlineProgressionDimensionTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/InternalDestinationTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/IntrinsicScaleValueTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/IntrusionDisplaceTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/KeepTogetherTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/KeepWithNextTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/KeepWithPreviousTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/LanguageTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/LastLineEndIndentTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/LeaderAlignmentTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/LeaderLengthTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/LeaderPatternTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/LeaderPatternWidthTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/LeftTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/LetterSpacingTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/LetterValueTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/LineHeightShiftAdjustmentTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/LineHeightTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/LineStackingStrategyTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/LinefeedTreatmentTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/MarginBottomTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/MarginLeftTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/MarginRightTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/MarginTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/MarginTopTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/MarkerClassNameTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/MasterNameTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/MasterReferenceTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/MaxHeightTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/MaxWidthTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/MaximumRepeatsTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/MediaUsageTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/MergePagesAcrossIndexKeyReferencesTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/MergeRangesAcrossIndexKeyReferencesTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/MergeSequentialPageNumbersTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/MinHeightTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/MinWidthTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/NumberColumnsRepeatedTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/NumberColumnsSpannedTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/NumberRowsSpannedTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/OddOrEvenTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/OrphansTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/OverflowTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PaddingAfterTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PaddingBeforeTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PaddingBottomTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PaddingEndTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PaddingLeftTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PaddingRightTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PaddingStartTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PaddingTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PaddingTopTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PageBreakAfterTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PageBreakBeforeTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PageBreakInsideTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PageCitationStrategyTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PageDimensionTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PageHeightTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PageNumberTreatmentTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PagePositionTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PageWidthTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PauseAfterTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PauseBeforeTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PauseTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PitchRangeTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PitchTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PlayDuringTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PositionTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/PrecedenceTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ProvisionalDistanceBetweenStartsTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ProvisionalLabelSeparationTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/RefIdTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/RefIndexKeyTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ReferenceOrientationTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/RegionNameReferenceTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/RegionNameTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/RelativeAlignTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/RelativeDimensionTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/RelativePositionTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/RelativeSpaceTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/RenderingIntentTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/RetrieveBoundaryTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/RetrieveBoundaryWithinTableTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/RetrieveClassNameTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/RetrievePositionTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/RetrievePositionWithinTableTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/RichnessTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/RightTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/RoleTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/RuleStyleTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/RuleThicknessTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ScaleOptionTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ScalingMethodTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ScalingTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ScoreSpacesTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ScriptTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ShowDestinationTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/SizeTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/SourceDocumentTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/SpaceAfterTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/SpaceBeforeTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/SpaceEndTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/SpaceStartTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/SpanTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/SpeakHeaderTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/SpeakNumeralTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/SpeakPunctuationTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/SpeakTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/SpeechRateTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/SrcTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/StartIndentTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/StartingStateTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/StartsRowTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/StressTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/StringTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/SuppressAtLineBreakTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/SwitchToTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TableLayoutTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TableOmitFooterAtBreakTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TableOmitHeaderAtBreakTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TargetPresentationContextTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TargetProcessingContextTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TargetStylesheetTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TextAlignLastTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TextAlignTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TextAltitudeTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TextDecorationTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TextDepthTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TextIndentTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TextShadowTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TextTransformTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TopTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/TreatAsWordSpaceTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/UnicodeBidiTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/VerticalAlignTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/VisibilityTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/VoiceFamilyTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/VolumeTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/WhiteSpaceCollapseTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/WhiteSpaceTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/WhiteSpaceTreatmentTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/WidowsTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/WidthTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/WordSpacingTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/WrapOptionTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/WritingModeTests.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ZindexTests.java
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/AbstractPropertyTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/AbstractPropertyTests.java 2022-12-26 17:43:53 UTC (rev 12957)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/AbstractPropertyTests.java 2022-12-26 22:10:19 UTC (rev 12958)
@@ -202,12 +202,11 @@
/**
* Parses an attribute value and returns the property value created.
- * @param fobj The FoObj instance to which the property will be attached.
* @param attributeValue The attribute value to be parsed.
* @return The newly-created Property.
* @throws PropertyException For errors during parsing.
*/
- protected abstract Property createProperty(FoObj fobj, String attributeValue) throws PropertyException;
+ protected abstract Property createProperty(String attributeValue) throws PropertyException;
/**
* Setup for {@link #testNullInput()}.
@@ -214,8 +213,7 @@
* @throws PropertyException If the value "" is not a valid value for the tested property.
*/
protected void testNullInputSetup() throws PropertyException {
- final FoObj testFobj = makeTestFObj();
- createProperty(testFobj, "");
+ createProperty("");
}
/**
@@ -238,8 +236,7 @@
* @throws PropertyException If the value "bhxbt" is not a valid value for the tested property.
*/
protected void testName001Setup() throws PropertyException {
- final FoObj testFobj = makeTestFObj();
- createProperty(testFobj, "bhxbt");
+ createProperty("bhxbt");
}
/**
@@ -266,9 +263,8 @@
*/
@Test
public void testString001() throws PropertyException {
- final FoObj testFobj = makeTestFObj();
try {
- createProperty(testFobj, "abc xyz");
+ createProperty("abc xyz");
fail("Expected PropertyException for invalid keyword.");
} catch (final PropertyException e) {
/* Do nothing. This is the expected case. */
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbsoluteDimensionTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbsoluteDimensionTests.java 2022-12-26 17:43:53 UTC (rev 12957)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbsoluteDimensionTests.java 2022-12-26 22:10:19 UTC (rev 12958)
@@ -42,7 +42,7 @@
implements CmpLengthTests {
@Override
- protected abstract AbstractAbsoluteDimension createProperty(FoObj fobj, String attributeValue)
+ protected abstract AbstractAbsoluteDimension createProperty(String attributeValue)
throws PropertyException;
/**
@@ -61,8 +61,7 @@
@Test
public void testLength001() throws PropertyException {
final FoObj testFobj = makeTestFObj();
- final AbstractAbsoluteDimension property = createProperty(testFobj,
- "10pt * 1.15");
+ final AbstractAbsoluteDimension property = createProperty("10pt * 1.15");
final int testLength = getPropertyValue(property, testFobj);
assertEquals(11500, testLength);
}
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbsoluteOffsetTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbsoluteOffsetTests.java 2022-12-26 17:43:53 UTC (rev 12957)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbsoluteOffsetTests.java 2022-12-26 22:10:19 UTC (rev 12958)
@@ -42,7 +42,7 @@
implements CmpLengthTests {
@Override
- protected abstract AbstractAbsoluteOffset createProperty(FoObj fobj, String attributeValue)
+ protected abstract AbstractAbsoluteOffset createProperty(String attributeValue)
throws PropertyException;
/**
@@ -61,8 +61,7 @@
@Test
public void testLength001() throws PropertyException {
final FoObj testFobj = makeTestFObj();
- final AbstractAbsoluteOffset property = createProperty(testFobj,
- "10pt * 1.15");
+ final AbstractAbsoluteOffset property = createProperty("10pt * 1.15");
final int testLength = getPropertyValue(property, testFobj);
assertEquals(11500, testLength);
}
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbsolutePositionTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbsolutePositionTests.java 2022-12-26 17:43:53 UTC (rev 12957)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbsolutePositionTests.java 2022-12-26 22:10:19 UTC (rev 12958)
@@ -29,7 +29,6 @@
package org.foray.fotree.fo.prop;
import org.foray.fotree.AbstractPropertyTests;
-import org.foray.fotree.FoObj;
import org.foray.fotree.PropertyException;
/**
@@ -38,8 +37,7 @@
public class AbsolutePositionTests extends AbstractPropertyTests {
@Override
- protected PdAbsolutePosition createProperty(final FoObj fobj,
- final String attributeValue) throws PropertyException {
+ protected PdAbsolutePosition createProperty(final String attributeValue) throws PropertyException {
final PdAbsolutePosition property = new PdAbsolutePosition(attributeValue);
return property;
}
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractBackgroundPositionTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractBackgroundPositionTests.java 2022-12-26 17:43:53 UTC (rev 12957)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractBackgroundPositionTests.java 2022-12-26 22:10:19 UTC (rev 12958)
@@ -42,7 +42,7 @@
extends AbstractPropertyTests implements CmpLengthTests {
@Override
- protected abstract AbstractBackgroundPosition createProperty(FoObj fobj, String attributeValue)
+ protected abstract AbstractBackgroundPosition createProperty(String attributeValue)
throws PropertyException;
/**
@@ -62,8 +62,7 @@
@Test
public void testLength001() throws PropertyException {
final FoObj testFobj = makeTestFObj();
- final AbstractBackgroundPosition property = createProperty(testFobj,
- "10pt * 1.15");
+ final AbstractBackgroundPosition property = createProperty("10pt * 1.15");
final int testLength = getPropertyValue(property, testFobj);
assertEquals(11500, testLength);
}
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractBorderWidthTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractBorderWidthTests.java 2022-12-26 17:43:53 UTC (rev 12957)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractBorderWidthTests.java 2022-12-26 22:10:19 UTC (rev 12958)
@@ -47,7 +47,7 @@
implements CmpLengthTests {
@Override
- protected abstract AbstractBorderWidth createProperty(FoObj fobj, String attributeValue) throws PropertyException;
+ protected abstract AbstractBorderWidth createProperty(String attributeValue) throws PropertyException;
/**
* Retrieves the property value from the property.
@@ -66,9 +66,8 @@
*/
@Test
public void testAuto() {
- final FoObj testFobj = makeTestFObj();
try {
- createProperty(testFobj, "auto");
+ createProperty("auto");
fail("Expected PropertyException for invalid keyword.");
} catch (final PropertyException e) {
/* Do nothing. This is the expected case. */
@@ -81,7 +80,7 @@
*/
@Test
public void testThin() throws PropertyException {
- final AbstractBorderWidth property = createProperty(null, "thin");
+ final AbstractBorderWidth property = createProperty("thin");
final PropertyValue value = property.value();
assertTrue(value instanceof FoPropertyKeyword);
final FoPropertyKeyword keyword = (FoPropertyKeyword) value;
@@ -94,7 +93,7 @@
*/
@Test
public void testThick() throws PropertyException {
- final AbstractBorderWidth property = createProperty(null, "thick");
+ final AbstractBorderWidth property = createProperty("thick");
final PropertyValue value = property.value();
assertTrue(value instanceof FoPropertyKeyword);
final FoPropertyKeyword keyword = (FoPropertyKeyword) value;
@@ -107,7 +106,7 @@
*/
@Test
public void testMedium() throws PropertyException {
- final AbstractBorderWidth property = createProperty(null, "medium");
+ final AbstractBorderWidth property = createProperty("medium");
final PropertyValue value = property.value();
assertTrue(value instanceof FoPropertyKeyword);
final FoPropertyKeyword keyword = (FoPropertyKeyword) value;
@@ -120,7 +119,7 @@
*/
@Test
public void testInherit() throws PropertyException {
- final AbstractBorderWidth property = createProperty(null, "inherit");
+ final AbstractBorderWidth property = createProperty("inherit");
final PropertyValue value = property.value();
assertTrue(value instanceof FoPropertyKeyword);
final FoPropertyKeyword keyword = (FoPropertyKeyword) value;
@@ -131,8 +130,7 @@
@Test
public void testLength001() throws PropertyException {
final FoObj testFobj = makeTestFObj();
- final AbstractBorderWidth property = createProperty(testFobj,
- "10pt * 1.15");
+ final AbstractBorderWidth property = createProperty("10pt * 1.15");
final int testLength = getPropertyValue(property, testFobj);
assertEquals(11500, testLength);
}
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractMarginTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractMarginTests.java 2022-12-26 17:43:53 UTC (rev 12957)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractMarginTests.java 2022-12-26 22:10:19 UTC (rev 12958)
@@ -42,7 +42,7 @@
implements CmpLengthTests {
@Override
- protected abstract AbstractMargin createProperty(FoObj fobj, String attributeValue) throws PropertyException;
+ protected abstract AbstractMargin createProperty(String attributeValue) throws PropertyException;
/**
* Retrieves the property value from the property.
@@ -60,8 +60,7 @@
@Test
public void testLength001() throws PropertyException {
final FoObj testFobj = makeTestFObj();
- final AbstractMargin property = createProperty(testFobj,
- "10pt * 1.15");
+ final AbstractMargin property = createProperty("10pt * 1.15");
final int testLength = getPropertyValue(property, testFobj);
assertEquals(11500, testLength);
}
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractPaddingTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractPaddingTests.java 2022-12-26 17:43:53 UTC (rev 12957)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AbstractPaddingTests.java 2022-12-26 22:10:19 UTC (rev 12958)
@@ -42,7 +42,7 @@
implements CmpLengthTests {
@Override
- protected abstract AbstractPadding createProperty(FoObj fobj, String attributeValue) throws PropertyException;
+ protected abstract AbstractPadding createProperty(String attributeValue) throws PropertyException;
/**
* Retrieves the property value from the property.
@@ -60,8 +60,7 @@
@Test
public void testLength001() throws PropertyException {
final FoObj testFobj = makeTestFObj();
- final AbstractPadding property = createProperty(testFobj,
- "10pt * 1.15");
+ final AbstractPadding property = createProperty("10pt * 1.15");
final int testLength = getPropertyValue(property, testFobj);
assertEquals(11500, testLength);
}
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ActiveStateTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ActiveStateTests.java 2022-12-26 17:43:53 UTC (rev 12957)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/ActiveStateTests.java 2022-12-26 22:10:19 UTC (rev 12958)
@@ -29,7 +29,6 @@
package org.foray.fotree.fo.prop;
import org.foray.fotree.AbstractPropertyTests;
-import org.foray.fotree.FoObj;
import org.foray.fotree.PropertyException;
/**
@@ -38,7 +37,7 @@
public class ActiveStateTests extends AbstractPropertyTests {
@Override
- protected PdActiveState createProperty(final FoObj fobj, final String attributeValue) throws PropertyException {
+ protected PdActiveState createProperty(final String attributeValue) throws PropertyException {
final PdActiveState property = new PdActiveState(attributeValue);
return property;
}
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AlignmentAdjustTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AlignmentAdjustTests.java 2022-12-26 17:43:53 UTC (rev 12957)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AlignmentAdjustTests.java 2022-12-26 22:10:19 UTC (rev 12958)
@@ -41,7 +41,7 @@
public class AlignmentAdjustTests extends AbstractPropertyTests implements CmpLengthTests {
@Override
- protected PdAlignmentAdjust createProperty(final FoObj fobj, final String attributeValue) throws PropertyException {
+ protected PdAlignmentAdjust createProperty(final String attributeValue) throws PropertyException {
final PdAlignmentAdjust property = new PdAlignmentAdjust(attributeValue);
return property;
}
@@ -61,7 +61,7 @@
@Test
public void testLength001() throws PropertyException {
final FoObj testFobj = makeTestFObj();
- final PdAlignmentAdjust property = createProperty(testFobj, "10pt * 1.15");
+ final PdAlignmentAdjust property = createProperty("10pt * 1.15");
final int testLength = getPropertyValue(property, testFobj);
assertEquals(11500, testLength);
}
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AlignmentBaselineTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AlignmentBaselineTests.java 2022-12-26 17:43:53 UTC (rev 12957)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AlignmentBaselineTests.java 2022-12-26 22:10:19 UTC (rev 12958)
@@ -29,7 +29,6 @@
package org.foray.fotree.fo.prop;
import org.foray.fotree.AbstractPropertyTests;
-import org.foray.fotree.FoObj;
import org.foray.fotree.PropertyException;
/**
@@ -38,8 +37,7 @@
public class AlignmentBaselineTests extends AbstractPropertyTests {
@Override
- protected PdAlignmentBaseline createProperty(final FoObj fobj,
- final String attributeValue) throws PropertyException {
+ protected PdAlignmentBaseline createProperty(final String attributeValue) throws PropertyException {
final PdAlignmentBaseline property = new PdAlignmentBaseline(attributeValue);
return property;
}
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AllowedHeightScaleTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AllowedHeightScaleTests.java 2022-12-26 17:43:53 UTC (rev 12957)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AllowedHeightScaleTests.java 2022-12-26 22:10:19 UTC (rev 12958)
@@ -29,7 +29,6 @@
package org.foray.fotree.fo.prop;
import org.foray.fotree.AbstractPropertyTests;
-import org.foray.fotree.FoObj;
import org.foray.fotree.PropertyException;
/**
@@ -38,7 +37,7 @@
public class AllowedHeightScaleTests extends AbstractPropertyTests {
@Override
- protected PdAllowedHeightScale createProperty(final FoObj fobj, final String attributeValue)
+ protected PdAllowedHeightScale createProperty(final String attributeValue)
throws PropertyException {
final PdAllowedHeightScale property = new PdAllowedHeightScale(attributeValue);
return property;
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AllowedWidthScaleTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AllowedWidthScaleTests.java 2022-12-26 17:43:53 UTC (rev 12957)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AllowedWidthScaleTests.java 2022-12-26 22:10:19 UTC (rev 12958)
@@ -29,7 +29,6 @@
package org.foray.fotree.fo.prop;
import org.foray.fotree.AbstractPropertyTests;
-import org.foray.fotree.FoObj;
import org.foray.fotree.PropertyException;
/**
@@ -38,7 +37,7 @@
public class AllowedWidthScaleTests extends AbstractPropertyTests {
@Override
- protected PdAllowedWidthScale createProperty(final FoObj fobj, final String attributeValue)
+ protected PdAllowedWidthScale createProperty(final String attributeValue)
throws PropertyException {
final PdAllowedWidthScale property = new PdAllowedWidthScale(attributeValue);
return property;
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AutoRestoreTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AutoRestoreTests.java 2022-12-26 17:43:53 UTC (rev 12957)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AutoRestoreTests.java 2022-12-26 22:10:19 UTC (rev 12958)
@@ -29,7 +29,6 @@
package org.foray.fotree.fo.prop;
import org.foray.fotree.AbstractPropertyTests;
-import org.foray.fotree.FoObj;
import org.foray.fotree.PropertyException;
/**
@@ -38,8 +37,7 @@
public class AutoRestoreTests extends AbstractPropertyTests {
@Override
- protected PdAutoRestore createProperty(final FoObj fobj,
- final String attributeValue) throws PropertyException {
+ protected PdAutoRestore createProperty(final String attributeValue) throws PropertyException {
final PdAutoRestore property = new PdAutoRestore(attributeValue);
return property;
}
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AzimuthTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AzimuthTests.java 2022-12-26 17:43:53 UTC (rev 12957)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/AzimuthTests.java 2022-12-26 22:10:19 UTC (rev 12958)
@@ -29,7 +29,6 @@
package org.foray.fotree.fo.prop;
import org.foray.fotree.AbstractPropertyTests;
-import org.foray.fotree.FoObj;
import org.foray.fotree.PropertyException;
/**
@@ -38,8 +37,7 @@
public class AzimuthTests extends AbstractPropertyTests {
@Override
- protected PdAzimuth createProperty(final FoObj fobj,
- final String attributeValue) throws PropertyException {
+ protected PdAzimuth createProperty(final String attributeValue) throws PropertyException {
final PdAzimuth property = new PdAzimuth(attributeValue);
return property;
}
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundAttachmentTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundAttachmentTests.java 2022-12-26 17:43:53 UTC (rev 12957)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundAttachmentTests.java 2022-12-26 22:10:19 UTC (rev 12958)
@@ -29,7 +29,6 @@
package org.foray.fotree.fo.prop;
import org.foray.fotree.AbstractPropertyTests;
-import org.foray.fotree.FoObj;
import org.foray.fotree.PropertyException;
/**
@@ -38,8 +37,7 @@
public class BackgroundAttachmentTests extends AbstractPropertyTests {
@Override
- protected PdBackgroundAttachment createProperty(final FoObj fobj,
- final String attributeValue) throws PropertyException {
+ protected PdBackgroundAttachment createProperty(final String attributeValue) throws PropertyException {
final PdBackgroundAttachment property = new PdBackgroundAttachment(attributeValue);
return property;
}
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundColorTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundColorTests.java 2022-12-26 17:43:53 UTC (rev 12957)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundColorTests.java 2022-12-26 22:10:19 UTC (rev 12958)
@@ -29,7 +29,6 @@
package org.foray.fotree.fo.prop;
import org.foray.fotree.AbstractPropertyTests;
-import org.foray.fotree.FoObj;
import org.foray.fotree.PropertyException;
/**
@@ -38,8 +37,7 @@
public class BackgroundColorTests extends AbstractPropertyTests {
@Override
- protected PdBackgroundColor createProperty(final FoObj fobj,
- final String attributeValue) throws PropertyException {
+ protected PdBackgroundColor createProperty(final String attributeValue) throws PropertyException {
final PdBackgroundColor property = new PdBackgroundColor(attributeValue);
return property;
}
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundImageTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundImageTests.java 2022-12-26 17:43:53 UTC (rev 12957)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundImageTests.java 2022-12-26 22:10:19 UTC (rev 12958)
@@ -29,7 +29,6 @@
package org.foray.fotree.fo.prop;
import org.foray.fotree.AbstractPropertyTests;
-import org.foray.fotree.FoObj;
import org.foray.fotree.PropertyException;
/**
@@ -38,8 +37,7 @@
public class BackgroundImageTests extends AbstractPropertyTests {
@Override
- protected PdBackgroundImage createProperty(final FoObj fobj,
- final String attributeValue) throws PropertyException {
+ protected PdBackgroundImage createProperty(final String attributeValue) throws PropertyException {
final PdBackgroundImage property = new PdBackgroundImage(attributeValue);
return property;
}
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundPositionHorizontalTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundPositionHorizontalTests.java 2022-12-26 17:43:53 UTC (rev 12957)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundPositionHorizontalTests.java 2022-12-26 22:10:19 UTC (rev 12958)
@@ -28,7 +28,6 @@
package org.foray.fotree.fo.prop;
-import org.foray.fotree.FoObj;
import org.foray.fotree.PropertyException;
/**
@@ -38,8 +37,7 @@
extends AbstractBackgroundPositionTests {
@Override
- protected PdBackgroundPositionHorizontal createProperty(final FoObj fobj,
- final String attributeValue) throws PropertyException {
+ protected PdBackgroundPositionHorizontal createProperty(final String attributeValue) throws PropertyException {
final PdBackgroundPositionHorizontal property =
new PdBackgroundPositionHorizontal(attributeValue);
return property;
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundPositionTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundPositionTests.java 2022-12-26 17:43:53 UTC (rev 12957)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundPositionTests.java 2022-12-26 22:10:19 UTC (rev 12958)
@@ -29,7 +29,6 @@
package org.foray.fotree.fo.prop;
import org.foray.fotree.AbstractPropertyTests;
-import org.foray.fotree.FoObj;
import org.foray.fotree.PropertyException;
/**
@@ -38,8 +37,7 @@
public class BackgroundPositionTests extends AbstractPropertyTests {
@Override
- protected PdBackgroundPosition createProperty(final FoObj fobj,
- final String attributeValue) throws PropertyException {
+ protected PdBackgroundPosition createProperty(final String attributeValue) throws PropertyException {
final PdBackgroundPosition property = new PdBackgroundPosition(attributeValue);
return property;
}
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundPositionVerticalTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundPositionVerticalTests.java 2022-12-26 17:43:53 UTC (rev 12957)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundPositionVerticalTests.java 2022-12-26 22:10:19 UTC (rev 12958)
@@ -28,7 +28,6 @@
package org.foray.fotree.fo.prop;
-import org.foray.fotree.FoObj;
import org.foray.fotree.PropertyException;
/**
@@ -38,8 +37,7 @@
extends AbstractBackgroundPositionTests {
@Override
- protected PdBackgroundPositionVertical createProperty(final FoObj fobj,
- final String attributeValue) throws PropertyException {
+ protected PdBackgroundPositionVertical createProperty(final String attributeValue) throws PropertyException {
final PdBackgroundPositionVertical property =
new PdBackgroundPositionVertical(attributeValue);
return property;
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundRepeatTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundRepeatTests.java 2022-12-26 17:43:53 UTC (rev 12957)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundRepeatTests.java 2022-12-26 22:10:19 UTC (rev 12958)
@@ -29,7 +29,6 @@
package org.foray.fotree.fo.prop;
import org.foray.fotree.AbstractPropertyTests;
-import org.foray.fotree.FoObj;
import org.foray.fotree.PropertyException;
/**
@@ -38,8 +37,7 @@
public class BackgroundRepeatTests extends AbstractPropertyTests {
@Override
- protected PdBackgroundRepeat createProperty(final FoObj fobj,
- final String attributeValue) throws PropertyException {
+ protected PdBackgroundRepeat createProperty(final String attributeValue) throws PropertyException {
final PdBackgroundRepeat property = new PdBackgroundRepeat(attributeValue);
return property;
}
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundTests.java 2022-12-26 17:43:53 UTC (rev 12957)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BackgroundTests.java 2022-12-26 22:10:19 UTC (rev 12958)
@@ -29,7 +29,6 @@
package org.foray.fotree.fo.prop;
import org.foray.fotree.AbstractPropertyTests;
-import org.foray.fotree.FoObj;
import org.foray.fotree.PropertyException;
/**
@@ -38,8 +37,7 @@
public class BackgroundTests extends AbstractPropertyTests {
@Override
- protected PdBackground createProperty(final FoObj fobj,
- final String attributeValue) throws PropertyException {
+ protected PdBackground createProperty(final String attributeValue) throws PropertyException {
final PdBackground property = new PdBackground("", attributeValue);
return property;
}
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BaselineShiftTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BaselineShiftTests.java 2022-12-26 17:43:53 UTC (rev 12957)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BaselineShiftTests.java 2022-12-26 22:10:19 UTC (rev 12958)
@@ -42,8 +42,7 @@
implements CmpLengthTests {
@Override
- protected PdBaselineShift createProperty(final FoObj fobj,
- final String attributeValue) throws PropertyException {
+ protected PdBaselineShift createProperty(final String attributeValue) throws PropertyException {
final PdBaselineShift property = new PdBaselineShift(attributeValue);
return property;
}
@@ -64,8 +63,7 @@
@Test
public void testLength001() throws PropertyException {
final FoObj testFobj = makeTestFObj();
- final PdBaselineShift property = createProperty(testFobj,
- "10pt * 1.15");
+ final PdBaselineShift property = createProperty("10pt * 1.15");
final int testLength = getPropertyValue(property, testFobj);
assertEquals(11500, testLength);
}
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BlankOrNotBlankTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BlankOrNotBlankTests.java 2022-12-26 17:43:53 UTC (rev 12957)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BlankOrNotBlankTests.java 2022-12-26 22:10:19 UTC (rev 12958)
@@ -29,7 +29,6 @@
package org.foray.fotree.fo.prop;
import org.foray.fotree.AbstractPropertyTests;
-import org.foray.fotree.FoObj;
import org.foray.fotree.PropertyException;
/**
@@ -38,8 +37,7 @@
public class BlankOrNotBlankTests extends AbstractPropertyTests {
@Override
- protected PdBlankOrNotBlank createProperty(final FoObj fobj,
- final String attributeValue) throws PropertyException {
+ protected PdBlankOrNotBlank createProperty(final String attributeValue) throws PropertyException {
final PdBlankOrNotBlank property = new PdBlankOrNotBlank(attributeValue);
return property;
}
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BlockProgressionDimensionTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BlockProgressionDimensionTests.java 2022-12-26 17:43:53 UTC (rev 12957)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BlockProgressionDimensionTests.java 2022-12-26 22:10:19 UTC (rev 12958)
@@ -28,7 +28,6 @@
package org.foray.fotree.fo.prop;
-import org.foray.fotree.FoObj;
import org.foray.fotree.PropertyException;
/**
@@ -38,8 +37,7 @@
extends RelativeDimensionTests {
@Override
- protected PdBlockProgressionDimension createProperty(final FoObj fobj,
- final String attributeValue) throws PropertyException {
+ protected PdBlockProgressionDimension createProperty(final String attributeValue) throws PropertyException {
final PdBlockProgressionDimension property =
new PdBlockProgressionDimension(attributeValue);
return property;
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderAfterColorTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderAfterColorTests.java 2022-12-26 17:43:53 UTC (rev 12957)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderAfterColorTests.java 2022-12-26 22:10:19 UTC (rev 12958)
@@ -29,7 +29,6 @@
package org.foray.fotree.fo.prop;
import org.foray.fotree.AbstractPropertyTests;
-import org.foray.fotree.FoObj;
import org.foray.fotree.PropertyException;
/**
@@ -38,8 +37,7 @@
public class BorderAfterColorTests extends AbstractPropertyTests {
@Override
- protected PdBorderAfterColor createProperty(final FoObj fobj,
- final String attributeValue) throws PropertyException {
+ protected PdBorderAfterColor createProperty(final String attributeValue) throws PropertyException {
final PdBorderAfterColor property = new PdBorderAfterColor(attributeValue);
return property;
}
Modified: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderAfterPrecedenceTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderAfterPrecedenceTests.java 2022-12-26 17:43:53 UTC (rev 12957)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/fo/prop/BorderAfterPrecedenceTests.java 2022-12-26 22:10:19 UTC (rev 12958)
@@ -29,7 +29,6 @@
package org.foray.fotree.fo.prop;
import org.foray.fotree.AbstractPropertyTests;
-import org.foray.fotree.FoObj;
import org.foray.fotree.PropertyException;
/**
@@ -38,8 +37,7 @@
public class BorderAfterPrecedenceTests extends AbstractPropertyTests {
@Override
- protected PdBorderAfterPrecedence createProperty(final FoObj fobj,
- final String attributeValue) throws PropertyException {
+ protected ...
[truncated message content] |
|
From: <vic...@us...> - 2022-12-26 17:43:56
|
Revision: 12957
http://sourceforge.net/p/foray/code/12957
Author: victormote
Date: 2022-12-26 17:43:53 +0000 (Mon, 26 Dec 2022)
Log Message:
-----------
Rename class for consistency.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdColumnWidth.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/Function.java
Added Paths:
-----------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnProportionalColumnWidth.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/FnProportionalColumnWidthTests.java
Removed Paths:
-------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnProportionalColWidth.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/FnProportionalColWidthTests.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdColumnWidth.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdColumnWidth.java 2022-12-26 16:02:07 UTC (rev 12956)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdColumnWidth.java 2022-12-26 17:43:53 UTC (rev 12957)
@@ -33,7 +33,7 @@
import org.foray.fotree.fo.AbstractFoProperty;
import org.foray.fotree.fo.FoPropertyId;
import org.foray.fotree.fo.FoValue;
-import org.foray.fotree.value.FnProportionalColWidth;
+import org.foray.fotree.value.FnProportionalColumnWidth;
import org.foray.fotree.value.PropertyValue;
import org.axsl.fotree.FoContext;
@@ -70,7 +70,7 @@
if (pv.canEvalLength()) {
return pv;
}
- if (pv instanceof FnProportionalColWidth) {
+ if (pv instanceof FnProportionalColumnWidth) {
// Used to store proportional column width
return pv;
}
@@ -92,7 +92,7 @@
if (value().canEvalLength()) {
return this.convertValueToLength(value(), fobj, context);
}
- if (value() instanceof FnProportionalColWidth) {
+ if (value() instanceof FnProportionalColumnWidth) {
/* Retrieved from {@link #getValueProportional}. */
return 0;
}
@@ -105,9 +105,9 @@
* proportional width was specified.
*/
public double getValueProportional() {
- if (value() instanceof FnProportionalColWidth) {
- final FnProportionalColWidth function =
- (FnProportionalColWidth) value();
+ if (value() instanceof FnProportionalColumnWidth) {
+ final FnProportionalColumnWidth function =
+ (FnProportionalColumnWidth) value();
return function.evalNumeric();
}
return 0;
Deleted: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnProportionalColWidth.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnProportionalColWidth.java 2022-12-26 16:02:07 UTC (rev 12956)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnProportionalColWidth.java 2022-12-26 17:43:53 UTC (rev 12957)
@@ -1,169 +0,0 @@
-/*
- * Copyright 2004 The FOray Project.
- * http://www.foray.org
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * This work is in part derived from the following work(s), used with the
- * permission of the licensor:
- * Apache FOP, licensed by the Apache Software Foundation
- *
- */
-
-/*
- * $LastChangedRevision$
- * $LastChangedDate$
- * $LastChangedBy$
- */
-
-package org.foray.fotree.value;
-
-import org.foray.fotree.FoObj;
-import org.foray.fotree.PropertyException;
-import org.foray.fotree.fo.obj.TableColumn4a;
-
-import org.axsl.fotree.fo.Table;
-import org.axsl.value.TableLayout;
-
-import java.awt.Color;
-
-/**
- * The "proportional-column-width" function in XSL-FO.
- */
-public class FnProportionalColWidth extends Function {
-
- /** The arguments to this function. */
- private Expr operand1;
-
- /**
- * Constructor.
- * @param arguments The arguments to this function.
- * @throws PropertyException For errors creating this function.
- */
- public FnProportionalColWidth(final Expr[] arguments)
- throws PropertyException {
- super();
- /* There must be exactly one argument. */
- if (arguments.length != 1) {
- invalidParameters();
- }
- /* The one argument must be Numeric. */
- if (! (arguments[0].canEvalNumeric())) {
- invalidParameters();
- }
- this.operand1 = arguments[0];
- }
-
- @Override
- public String getFunctionName() {
- return "proportional-column-width";
- }
-
- @Override
- public boolean canEvalNumeric() {
- return true;
- }
-
- @Override
- public double evalNumeric() {
- return this.operand1.evalNumeric();
- }
-
- @Override
- public byte getUnitPower() {
- return this.operand1.getUnitPower();
- }
-
- @Override
- public boolean canEvalLength() {
- return this.operand1.canEvalLength();
- }
-
- @Override
- public int evalLength(final int pointSize) {
- return this.operand1.evalLength(pointSize);
- }
-
- @Override
- public boolean lengthRequiresFontSize() {
- return this.operand1.lengthRequiresFontSize();
- }
-
- @Override
- public boolean canEvalColor() {
- return false;
- }
-
- @Override
- public Color evalColor() {
- throw evalColorException();
- }
-
- @Override
- public boolean canEvalInteger() {
- return false;
- }
-
- @Override
- public int evalInteger() {
- throw evalIntegerException();
- }
-
- @Override
- public boolean canEvalKeyword() {
- return false;
- }
-
- @Override
- public PvKeyword evalKeyword() {
- throw this.evalKeywordException();
- }
-
- @Override
- public boolean canEvalPercentage() {
- return false;
- }
-
- @Override
- public float evalPercentage() {
- throw evalPercentageException();
- }
-
- @Override
- public boolean isValidForObject(final FoObj fobj) {
- /* Per the XSL-FO standard 1.0, Section 5.10.4, it is an error for
- * this function to be used by anything but a table-column. */
- if (! (fobj instanceof TableColumn4a)) {
- return false;
- }
- /* Per the XSL-FO standard 1.0, Section 5.10.4, it is an error for
- * this function to be used within a table unless the table-layout
- * is "fixed".
- */
- Table table = null;
- if (fobj instanceof Table) {
- table = (Table) fobj;
- } else {
- /* TODO: Provide the right context. */
- table = fobj.ancestorTable(null);
- }
- if (table == null) {
- return false;
- }
- if (table.traitTableLayout() != TableLayout.FIXED) {
- return false;
- }
- return true;
- }
-
-}
Copied: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnProportionalColumnWidth.java (from rev 12925, trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnProportionalColWidth.java)
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnProportionalColumnWidth.java (rev 0)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnProportionalColumnWidth.java 2022-12-26 17:43:53 UTC (rev 12957)
@@ -0,0 +1,169 @@
+/*
+ * Copyright 2004 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.foray.fotree.value;
+
+import org.foray.fotree.FoObj;
+import org.foray.fotree.PropertyException;
+import org.foray.fotree.fo.obj.TableColumn4a;
+
+import org.axsl.fotree.fo.Table;
+import org.axsl.value.TableLayout;
+
+import java.awt.Color;
+
+/**
+ * The "proportional-column-width" function in XSL-FO.
+ */
+public class FnProportionalColumnWidth extends Function {
+
+ /** The arguments to this function. */
+ private Expr operand1;
+
+ /**
+ * Constructor.
+ * @param arguments The arguments to this function.
+ * @throws PropertyException For errors creating this function.
+ */
+ public FnProportionalColumnWidth(final Expr[] arguments)
+ throws PropertyException {
+ super();
+ /* There must be exactly one argument. */
+ if (arguments.length != 1) {
+ invalidParameters();
+ }
+ /* The one argument must be Numeric. */
+ if (! (arguments[0].canEvalNumeric())) {
+ invalidParameters();
+ }
+ this.operand1 = arguments[0];
+ }
+
+ @Override
+ public String getFunctionName() {
+ return "proportional-column-width";
+ }
+
+ @Override
+ public boolean canEvalNumeric() {
+ return true;
+ }
+
+ @Override
+ public double evalNumeric() {
+ return this.operand1.evalNumeric();
+ }
+
+ @Override
+ public byte getUnitPower() {
+ return this.operand1.getUnitPower();
+ }
+
+ @Override
+ public boolean canEvalLength() {
+ return this.operand1.canEvalLength();
+ }
+
+ @Override
+ public int evalLength(final int pointSize) {
+ return this.operand1.evalLength(pointSize);
+ }
+
+ @Override
+ public boolean lengthRequiresFontSize() {
+ return this.operand1.lengthRequiresFontSize();
+ }
+
+ @Override
+ public boolean canEvalColor() {
+ return false;
+ }
+
+ @Override
+ public Color evalColor() {
+ throw evalColorException();
+ }
+
+ @Override
+ public boolean canEvalInteger() {
+ return false;
+ }
+
+ @Override
+ public int evalInteger() {
+ throw evalIntegerException();
+ }
+
+ @Override
+ public boolean canEvalKeyword() {
+ return false;
+ }
+
+ @Override
+ public PvKeyword evalKeyword() {
+ throw this.evalKeywordException();
+ }
+
+ @Override
+ public boolean canEvalPercentage() {
+ return false;
+ }
+
+ @Override
+ public float evalPercentage() {
+ throw evalPercentageException();
+ }
+
+ @Override
+ public boolean isValidForObject(final FoObj fobj) {
+ /* Per the XSL-FO standard 1.0, Section 5.10.4, it is an error for
+ * this function to be used by anything but a table-column. */
+ if (! (fobj instanceof TableColumn4a)) {
+ return false;
+ }
+ /* Per the XSL-FO standard 1.0, Section 5.10.4, it is an error for
+ * this function to be used within a table unless the table-layout
+ * is "fixed".
+ */
+ Table table = null;
+ if (fobj instanceof Table) {
+ table = (Table) fobj;
+ } else {
+ /* TODO: Provide the right context. */
+ table = fobj.ancestorTable(null);
+ }
+ if (table == null) {
+ return false;
+ }
+ if (table.traitTableLayout() != TableLayout.FIXED) {
+ return false;
+ }
+ return true;
+ }
+
+}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/Function.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/Function.java 2022-12-26 16:02:07 UTC (rev 12956)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/Function.java 2022-12-26 17:43:53 UTC (rev 12957)
@@ -102,7 +102,7 @@
return new FnMin(arguments);
}
case "proportional-column-width": {
- return new FnProportionalColWidth(arguments);
+ return new FnProportionalColumnWidth(arguments);
}
case "rgb": {
return new FnRgb(arguments);
Deleted: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/FnProportionalColWidthTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/FnProportionalColWidthTests.java 2022-12-26 16:02:07 UTC (rev 12956)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/FnProportionalColWidthTests.java 2022-12-26 17:43:53 UTC (rev 12957)
@@ -1,60 +0,0 @@
-/*
- * Copyright 2007 The FOray Project.
- * http://www.foray.org
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * This work is in part derived from the following work(s), used with the
- * permission of the licensor:
- * Apache FOP, licensed by the Apache Software Foundation
- *
- */
-
-/*
- * $LastChangedRevision$
- * $LastChangedDate$
- * $LastChangedBy$
- */
-
-package org.foray.fotree.value;
-
-import org.foray.fotree.PropertyException;
-
-import static org.junit.jupiter.api.Assertions.assertTrue;
-import org.junit.jupiter.api.Test;
-
-/**
- * JUnit test class for the class {@link FnProportionalColWidth}.
- */
-public class FnProportionalColWidthTests {
-
- /** Constant used for testing. */
- private static final DtNumber NUMERIC_1 = new DtNumber(4.5);
-
- /** Constant used for testing. */
- private static final Expr[] NUMERIC_ARRAY_1 = new Expr[] {
- FnProportionalColWidthTests.NUMERIC_1,
- };
-
- /**
- * Unit test of a function creation.
- * @throws PropertyException For errors during function creation.
- */
- @Test
- public void testBasic() throws PropertyException {
- final Function fn = Function.makeFunction("proportional-column-width",
- FnProportionalColWidthTests.NUMERIC_ARRAY_1, null);
- assertTrue(fn instanceof FnProportionalColWidth);
- }
-
-}
Copied: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/FnProportionalColumnWidthTests.java (from rev 12923, trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/FnProportionalColWidthTests.java)
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/FnProportionalColumnWidthTests.java (rev 0)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/FnProportionalColumnWidthTests.java 2022-12-26 17:43:53 UTC (rev 12957)
@@ -0,0 +1,60 @@
+/*
+ * Copyright 2007 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.foray.fotree.value;
+
+import org.foray.fotree.PropertyException;
+
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import org.junit.jupiter.api.Test;
+
+/**
+ * JUnit test class for the class {@link FnProportionalColumnWidth}.
+ */
+public class FnProportionalColumnWidthTests {
+
+ /** Constant used for testing. */
+ private static final DtNumber NUMERIC_1 = new DtNumber(4.5);
+
+ /** Constant used for testing. */
+ private static final Expr[] NUMERIC_ARRAY_1 = new Expr[] {
+ FnProportionalColumnWidthTests.NUMERIC_1,
+ };
+
+ /**
+ * Unit test of a function creation.
+ * @throws PropertyException For errors during function creation.
+ */
+ @Test
+ public void testBasic() throws PropertyException {
+ final Function fn = Function.makeFunction("proportional-column-width",
+ FnProportionalColumnWidthTests.NUMERIC_ARRAY_1, null);
+ assertTrue(fn instanceof FnProportionalColumnWidth);
+ }
+
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-12-26 16:02:10
|
Revision: 12956
http://sourceforge.net/p/foray/code/12956
Author: victormote
Date: 2022-12-26 16:02:07 +0000 (Mon, 26 Dec 2022)
Log Message:
-----------
Rename class for completeness and consistency.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/Function.java
Added Paths:
-----------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromNearestSpecifiedValue.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/FnFromNearestSpecifiedValueTests.java
Removed Paths:
-------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnNearestSpecProp.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/FnNearestSpecPropTests.java
Copied: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromNearestSpecifiedValue.java (from rev 12923, trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnNearestSpecProp.java)
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromNearestSpecifiedValue.java (rev 0)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnFromNearestSpecifiedValue.java 2022-12-26 16:02:07 UTC (rev 12956)
@@ -0,0 +1,152 @@
+/*
+ * Copyright 2004 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.foray.fotree.value;
+
+import org.foray.fotree.FoObj;
+import org.foray.fotree.Property;
+import org.foray.fotree.PropertyException;
+import org.foray.fotree.PropertyId;
+import org.foray.fotree.fo.FoPropertyId;
+
+import java.awt.Color;
+
+/**
+ * The "from-nearest-specified-value" function in XSL-FO.
+ */
+public class FnFromNearestSpecifiedValue extends FnAbstractNamedProperty {
+
+ /**
+ * Constructor.
+ * @param arguments The arguments to this function.
+ * @param propertyType The property which is calling this function.
+ * @throws PropertyException For errors creating this function.
+ */
+ public FnFromNearestSpecifiedValue(final Expr[] arguments,
+ final PropertyId propertyType) throws PropertyException {
+ super(arguments, propertyType);
+ }
+
+ @Override
+ public String getFunctionName() {
+ return "from-nearest-specified-value";
+ }
+
+ /**
+ * Returns the value of this function.
+ * @param callingProperty The property which is calling this function.
+ * @param fobj The FO object for whom this property is being evaluated.
+ * @return The value of this function.
+ */
+ public PropertyValue eval(final Property callingProperty, final FoObj fobj) {
+ /* TODO: Provide the right context. */
+ FoObj parent = fobj.effectiveParent(null);
+ final FoPropertyId propertyType = this.getPropertyType();
+ Property ps = null;
+ while (parent != null && ps == null) {
+ ps = parent.getPropertyList().getProperty(propertyType);
+ /* TODO: Provide the right context. */
+ parent = fobj.effectiveParent(null);
+ }
+ if (ps == null) {
+ return null;
+ }
+ return ps.value();
+ }
+
+ @Override
+ public boolean canEvalNumeric() {
+ return false;
+ }
+
+ @Override
+ public double evalNumeric() {
+ throw this.evalNumericException();
+ }
+
+ @Override
+ public boolean canEvalLength() {
+ return false;
+ }
+
+ @Override
+ public byte getUnitPower() {
+ throw this.evalNumericException();
+ }
+
+ @Override
+ public int evalLength(final int pointSize) {
+ throw this.evalLengthException();
+ }
+
+ @Override
+ public boolean canEvalColor() {
+ return false;
+ }
+
+ @Override
+ public Color evalColor() {
+ throw evalColorException();
+ }
+
+ @Override
+ public boolean lengthRequiresFontSize() {
+ return false;
+ }
+
+ @Override
+ public boolean canEvalInteger() {
+ return false;
+ }
+
+ @Override
+ public int evalInteger() {
+ throw evalIntegerException();
+ }
+
+ @Override
+ public boolean canEvalKeyword() {
+ return false;
+ }
+
+ @Override
+ public PvKeyword evalKeyword() {
+ throw this.evalKeywordException();
+ }
+
+ @Override
+ public boolean canEvalPercentage() {
+ return false;
+ }
+
+ @Override
+ public float evalPercentage() {
+ throw evalPercentageException();
+ }
+
+}
Deleted: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnNearestSpecProp.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnNearestSpecProp.java 2022-12-26 15:35:22 UTC (rev 12955)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnNearestSpecProp.java 2022-12-26 16:02:07 UTC (rev 12956)
@@ -1,152 +0,0 @@
-/*
- * Copyright 2004 The FOray Project.
- * http://www.foray.org
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * This work is in part derived from the following work(s), used with the
- * permission of the licensor:
- * Apache FOP, licensed by the Apache Software Foundation
- *
- */
-
-/*
- * $LastChangedRevision$
- * $LastChangedDate$
- * $LastChangedBy$
- */
-
-package org.foray.fotree.value;
-
-import org.foray.fotree.FoObj;
-import org.foray.fotree.Property;
-import org.foray.fotree.PropertyException;
-import org.foray.fotree.PropertyId;
-import org.foray.fotree.fo.FoPropertyId;
-
-import java.awt.Color;
-
-/**
- * The "nearest-specified-value" function in XSL-FO.
- */
-public class FnNearestSpecProp extends FnAbstractNamedProperty {
-
- /**
- * Constructor.
- * @param arguments The arguments to this function.
- * @param propertyType The property which is calling this function.
- * @throws PropertyException For errors creating this function.
- */
- public FnNearestSpecProp(final Expr[] arguments,
- final PropertyId propertyType) throws PropertyException {
- super(arguments, propertyType);
- }
-
- @Override
- public String getFunctionName() {
- return "from-nearest-specified-value";
- }
-
- /**
- * Returns the value of this function.
- * @param callingProperty The property which is calling this function.
- * @param fobj The FO object for whom this property is being evaluated.
- * @return The value of this function.
- */
- public PropertyValue eval(final Property callingProperty, final FoObj fobj) {
- /* TODO: Provide the right context. */
- FoObj parent = fobj.effectiveParent(null);
- final FoPropertyId propertyType = this.getPropertyType();
- Property ps = null;
- while (parent != null && ps == null) {
- ps = parent.getPropertyList().getProperty(propertyType);
- /* TODO: Provide the right context. */
- parent = fobj.effectiveParent(null);
- }
- if (ps == null) {
- return null;
- }
- return ps.value();
- }
-
- @Override
- public boolean canEvalNumeric() {
- return false;
- }
-
- @Override
- public double evalNumeric() {
- throw this.evalNumericException();
- }
-
- @Override
- public boolean canEvalLength() {
- return false;
- }
-
- @Override
- public byte getUnitPower() {
- throw this.evalNumericException();
- }
-
- @Override
- public int evalLength(final int pointSize) {
- throw this.evalLengthException();
- }
-
- @Override
- public boolean canEvalColor() {
- return false;
- }
-
- @Override
- public Color evalColor() {
- throw evalColorException();
- }
-
- @Override
- public boolean lengthRequiresFontSize() {
- return false;
- }
-
- @Override
- public boolean canEvalInteger() {
- return false;
- }
-
- @Override
- public int evalInteger() {
- throw evalIntegerException();
- }
-
- @Override
- public boolean canEvalKeyword() {
- return false;
- }
-
- @Override
- public PvKeyword evalKeyword() {
- throw this.evalKeywordException();
- }
-
- @Override
- public boolean canEvalPercentage() {
- return false;
- }
-
- @Override
- public float evalPercentage() {
- throw evalPercentageException();
- }
-
-}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/Function.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/Function.java 2022-12-26 15:35:22 UTC (rev 12955)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/Function.java 2022-12-26 16:02:07 UTC (rev 12956)
@@ -75,7 +75,7 @@
return new FnFloor(arguments);
}
case "from-nearest-specified-value": {
- return new FnNearestSpecProp(arguments, propertyType);
+ return new FnFromNearestSpecifiedValue(arguments, propertyType);
}
case "from-page-master-region": {
return new FnFromPageMasterRegion(arguments, propertyType);
Copied: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/FnFromNearestSpecifiedValueTests.java (from rev 12923, trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/FnNearestSpecPropTests.java)
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/FnFromNearestSpecifiedValueTests.java (rev 0)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/FnFromNearestSpecifiedValueTests.java 2022-12-26 16:02:07 UTC (rev 12956)
@@ -0,0 +1,60 @@
+/*
+ * Copyright 2007 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.foray.fotree.value;
+
+import org.foray.fotree.PropertyException;
+
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import org.junit.jupiter.api.Test;
+
+/**
+ * JUnit test class for the class {@link FnFromNearestSpecifiedValue}.
+ */
+public class FnFromNearestSpecifiedValueTests {
+
+ /** Constant used for testing. */
+ private static final DtName NAME_1 = new DtName("orphans");
+
+ /** Constant used for testing. */
+ private static final Expr[] OPERAND_ARRAY_1 = new Expr[] {
+ FnFromNearestSpecifiedValueTests.NAME_1,
+ };
+
+ /**
+ * Unit test of a function creation.
+ * @throws PropertyException For errors during function creation.
+ */
+ @Test
+ public void testBasic() throws PropertyException {
+ final Function fn = Function.makeFunction("from-nearest-specified-value",
+ FnFromNearestSpecifiedValueTests.OPERAND_ARRAY_1, null);
+ assertTrue(fn instanceof FnFromNearestSpecifiedValue);
+ }
+
+}
Deleted: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/FnNearestSpecPropTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/FnNearestSpecPropTests.java 2022-12-26 15:35:22 UTC (rev 12955)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/FnNearestSpecPropTests.java 2022-12-26 16:02:07 UTC (rev 12956)
@@ -1,60 +0,0 @@
-/*
- * Copyright 2007 The FOray Project.
- * http://www.foray.org
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * This work is in part derived from the following work(s), used with the
- * permission of the licensor:
- * Apache FOP, licensed by the Apache Software Foundation
- *
- */
-
-/*
- * $LastChangedRevision$
- * $LastChangedDate$
- * $LastChangedBy$
- */
-
-package org.foray.fotree.value;
-
-import org.foray.fotree.PropertyException;
-
-import static org.junit.jupiter.api.Assertions.assertTrue;
-import org.junit.jupiter.api.Test;
-
-/**
- * JUnit test class for the class {@link FnNearestSpecProp}.
- */
-public class FnNearestSpecPropTests {
-
- /** Constant used for testing. */
- private static final DtName NAME_1 = new DtName("orphans");
-
- /** Constant used for testing. */
- private static final Expr[] OPERAND_ARRAY_1 = new Expr[] {
- FnNearestSpecPropTests.NAME_1,
- };
-
- /**
- * Unit test of a function creation.
- * @throws PropertyException For errors during function creation.
- */
- @Test
- public void testBasic() throws PropertyException {
- final Function fn = Function.makeFunction("from-nearest-specified-value",
- FnNearestSpecPropTests.OPERAND_ARRAY_1, null);
- assertTrue(fn instanceof FnNearestSpecProp);
- }
-
-}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-12-26 15:35:25
|
Revision: 12955
http://sourceforge.net/p/foray/code/12955
Author: victormote
Date: 2022-12-26 15:35:22 +0000 (Mon, 26 Dec 2022)
Log Message:
-----------
Rename class for completeness and consistency.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/Function.java
Added Paths:
-----------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnInheritedPropertyValue.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/FnInheritedPropertyValueTests.java
Removed Paths:
-------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnInheritedProp.java
trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/FnInheritedPropTests.java
Deleted: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnInheritedProp.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnInheritedProp.java 2022-12-25 16:17:59 UTC (rev 12954)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnInheritedProp.java 2022-12-26 15:35:22 UTC (rev 12955)
@@ -1,155 +0,0 @@
-/*
- * Copyright 2004 The FOray Project.
- * http://www.foray.org
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * This work is in part derived from the following work(s), used with the
- * permission of the licensor:
- * Apache FOP, licensed by the Apache Software Foundation
- *
- */
-
-/*
- * $LastChangedRevision$
- * $LastChangedDate$
- * $LastChangedBy$
- */
-
-package org.foray.fotree.value;
-
-import org.foray.fotree.FoObj;
-import org.foray.fotree.Property;
-import org.foray.fotree.PropertyException;
-import org.foray.fotree.PropertyId;
-import org.foray.fotree.fo.FoPropertyId;
-
-import java.awt.Color;
-
-/**
- * The "inherited-property-value" function in XSL-FO.
- */
-public class FnInheritedProp extends FnAbstractNamedProperty {
-
- /**
- * Constructor.
- * @param arguments The arguments to this function.
- * @param propertyType The property which is calling this function.
- * @throws PropertyException For errors creating this function.
- */
- public FnInheritedProp(final Expr[] arguments,
- final PropertyId propertyType) throws PropertyException {
- super(arguments, propertyType);
- }
-
- @Override
- public String getFunctionName() {
- return "inherited-property-value";
- }
-
- /**
- * Returns the value of this function.
- * @param callingProperty The property which is calling this function.
- * @param fobj The FO object for whom this property is being evaluated.
- * @return The value of this function.
- * @throws PropertyException If the operand cannot be found in the ancestor
- * values.
- */
- public PropertyValue eval(final Property callingProperty, final FoObj fobj)
- throws PropertyException {
- /* TODO: Provide the right context. */
- final FoObj parent = fobj.effectiveParent(null);
- final FoPropertyId propertyType = this.getPropertyType();
- /*
- * TODO: This is not right. It needs to return the inherited value
- * regardless of whether the Property was explicitly set or not.
- */
- final Property ps = parent.getPropertyList().getProperty(propertyType);
- if (ps == null) {
- throw new PropertyException("Invalid operand: "
- + "'inherited-property-value' function");
- }
- return ps.value();
- }
-
- @Override
- public boolean canEvalNumeric() {
- return false;
- }
-
- @Override
- public double evalNumeric() {
- throw this.evalNumericException();
- }
-
- @Override
- public boolean canEvalLength() {
- return false;
- }
-
- @Override
- public byte getUnitPower() {
- throw this.evalNumericException();
- }
-
- @Override
- public int evalLength(final int pointSize) {
- throw this.evalLengthException();
- }
-
- @Override
- public boolean canEvalColor() {
- return false;
- }
-
- @Override
- public Color evalColor() {
- throw evalColorException();
- }
-
- @Override
- public boolean lengthRequiresFontSize() {
- return false;
- }
-
- @Override
- public boolean canEvalInteger() {
- return false;
- }
-
- @Override
- public int evalInteger() {
- throw evalIntegerException();
- }
-
- @Override
- public boolean canEvalKeyword() {
- return false;
- }
-
- @Override
- public PvKeyword evalKeyword() {
- throw this.evalKeywordException();
- }
-
- @Override
- public boolean canEvalPercentage() {
- return false;
- }
-
- @Override
- public float evalPercentage() {
- throw evalPercentageException();
- }
-
-}
Copied: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnInheritedPropertyValue.java (from rev 12923, trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnInheritedProp.java)
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnInheritedPropertyValue.java (rev 0)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/FnInheritedPropertyValue.java 2022-12-26 15:35:22 UTC (rev 12955)
@@ -0,0 +1,155 @@
+/*
+ * Copyright 2004 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.foray.fotree.value;
+
+import org.foray.fotree.FoObj;
+import org.foray.fotree.Property;
+import org.foray.fotree.PropertyException;
+import org.foray.fotree.PropertyId;
+import org.foray.fotree.fo.FoPropertyId;
+
+import java.awt.Color;
+
+/**
+ * The "inherited-property-value" function in XSL-FO.
+ */
+public class FnInheritedPropertyValue extends FnAbstractNamedProperty {
+
+ /**
+ * Constructor.
+ * @param arguments The arguments to this function.
+ * @param propertyType The property which is calling this function.
+ * @throws PropertyException For errors creating this function.
+ */
+ public FnInheritedPropertyValue(final Expr[] arguments,
+ final PropertyId propertyType) throws PropertyException {
+ super(arguments, propertyType);
+ }
+
+ @Override
+ public String getFunctionName() {
+ return "inherited-property-value";
+ }
+
+ /**
+ * Returns the value of this function.
+ * @param callingProperty The property which is calling this function.
+ * @param fobj The FO object for whom this property is being evaluated.
+ * @return The value of this function.
+ * @throws PropertyException If the operand cannot be found in the ancestor
+ * values.
+ */
+ public PropertyValue eval(final Property callingProperty, final FoObj fobj)
+ throws PropertyException {
+ /* TODO: Provide the right context. */
+ final FoObj parent = fobj.effectiveParent(null);
+ final FoPropertyId propertyType = this.getPropertyType();
+ /*
+ * TODO: This is not right. It needs to return the inherited value
+ * regardless of whether the Property was explicitly set or not.
+ */
+ final Property ps = parent.getPropertyList().getProperty(propertyType);
+ if (ps == null) {
+ throw new PropertyException("Invalid operand: "
+ + "'inherited-property-value' function");
+ }
+ return ps.value();
+ }
+
+ @Override
+ public boolean canEvalNumeric() {
+ return false;
+ }
+
+ @Override
+ public double evalNumeric() {
+ throw this.evalNumericException();
+ }
+
+ @Override
+ public boolean canEvalLength() {
+ return false;
+ }
+
+ @Override
+ public byte getUnitPower() {
+ throw this.evalNumericException();
+ }
+
+ @Override
+ public int evalLength(final int pointSize) {
+ throw this.evalLengthException();
+ }
+
+ @Override
+ public boolean canEvalColor() {
+ return false;
+ }
+
+ @Override
+ public Color evalColor() {
+ throw evalColorException();
+ }
+
+ @Override
+ public boolean lengthRequiresFontSize() {
+ return false;
+ }
+
+ @Override
+ public boolean canEvalInteger() {
+ return false;
+ }
+
+ @Override
+ public int evalInteger() {
+ throw evalIntegerException();
+ }
+
+ @Override
+ public boolean canEvalKeyword() {
+ return false;
+ }
+
+ @Override
+ public PvKeyword evalKeyword() {
+ throw this.evalKeywordException();
+ }
+
+ @Override
+ public boolean canEvalPercentage() {
+ return false;
+ }
+
+ @Override
+ public float evalPercentage() {
+ throw evalPercentageException();
+ }
+
+}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/Function.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/Function.java 2022-12-25 16:17:59 UTC (rev 12954)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/value/Function.java 2022-12-26 15:35:22 UTC (rev 12955)
@@ -87,7 +87,7 @@
return new FnFromTableColumn(arguments);
}
case "inherited-property-value": {
- return new FnInheritedProp(arguments, propertyType);
+ return new FnInheritedPropertyValue(arguments, propertyType);
}
case "label-end": {
return new FnLabelEnd(arguments);
Deleted: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/FnInheritedPropTests.java
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/FnInheritedPropTests.java 2022-12-25 16:17:59 UTC (rev 12954)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/FnInheritedPropTests.java 2022-12-26 15:35:22 UTC (rev 12955)
@@ -1,60 +0,0 @@
-/*
- * Copyright 2007 The FOray Project.
- * http://www.foray.org
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * This work is in part derived from the following work(s), used with the
- * permission of the licensor:
- * Apache FOP, licensed by the Apache Software Foundation
- *
- */
-
-/*
- * $LastChangedRevision$
- * $LastChangedDate$
- * $LastChangedBy$
- */
-
-package org.foray.fotree.value;
-
-import org.foray.fotree.PropertyException;
-
-import static org.junit.jupiter.api.Assertions.assertTrue;
-import org.junit.jupiter.api.Test;
-
-/**
- * JUnit test class for the class {@link FnInheritedProp}.
- */
-public class FnInheritedPropTests {
-
- /** Constant used for testing. */
- private static final DtName NAME_1 = new DtName("orphans");
-
- /** Constant used for testing. */
- private static final Expr[] OPERAND_ARRAY_1 = new Expr[] {
- FnInheritedPropTests.NAME_1,
- };
-
- /**
- * Unit test of a function creation.
- * @throws PropertyException For errors during function creation.
- */
- @Test
- public void testBasic() throws PropertyException {
- final Function fn = Function.makeFunction("inherited-property-value", FnInheritedPropTests.OPERAND_ARRAY_1,
- null);
- assertTrue(fn instanceof FnInheritedProp);
- }
-
-}
Copied: trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/FnInheritedPropertyValueTests.java (from rev 12923, trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/FnInheritedPropTests.java)
===================================================================
--- trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/FnInheritedPropertyValueTests.java (rev 0)
+++ trunk/foray/foray-fotree/src/test/java/org/foray/fotree/value/FnInheritedPropertyValueTests.java 2022-12-26 15:35:22 UTC (rev 12955)
@@ -0,0 +1,60 @@
+/*
+ * Copyright 2007 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.foray.fotree.value;
+
+import org.foray.fotree.PropertyException;
+
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import org.junit.jupiter.api.Test;
+
+/**
+ * JUnit test class for the class {@link FnInheritedPropertyValue}.
+ */
+public class FnInheritedPropertyValueTests {
+
+ /** Constant used for testing. */
+ private static final DtName NAME_1 = new DtName("orphans");
+
+ /** Constant used for testing. */
+ private static final Expr[] OPERAND_ARRAY_1 = new Expr[] {
+ FnInheritedPropertyValueTests.NAME_1,
+ };
+
+ /**
+ * Unit test of a function creation.
+ * @throws PropertyException For errors during function creation.
+ */
+ @Test
+ public void testBasic() throws PropertyException {
+ final Function fn = Function.makeFunction(
+ "inherited-property-value", FnInheritedPropertyValueTests.OPERAND_ARRAY_1, null);
+ assertTrue(fn instanceof FnInheritedPropertyValue);
+ }
+
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-12-25 16:18:02
|
Revision: 12954
http://sourceforge.net/p/foray/code/12954
Author: victormote
Date: 2022-12-25 16:17:59 +0000 (Sun, 25 Dec 2022)
Log Message:
-----------
More parser cleanup.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoTreeParser4a.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoTreeParser4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoTreeParser4a.java 2022-12-25 16:01:22 UTC (rev 12953)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoTreeParser4a.java 2022-12-25 16:17:59 UTC (rev 12954)
@@ -346,6 +346,7 @@
}
} else {
fobj = nativeNamespace.parseElement(localName, this.currentFObj, propertyList, this);
+ this.currentFObj.addChild(fobj);
}
@@ -357,13 +358,8 @@
fobj.validatePropertyTypes();
fobj.validatePropertyValues();
fobj.validateProperties();
- /* If the parent is not null (which it can be for Root), register
- * the newly-created object as a child of the parent. */
- if (this.currentFObj != null) {
- this.currentFObj.addChild(fobj);
- }
- /* Give the fobj a chance to do some validation and/or setup before
- * the children are processed. */
+
+ /* Give the fobj a chance to do some validation and/or setup before the children are processed. */
fobj.setup();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-12-25 16:01:24
|
Revision: 12953
http://sourceforge.net/p/foray/code/12953
Author: victormote
Date: 2022-12-25 16:01:22 +0000 (Sun, 25 Dec 2022)
Log Message:
-----------
Clean up parser bootstrapping logic.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoTreeParser4a.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoTreeParser4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoTreeParser4a.java 2022-12-25 15:36:46 UTC (rev 12952)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoTreeParser4a.java 2022-12-25 16:01:22 UTC (rev 12953)
@@ -41,7 +41,6 @@
import org.foray.xml.Sax2DomParser;
import org.foray.xml.SaxParser;
-import org.axsl.constants.XmlConstants;
import org.axsl.fotree.FoTreeEvent;
import org.axsl.fotree.FoTreeException;
import org.axsl.fotree.FoTreeListener;
@@ -97,9 +96,6 @@
/** The current formatting object being parsed. */
private FoObj currentFObj = null;
- /** The root of the formatting object tree. */
- private Root4a rootFObj = null;
-
/** Collection of objects that have registered to be notified about FOTreeEvent firings. */
private List<FoTreeListener> foTreeListeners = new ArrayList<FoTreeListener>();
@@ -147,7 +143,6 @@
@Override
public void reset() {
this.currentFObj = null;
- this.rootFObj = null;
this.foTreeListeners.clear();
StringUtils.clear(this.textBuffer);
this.foTree = new FoTree4a(this.server);
@@ -177,7 +172,6 @@
parser = createSax2Parser(false, true, true, null, false);
}
parser.parse(inputSource);
- foTree.setRootFo(this.rootFObj);
return this.foTree;
}
@@ -266,8 +260,6 @@
@Override
public void startDocument() throws SAXException {
- // Allow the FoTreeBuilder to be reused
- this.rootFObj = null;
infoMessage("Begin parsing the Formatting Object (FO) input.");
}
@@ -375,12 +367,10 @@
fobj.setup();
-
- checkRoot(fobj);
// Let Root register an "id", if any.
- this.rootFObj.addId(fobj);
+ this.foTree.getRootFo().addId(fobj);
// Let Root register an unmatched "ref-id", if any.
- this.rootFObj.checkUnmatchedReference(fobj);
+ this.foTree.getRootFo().checkUnmatchedReference(fobj);
} catch (final FoTreeException e) {
throw new SAXException(e);
}
@@ -417,33 +407,6 @@
this.currentFObj = this.currentFObj.getParsedParent();
}
- /**
- * Sets the root object if it is not already set.
- * @param fobj The FoObj that is being processed, which is a candidate to be the root element if it is not already
- * set.
- * @throws SAXException If the root element is missing its namespace declaration, or if there is an element in the
- * tree before any root element.
- */
- private void checkRoot(final FoObj fobj) throws SAXException {
- if (this.rootFObj != null) {
- return;
- }
- if (fobj instanceof Root4a) {
- this.rootFObj = (Root4a) fobj;
- this.rootFObj.setFOTreeBuilder(this.foTree);
- return;
- }
- if (fobj.getName().equals("root")) {
- final FoTreeException fote = new FoTreeException("Root element is missing the namespace declaration: "
- + XmlConstants.XSLFO_NS_URI);
- fote.setContextMessage(fobj.getContextMessage());
- throw new SAXException(fote);
- }
- final FoTreeException fote = new FoTreeException("Root element must be root, not " + fobj.getName());
- fote.setContextMessage(fobj.getContextMessage());
- throw new SAXException(new FoTreeException(fote));
- }
-
@Override
public void registerListener(final FoTreeListener listener) {
if (listener == null) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-12-25 15:36:49
|
Revision: 12952
http://sourceforge.net/p/foray/code/12952
Author: victormote
Date: 2022-12-25 15:36:46 +0000 (Sun, 25 Dec 2022)
Log Message:
-----------
Simplify API for parseElement().
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoTreeParser4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/NamespaceNative.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoTreeParser4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoTreeParser4a.java 2022-12-25 03:30:06 UTC (rev 12951)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoTreeParser4a.java 2022-12-25 15:36:46 UTC (rev 12952)
@@ -337,7 +337,7 @@
* Parse the attributes/properties first, as they are independent of the elements/objects.
* Parsing the properties is much easier and cleaner if we just parse them first, and don't worry about any
* validation tasks until we join them up with the object to which they will be attached. */
- final PropertyList list = nativeNamespace.parseAttributes(attlist, this);
+ final PropertyList propertyList = nativeNamespace.parseAttributes(attlist, this);
/* Now parse the element/object itself. Root gets handled specially because it doesn't have an FoObj
@@ -345,7 +345,7 @@
if (this.currentFObj == null) {
if (NamespaceFo.getInstance() == nativeNamespace
&& "root".equals(localName)) {
- final Root4a root = new Root4a(foTree, list);
+ final Root4a root = new Root4a(foTree, propertyList);
foTree.setRootFo(root);
fobj = root;
} else {
@@ -353,7 +353,7 @@
throw new SAXException("The first element parsed must be: " + qname.toString());
}
} else {
- fobj = nativeNamespace.parseElement(localName, this.currentFObj, list, getLocator(), this);
+ fobj = nativeNamespace.parseElement(localName, this.currentFObj, propertyList, this);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/NamespaceNative.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/NamespaceNative.java 2022-12-25 03:30:06 UTC (rev 12951)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/NamespaceNative.java 2022-12-25 15:36:46 UTC (rev 12952)
@@ -38,7 +38,6 @@
import org.axsl.fotree.FoTreeException;
import org.xml.sax.Attributes;
-import org.xml.sax.Locator;
/**
* Abstract superclass for {@link Namespace} instances whose members are parsed as native objects in the FO tree.
@@ -68,13 +67,12 @@
* @param localName The local name of the element.
* @param currentFObj The current FoObj, that is, the parent of the one being parsed.
* @param list The property list into which properties for the new FoObj should be placed.
- * @param locator The SAX locator.
* @param errorHandler Object that wants to be notified if an element unknown to this Namespace is encountered.
* @return The newly-created FoObj instance.
* @throws FoTreeException For parsing errors.
*/
public FoObj parseElement(final String localName, final FoObj currentFObj, final PropertyList list,
- final Locator locator, final ErrorHandler errorHandler) throws FoTreeException {
+ final ErrorHandler errorHandler) throws FoTreeException {
final FoObj fobj = parseElementForNS(localName, currentFObj, list);
if (fobj == null
&& errorHandler != null) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|