Revision: 12902
http://sourceforge.net/p/foray/code/12902
Author: victormote
Date: 2022-12-20 23:49:27 +0000 (Tue, 20 Dec 2022)
Log Message:
-----------
Push some identical code in subclasses to the superclass.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/ForeignXml.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/math/obj/InstreamMathElement.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/svg/obj/InstreamSvgElement.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/ForeignXml.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/ForeignXml.java 2022-12-20 23:39:15 UTC (rev 12901)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/ForeignXml.java 2022-12-20 23:49:27 UTC (rev 12902)
@@ -31,6 +31,7 @@
import org.foray.fotree.fo.obj.InstreamForeignObject4a;
import org.axsl.fotree.FoTreeException;
+import org.axsl.fotree.FoVisitor;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -260,13 +261,42 @@
}
@Override
- public FoObj formattingObjectChildAt(final int index) {
- return null;
+ public boolean isPcdataContent() {
+ return false;
}
@Override
- public boolean isPcdataContent() {
+ protected void end() throws FoTreeException {
+ }
+
+ @Override
+ public <T> T acceptVisitor(final FoVisitor<T> visitor) {
+ return visitor.visit(this);
+ }
+
+ @Override
+ public boolean isValid() {
+ return this.getDocument() != null;
+ }
+
+ @Override
+ public boolean canHaveMarkerChildren() {
return false;
}
+ @Override
+ public boolean canHavePcdataChildren() {
+ return false;
+ }
+
+ @Override
+ public boolean canHaveInlineChildren() {
+ return false;
+ }
+
+ @Override
+ public boolean canHaveBlockChildren() {
+ return false;
+ }
+
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/math/obj/InstreamMathElement.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/math/obj/InstreamMathElement.java 2022-12-20 23:39:15 UTC (rev 12901)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/math/obj/InstreamMathElement.java 2022-12-20 23:49:27 UTC (rev 12902)
@@ -35,7 +35,6 @@
import org.foray.xml.domImpl.MathMlDocument4a;
import org.axsl.fotree.FoTreeException;
-import org.axsl.fotree.FoVisitor;
import org.w3c.dom.mathml.MathMLDocument;
@@ -65,45 +64,11 @@
}
@Override
- protected void end() throws FoTreeException {
- }
-
- @Override
public Namespace getNamespace() {
return this.getFoTree().getMathNamespace();
}
@Override
- public <T> T acceptVisitor(final FoVisitor<T> visitor) {
- return visitor.visit(this);
- }
-
- @Override
- public boolean isValid() {
- return this.document != null;
- }
-
- @Override
- public boolean canHaveMarkerChildren() {
- return false;
- }
-
- @Override
- public boolean canHavePcdataChildren() {
- return false;
- }
-
- @Override
- public boolean canHaveInlineChildren() {
- return false;
- }
-
- @Override
- public boolean canHaveBlockChildren() {
- return false;
- }
-
- @Override
public MathMLDocument getDocument() {
return this.document;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/svg/obj/InstreamSvgElement.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/svg/obj/InstreamSvgElement.java 2022-12-20 23:39:15 UTC (rev 12901)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/svg/obj/InstreamSvgElement.java 2022-12-20 23:49:27 UTC (rev 12902)
@@ -35,7 +35,6 @@
import org.axsl.constants.XmlConstants;
import org.axsl.fotree.FoTreeException;
-import org.axsl.fotree.FoVisitor;
import org.apache.batik.anim.dom.SVGDOMImplementation;
import org.w3c.dom.DOMImplementation;
@@ -68,45 +67,11 @@
}
@Override
- protected void end() throws FoTreeException {
- }
-
- @Override
public Namespace getNamespace() {
return this.getFoTree().getSVGNamespace();
}
@Override
- public <T> T acceptVisitor(final FoVisitor<T> visitor) {
- return visitor.visit(this);
- }
-
- @Override
- public boolean isValid() {
- return this.document != null;
- }
-
- @Override
- public boolean canHaveMarkerChildren() {
- return false;
- }
-
- @Override
- public boolean canHavePcdataChildren() {
- return false;
- }
-
- @Override
- public boolean canHaveInlineChildren() {
- return false;
- }
-
- @Override
- public boolean canHaveBlockChildren() {
- return false;
- }
-
- @Override
public SVGDocument getDocument() {
return this.document;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|