Revision: 12904
http://sourceforge.net/p/foray/code/12904
Author: victormote
Date: 2022-12-21 00:48:54 +0000 (Wed, 21 Dec 2022)
Log Message:
-----------
Style changes only.
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-21 00:32:08 UTC (rev 12903)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoTreeParser4a.java 2022-12-21 00:48:54 UTC (rev 12904)
@@ -250,36 +250,6 @@
}
@Override
- public void endElement(final String uri, final String localName, final String rawName) throws SAXException {
- if (this.activeForeignXML != null) {
- // If inside foreign XML, let the ForeignXml instance handle it.
- this.activeForeignXML.endElement(uri, localName, rawName);
- // It may have disactivated the foreign XML, so check again.
- if (this.activeForeignXML != null) {
- return;
- }
- }
- try {
- finalizeText();
- this.currentFObj.end();
- this.currentFObj.validateDescendants();
- } catch (final FoTreeException e) {
- throw new SAXException(e);
- }
- try {
- notifyFObjComplete(this.currentFObj);
-
- if (this.currentFObj instanceof PageSequence4a) {
- // Notify the listeners that this page-sequence is complete.
- notifyPageSequenceComplete((PageSequence4a) this.currentFObj);
- }
- } catch (final FoTreeException e) {
- throw new SAXException(e);
- }
- this.currentFObj = this.currentFObj.getParsedParent();
- }
-
- @Override
public void startDocument() throws SAXException {
// Allow the FoTreeBuilder to be reused
this.rootFObj = null;
@@ -350,6 +320,36 @@
this.currentFObj = fobj;
}
+ @Override
+ public void endElement(final String uri, final String localName, final String rawName) throws SAXException {
+ if (this.activeForeignXML != null) {
+ // If inside foreign XML, let the ForeignXml instance handle it.
+ this.activeForeignXML.endElement(uri, localName, rawName);
+ // It may have disactivated the foreign XML, so check again.
+ if (this.activeForeignXML != null) {
+ return;
+ }
+ }
+ try {
+ finalizeText();
+ this.currentFObj.end();
+ this.currentFObj.validateDescendants();
+ } catch (final FoTreeException e) {
+ throw new SAXException(e);
+ }
+ try {
+ notifyFObjComplete(this.currentFObj);
+
+ if (this.currentFObj instanceof PageSequence4a) {
+ // Notify the listeners that this page-sequence is complete.
+ notifyPageSequenceComplete((PageSequence4a) this.currentFObj);
+ }
+ } catch (final FoTreeException e) {
+ throw new SAXException(e);
+ }
+ 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
@@ -386,8 +386,7 @@
}
/**
- * Remove an object from the collection of objects that should be notified
- * about FOTreeEvent firings.
+ * Remove an object from the collection of objects that should be notified about FOTreeEvent firings.
* @param listener the Object which should no longer be notified
*/
public void removeFOTreeListener(final FoTreeListener listener) {
@@ -413,8 +412,7 @@
}
/**
- * Notify all objects in the foTreeListeners that an "FoObj Complete"
- * FOTreeEvent has been fired.
+ * Notify all objects in the foTreeListeners that an "FoObj Complete" FOTreeEvent has been fired.
* @param fobj The FoObj instance that was just completed.
* @throws FoTreeException For errors while the event is being processed.
*/
@@ -432,8 +430,7 @@
}
/**
- * Notify all objects in the foTreeListeners that a "PageSequence Complete"
- * FOTreeEvent has been fired.
+ * Notify all objects in the foTreeListeners that a "PageSequence Complete" FOTreeEvent has been fired.
* @param pageSequence The PageSequence instance that was just completed.
* @throws FoTreeException For errors while the event is being processed.
*/
@@ -447,8 +444,7 @@
}
/**
- * Notify all objects in the foTreeListeners that a "Document Complete"
- * FOTreeEvent has been fired.
+ * Notify all objects in the foTreeListeners that a "Document Complete" FOTreeEvent has been fired.
* @throws FoTreeException For errors while the event is being processed.
*/
private void notifyDocumentComplete() throws FoTreeException {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|