diff options
author | Jeremias Maerki <jeremias@apache.org> | 2005-11-11 13:27:34 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2005-11-11 13:27:34 +0000 |
commit | 97581a9081ec184b9755bdc07ce049df9419ca06 (patch) | |
tree | 712588651e150a91b31c9159a7b94621fcc9decc /test/java/org/apache/fop/fotreetest | |
parent | 305c92099a465a9ce03be094cb3d9fb34721bb4b (diff) | |
download | xmlgraphics-fop-97581a9081ec184b9755bdc07ce049df9419ca06.tar.gz xmlgraphics-fop-97581a9081ec184b9755bdc07ce049df9419ca06.zip |
Made the FO tree a little more consistent by renaming getName() to getLocalName() and adding additional methods like: getNamespaceURI() and getNormalNamespacePrefix(). getName() now returns the fully qualified name combined from getLocalName() and getNormalNamespacePrefix(). For special cases you can call getName(String) to return a different namespace prefix.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@332545 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/java/org/apache/fop/fotreetest')
3 files changed, 10 insertions, 13 deletions
diff --git a/test/java/org/apache/fop/fotreetest/ext/AssertElement.java b/test/java/org/apache/fop/fotreetest/ext/AssertElement.java index f773c76a6..3f4fcceda 100644 --- a/test/java/org/apache/fop/fotreetest/ext/AssertElement.java +++ b/test/java/org/apache/fop/fotreetest/ext/AssertElement.java @@ -87,5 +87,10 @@ public class AssertElement extends TestObj { } + /** @see org.apache.fop.fo.FONode#getLocalName() */ + public String getLocalName() { + return "assert"; + } + } diff --git a/test/java/org/apache/fop/fotreetest/ext/TestElementMapping.java b/test/java/org/apache/fop/fotreetest/ext/TestElementMapping.java index 903250155..a17c6f0b2 100644 --- a/test/java/org/apache/fop/fotreetest/ext/TestElementMapping.java +++ b/test/java/org/apache/fop/fotreetest/ext/TestElementMapping.java @@ -41,13 +41,6 @@ public class TestElementMapping extends ElementMapping { if (foObjs == null) { foObjs = new java.util.HashMap(); foObjs.put("assert", new AssertMaker()); - foObjs.put(DEFAULT, new TestMaker()); - } - } - - static class TestMaker extends ElementMapping.Maker { - public FONode make(FONode parent) { - return new TestObj(parent); } } diff --git a/test/java/org/apache/fop/fotreetest/ext/TestObj.java b/test/java/org/apache/fop/fotreetest/ext/TestObj.java index 245f81b5d..f1ff71ab4 100644 --- a/test/java/org/apache/fop/fotreetest/ext/TestObj.java +++ b/test/java/org/apache/fop/fotreetest/ext/TestObj.java @@ -23,9 +23,9 @@ import org.apache.fop.fo.FONode; import org.apache.fop.fo.FObj; /** - * Catch all FOP Test objects as default element. + * Base class for all FOP Test objects. */ -public class TestObj extends FObj { +public abstract class TestObj extends FObj { /** * @see org.apache.fop.fo.FONode#FONode(FONode) @@ -34,11 +34,10 @@ public class TestObj extends FObj { super(parent); } - /** - * @see org.apache.fop.fo.XMLObj#getNameSpace() - */ - public String getNameSpace() { + /** @see org.apache.fop.fo.FONode#getNamespaceURI() */ + public String getNamespaceURI() { return TestElementMapping.NAMESPACE; } + } |