You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by st...@apache.org on 2002/08/02 09:06:21 UTC
cvs commit: xml-cocoon2/src/java/org/apache/cocoon/generation VelocityGenerator.java LinkStatusGenerator.java
stephan 2002/08/02 00:06:21
Modified: src/scratchpad/src/org/apache/cocoon/precept
InstanceTransformer.java
src/scratchpad/src/org/apache/cocoon/generation
TextParserGenerator.java
src/scratchpad/src/org/apache/cocoon/transformation
TextFragmentParserTransformer.java
src/scratchpad/src/org/apache/cocoon/components/source
BlobSource.java
src/java/org/apache/cocoon/transformation
XMLFormTransformer.java
src/java/org/apache/cocoon/generation VelocityGenerator.java
LinkStatusGenerator.java
Log:
Removed dead LogKit Logger imports, and also changed some things
to use the Avalon Logger instead.
Revision Changes Path
1.6 +0 -1 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/InstanceTransformer.java
Index: InstanceTransformer.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/InstanceTransformer.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- InstanceTransformer.java 6 Jun 2002 14:43:41 -0000 1.5
+++ InstanceTransformer.java 2 Aug 2002 07:06:20 -0000 1.6
@@ -124,7 +124,6 @@
import org.apache.cocoon.transformation.AbstractTransformer;
-import org.apache.log.Logger;
import org.xml.sax.Attributes;
1.5 +20 -24 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/generation/TextParserGenerator.java
Index: TextParserGenerator.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/generation/TextParserGenerator.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- TextParserGenerator.java 26 Jul 2002 12:43:23 -0000 1.4
+++ TextParserGenerator.java 2 Aug 2002 07:06:20 -0000 1.5
@@ -18,8 +18,6 @@
import org.apache.avalon.framework.configuration.Configurable;
import org.apache.avalon.framework.configuration.Configuration;
import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.logger.LogEnabled;
-import org.apache.avalon.framework.logger.Logger;
import org.apache.avalon.framework.parameters.ParameterException;
import org.apache.avalon.framework.parameters.Parameters;
@@ -67,7 +65,7 @@
* @version CVS $Id$
*/
public class TextParserGenerator extends ComposerGenerator
- implements CacheableProcessingComponent, LogEnabled {
+ implements CacheableProcessingComponent {
/** The URI of the parser exception */
public final static String URI = "http://chaperon.sourceforge.net/schema/parser-exception/1.0";
@@ -98,21 +96,12 @@
private Parser parser = null;
- private Logger avalonlogger = null;
-
- /**
- * Provide component with a logger.
- */
- public void enableLogging(Logger logger) {
- //super(logger); FIXME in future the LogEnabled interface should be used
- this.avalonlogger = logger;
- }
-
/**
* Recycle this component.
* All instance variables are set to <code>null</code>.
*/
public void recycle() {
+
if (this.inputSource!=null)
super.resolver.release(this.inputSource);
this.inputSource = null;
@@ -120,6 +109,13 @@
super.resolver.release(this.grammarSource);
this.grammarSource = null;
+ inputSource = null;
+ grammarSource = null;
+ grammar = null;
+ includeIgnorableTokens = false;
+ parsertable = null;
+ parser = null;
+
super.recycle();
}
@@ -155,7 +151,7 @@
if ((entry==null) ||
(entry.getValidity()==null) ||
(!entry.getValidity().isValid(this.grammarSource.getValidity()))) {
- this.avalonlogger.debug("(Re)building the parsertable from '"+this.grammarSource.getSystemId()+"'");
+ getLogger().debug("(Re)building the parsertable from '"+this.grammarSource.getSystemId()+"'");
SAXGrammarGenerator grammargenerator = new SAXGrammarGenerator();
SourceUtil.toSAX(this.grammarSource, grammargenerator, this.manager);
@@ -163,7 +159,7 @@
Grammar grammar = grammargenerator.getGrammar();
SyntaxErrorException see = grammar.validate();
if (see!=null) {
- this.avalonlogger.error("Grammar is not correct", see);
+ getLogger().error("Grammar is not correct", see);
throw new ProcessingException("Grammar is not correct", see);
}
@@ -173,23 +169,23 @@
store.store(this.grammarSource.getSystemId(), new ParserTableEntry(this.parsertable,
this.grammarSource.getValidity()));
} else {
- this.avalonlogger.debug("Getting parsertable from store for '"+this.grammarSource.getSystemId()+"'");
+ getLogger().debug("Getting parsertable from store for '"+this.grammarSource.getSystemId()+"'");
this.parsertable = entry.getParserTable();
}
this.inputSource = resolver.resolveURI(src);
} catch (ParameterException pe) {
- this.avalonlogger.error("Error during retrieving a parameter", pe);
+ getLogger().error("Error during retrieving a parameter", pe);
throw new ProcessingException("Error during retrieving a parameter", pe);
} catch (SourceException se) {
- this.avalonlogger.error("Error during resolving of '" + src + "'.", se);
+ getLogger().error("Error during resolving of '" + src + "'.", se);
throw new ProcessingException("Error during resolving of '" + src + "'.", se);
} catch (ComponentException ce) {
- this.avalonlogger.error("Could not lookup for component", ce);
+ getLogger().error("Could not lookup for component", ce);
throw new ProcessingException("Could not lookup for component", ce);
} catch (SyntaxErrorException see) {
- this.avalonlogger.error("Grammar is not correct", see);
+ getLogger().error("Grammar is not correct", see);
throw new ProcessingException("Grammar is not correct", see);
} finally {
if (store!=null)
@@ -235,7 +231,7 @@
try {
if (parser==null) {
parser = new Parser();
- parser.enableLogging(this.avalonlogger);
+ parser.enableLogging(getLogger());
}
EventQueue queue = parser.parse(this.parsertable, this.inputSource.getInputStream());
@@ -244,10 +240,10 @@
this.includeIgnorableTokens, false);
queue.fireEvents(adapter);
} catch (ParserException pe) {
- this.avalonlogger.error("Document ist not valid", pe);
+ getLogger().error("Document ist not valid", pe);
toSAX(super.contentHandler, pe);
} catch (SourceException se) {
- this.avalonlogger.error("Could not get inputstream from source", se);
+ getLogger().error("Could not get inputstream from source", se);
throw new ProcessingException("Could not get inputstream from source", se);
}
}
1.4 +11 -21 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/TextFragmentParserTransformer.java
Index: TextFragmentParserTransformer.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/TextFragmentParserTransformer.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- TextFragmentParserTransformer.java 24 Jul 2002 16:46:08 -0000 1.3
+++ TextFragmentParserTransformer.java 2 Aug 2002 07:06:20 -0000 1.4
@@ -64,7 +64,7 @@
* @version CVS $Id$
*/
public class TextFragmentParserTransformer extends AbstractTransformer
- implements Composable, Recyclable, Disposable, CacheableProcessingComponent, LogEnabled {
+ implements Composable, Recyclable, Disposable, CacheableProcessingComponent {
private static String EXTRACT_URI = "http://chaperon.sourceforge.net/schema/textfragment/1.0";
private static String EXTRACT_ELEMENT = "textfragment";
@@ -102,16 +102,6 @@
private Parser parser = null;
- private Logger avalonlogger = null;
-
- /**
- * Provide component with a logger.
- */
- public void enableLogging(Logger logger) {
- //super(logger); FIXME in future the LogEnabled interface should be used
- this.avalonlogger = logger;
- }
-
/**
* Pass the ComponentManager to the composer. The Composable
* implementation should use the specified ComponentManager
@@ -177,7 +167,7 @@
if ((entry==null) ||
(entry.getValidity()==null) ||
(!entry.getValidity().isValid(this.grammarSource.getValidity()))) {
- this.avalonlogger.debug("(Re)building the parsertable from '"+this.grammarSource.getSystemId()+"'");
+ getLogger().debug("(Re)building the parsertable from '"+this.grammarSource.getSystemId()+"'");
SAXGrammarGenerator grammargenerator = new SAXGrammarGenerator();
SourceUtil.toSAX(this.grammarSource, grammargenerator, this.manager);
@@ -185,7 +175,7 @@
Grammar grammar = grammargenerator.getGrammar();
SyntaxErrorException see = grammar.validate();
if (see!=null) {
- this.avalonlogger.error("Grammar is not correct", see);
+ getLogger().error("Grammar is not correct", see);
throw new ProcessingException("Grammar is not correct", see);
}
@@ -195,21 +185,21 @@
store.store(this.grammarSource.getSystemId(), new ParserTableEntry(this.parsertable,
this.grammarSource.getValidity()));
} else {
- this.avalonlogger.debug("Getting parsertable from store for '"+this.grammarSource.getSystemId()+"'");
+ getLogger().debug("Getting parsertable from store for '"+this.grammarSource.getSystemId()+"'");
this.parsertable = entry.getParserTable();
}
} catch (ParameterException pe) {
- this.avalonlogger.error("Error during retrieving a parameter", pe);
+ getLogger().error("Error during retrieving a parameter", pe);
throw new ProcessingException("Error during retrieving a parameter", pe);
} catch (SourceException se) {
- this.avalonlogger.error("Error during resolving of '" + src + "'.", se);
+ getLogger().error("Error during resolving of '" + src + "'.", se);
throw new ProcessingException("Error during resolving of '" + src + "'.", se);
} catch (ComponentException ce) {
- this.avalonlogger.error("Could not lookup for component", ce);
+ getLogger().error("Could not lookup for component", ce);
throw new ProcessingException("Could not lookup for component", ce);
} catch (SyntaxErrorException see) {
- this.avalonlogger.error("Grammar is not correct", see);
+ getLogger().error("Grammar is not correct", see);
throw new ProcessingException("Grammar is not correct", see);
} finally {
if (store!=null)
@@ -282,7 +272,7 @@
try {
if (parser==null) {
parser = new Parser();
- parser.enableLogging(this.avalonlogger);
+ parser.enableLogging(getLogger());
}
EventQueue queue = parser.parse(this.parsertable,
@@ -293,7 +283,7 @@
//adapter.enableLogging(getLogger());
queue.fireEvents(adapter);
} catch (ParserException pe) {
- this.avalonlogger.error("Document ist not valid", pe);
+ getLogger().error("Document ist not valid", pe);
EmbeddedXMLPipe pipe = new EmbeddedXMLPipe(super.contentHandler);
toSAX(pipe, pe);
}
1.4 +2 -3 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/source/BlobSource.java
Index: BlobSource.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/source/BlobSource.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- BlobSource.java 26 Apr 2002 10:42:17 -0000 1.3
+++ BlobSource.java 2 Aug 2002 07:06:20 -0000 1.4
@@ -55,10 +55,9 @@
package org.apache.cocoon.components.source;
import org.apache.avalon.framework.component.ComponentManager;
-import org.apache.log.Logger;
+import org.apache.avalon.framework.component.ComponentSelector;
import org.apache.avalon.excalibur.datasource.DataSourceComponent;
-import org.apache.avalon.framework.component.ComponentSelector;
import org.apache.cocoon.ProcessingException;
1.9 +0 -1 xml-cocoon2/src/java/org/apache/cocoon/transformation/XMLFormTransformer.java
Index: XMLFormTransformer.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/XMLFormTransformer.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- XMLFormTransformer.java 28 Jul 2002 14:04:41 -0000 1.8
+++ XMLFormTransformer.java 2 Aug 2002 07:06:20 -0000 1.9
@@ -66,7 +66,6 @@
import org.w3c.dom.DocumentFragment;
-import org.apache.log.Logger;
import org.apache.avalon.framework.parameters.Parameters;
import org.apache.cocoon.ProcessingException;
1.11 +1 -2 xml-cocoon2/src/java/org/apache/cocoon/generation/VelocityGenerator.java
Index: VelocityGenerator.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/generation/VelocityGenerator.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- VelocityGenerator.java 19 Jul 2002 13:09:31 -0000 1.10
+++ VelocityGenerator.java 2 Aug 2002 07:06:21 -0000 1.11
@@ -62,7 +62,6 @@
import org.apache.avalon.framework.parameters.Parameters;
import org.apache.avalon.framework.parameters.ParameterException;
import org.apache.excalibur.source.Source;
-import org.apache.log.Logger;
import org.apache.cocoon.ProcessingException;
import org.apache.cocoon.ResourceNotFoundException;
import org.apache.cocoon.environment.ObjectModelHelper;
1.4 +0 -1 xml-cocoon2/src/java/org/apache/cocoon/generation/LinkStatusGenerator.java
Index: LinkStatusGenerator.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/generation/LinkStatusGenerator.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- LinkStatusGenerator.java 30 Jun 2002 19:50:50 -0000 1.3
+++ LinkStatusGenerator.java 2 Aug 2002 07:06:21 -0000 1.4
@@ -12,7 +12,6 @@
import org.apache.cocoon.util.Tokenizer;
import org.apache.regexp.RE;
import org.apache.regexp.RESyntaxException;
-import org.apache.log.Logger;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.AttributesImpl;
----------------------------------------------------------------------
In case of troubles, e-mail: webmaster@xml.apache.org
To unsubscribe, e-mail: cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org