Revision: 7863
http://svn.sourceforge.net/foray/?rev=7863&view=rev
Author: victormote
Date: 2006-09-02 17:21:23 -0700 (Sat, 02 Sep 2006)
Log Message:
-----------
Move some property validation from startup() to validateProperties().
Modified Paths:
--------------
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Bookmark.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Character.java
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Bookmark.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Bookmark.java 2006-09-02 23:49:50 UTC (rev 7862)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Bookmark.java 2006-09-03 00:21:23 UTC (rev 7863)
@@ -60,30 +60,30 @@
* {@inheritDoc}
*/
protected void validateProperties() throws FOTreeException {
- return;
+ final String _internalDestination = this.traitInternalDestination();
+ if (_internalDestination == null || _internalDestination.equals("")) {
+ getLogger().warn(getFullName()
+ + "requires an internal-destination.");
+ }
+ final String _externalDestination = this.traitExternalDestination();
+ if (_externalDestination != null &&!_externalDestination.equals("")) {
+ getLogger().warn(getFullName()
+ + "external-destination not supported currently.");
+ }
}
/**
* {@inheritDoc}
*/
- protected void validateDescendants() throws FOTreeException {
+ public void setup() throws FOTreeException {
return;
}
/**
* {@inheritDoc}
*/
- public void setup() throws FOTreeException {
- final String _internalDestination = this.traitInternalDestination();
- if (_internalDestination == null || _internalDestination.equals("")) {
- getLogger().warn(getFullName()
- + "requires an internal-destination.");
- }
- final String _externalDestination = this.traitExternalDestination();
- if (_externalDestination != null &&!_externalDestination.equals("")) {
- getLogger().warn(getFullName()
- + "external-destination not supported currently.");
- }
+ protected void validateDescendants() throws FOTreeException {
+ return;
}
public void end() throws FOTreeException {
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Character.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Character.java 2006-09-02 23:49:50 UTC (rev 7862)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Character.java 2006-09-03 00:21:23 UTC (rev 7863)
@@ -55,12 +55,28 @@
* {@inheritDoc}
*/
protected void validateProperties() throws FOTreeException {
- return;
+ final char c = traitCharacter();
+ if (c == org.foray.fotree.fo.prop.Character.CHARACTER_NOT_SPECIFIED) {
+ throwException("Property \"character\" is required.");
+ }
}
/**
* {@inheritDoc}
*/
+ public void setup() throws FOTreeException {
+ /* This is a duplication of data, but is deemed acceptable at the
+ * moment, because it is expected that use of fo:character will normally
+ * be very limited. */
+ final char c = traitCharacter();
+ final char[] chars = new char[] {c};
+ final FOText text = new FOText(this, chars);
+ super.addChild(text);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
protected void validateDescendants() throws FOTreeException {
return;
}
@@ -77,22 +93,6 @@
return true;
}
- /**
- * {@inheritDoc}
- */
- public void setup() throws FOTreeException {
- final char c = traitCharacter();
- if (c == org.foray.fotree.fo.prop.Character.CHARACTER_NOT_SPECIFIED) {
- throwException("Property \"character\" is required.");
- }
- /* This is a duplication of data, but is deemed acceptable at the
- * moment, because it is expected that use of fo:character will normally
- * be very limited. */
- final char[] chars = new char[] {c};
- final FOText text = new FOText(this, chars);
- super.addChild(text);
- }
-
public char[] getAreaTreeText(final FOContext context) {
final FOText text = (FOText) this.children.get(0);
return text.getAreaTreeText(context);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|