cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cross...@apache.org
Subject svn commit: r125040 - /cocoon/branches/BRANCH_2_1_X/tools/src/anttasks/SitemapTask.java
Date Thu, 13 Jan 2005 05:41:07 GMT
Author: crossley
Date: Wed Jan 12 21:41:04 2005
New Revision: 125040

URL: http://svn.apache.org/viewcvs?view=rev&rev=125040
Log:
Merge some of the changes from trunk. Quick fix to enable parse of blocks docs.

Modified:
   cocoon/branches/BRANCH_2_1_X/tools/src/anttasks/SitemapTask.java

Modified: cocoon/branches/BRANCH_2_1_X/tools/src/anttasks/SitemapTask.java
Url: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/tools/src/anttasks/SitemapTask.java?view=diff&rev=125040&p1=cocoon/branches/BRANCH_2_1_X/tools/src/anttasks/SitemapTask.java&r1=125039&p2=cocoon/branches/BRANCH_2_1_X/tools/src/anttasks/SitemapTask.java&r2=125040
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/tools/src/anttasks/SitemapTask.java	(original)
+++ cocoon/branches/BRANCH_2_1_X/tools/src/anttasks/SitemapTask.java	Wed Jan 12 21:41:04 2005
@@ -411,7 +411,22 @@
         public SitemapComponent(JavaClass javaClass) {
             this.javaClass = javaClass;
             
-            this.name = javaClass.getTagByName( NAME_TAG ).getValue();            
+            this.name = this.javaClass.getTagByName( NAME_TAG ).getValue();
+            // TEST CODE
+            System.out.println("Name: " + this.name);
+            System.out.println("className: " + this.javaClass.getName());
+            System.out.println();
+            
+            
+            JavaClass[] jc = this.javaClass.getImplementedInterfaces();
+            if (jc.length> 0) {
+                System.out.println("Implemented interfaces:");
+            }
+            for (int i = 0; i < jc.length; i++) {
+                System.out.println(jc[i].getName() + ". Full name: " + jc[i].getFullyQualifiedName());
+            }
+            System.out.println("==== END of implements ===");
+            // END TEST CODE
             this.type = getType(this.javaClass);
         }
         
@@ -711,6 +726,25 @@
                 return "selector";
             } else if ( clazz.isA(PIPELINE) ) {
                 return "pipe";
+            // Should qdox resolve recursively? ie: HTMLGenerator isA ServiceableGenerator
isA AbstractGenerator isA Generator
+            } else if ( clazz.getPackage().equals("org.apache.cocoon.generation") &&
(clazz.isA("Generator") || clazz.isA("ServiceableGenerator")) ) {
+                return "generator";
+            } else if ( clazz.isA("org.apache.cocoon.generation.ServiceableGenerator") )
{
+                return "generator";
+            } else if ( clazz.getPackage().equals("org.apache.cocoon.transformation") &&
clazz.isA("Transformer") ) {
+                return "transformer";
+            } else if ( clazz.getPackage().equals("org.apache.cocoon.reading") &&
clazz.isA("Reader") ) {
+                return "reader";
+            } else if ( clazz.getPackage().equals("org.apache.cocoon.serialization") &&
clazz.isA("Serializer") ) {
+                return "serializer";
+            } else if ( clazz.getPackage().equals("org.apache.cocoon.acting") &&
clazz.isA("Action") ) {
+                return "action";
+            } else if ( clazz.getPackage().equals("org.apache.cocoon.matching") &&
clazz.isA("Matcher") ) {
+                return "matcher";
+            } else if ( clazz.getPackage().equals("org.apache.cocoon.selection") &&
clazz.isA("Selector") ) {
+                return "selector";
+            } else if ( clazz.getPackage().equals("org.apache.cocoon.components.pipeline")
&& clazz.isA("ProcessingPipeline") ) {
+                return "selector";
             } else {
                 throw new BuildException("Sitemap component " + clazz.getFullyQualifiedName()
+ " does not implement a sitemap component interface.");
             }            
@@ -749,7 +783,6 @@
                 throw new BuildException(e);
             }
         }
-    
     }
     
     // Class Constants

Mime
View raw message