Author: vgritsenko
Date: Thu Oct 7 07:25:45 2004
New Revision: 53978
Modified:
cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/xml/AbstractDOMFragment.java
cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/xml/AbstractSAXFragment.java
cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/xml/AbstractXMLPipe.java
cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/xml/AbstractXMLProducer.java
cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/xml/XMLFragment.java
Log:
javadoc changes mostly
Modified:
cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/xml/AbstractDOMFragment.java
==============================================================================
---
cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/xml/AbstractDOMFragment.java
(original)
+++
cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/xml/AbstractDOMFragment.java
Thu Oct 7 07:25:45 2004
@@ -1,12 +1,12 @@
/*
* Copyright 1999-2004 The Apache Software Foundation.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -26,31 +26,29 @@
import javax.xml.parsers.ParserConfigurationException;
/**
- * Abstract implementation of [EMAIL PROTECTED] XMLFragment} for objects that
are more easily represented
- * as a DOM.
- * <br/>
- * The toSAX() method is implemented by streaming (using a
<code>DOMStreamer</code>)
- * the results of <code>toDOM()</code> that must be implemented by concrete
subclasses.
+ * Abstract implementation of [EMAIL PROTECTED] XMLFragment} for objects that
are more
+ * easily represented as a DOM.
+ *
+ * <p>The [EMAIL PROTECTED] #toSAX} method is implemented by streaming (using a
+ * [EMAIL PROTECTED] DOMStreamer}) the results of the [EMAIL PROTECTED]
#toDOM} that must be
+ * implemented by concrete subclasses.</p>
*
* @author <a href="mailto:[EMAIL PROTECTED]">Sylvain Wallez</a>
- * @version CVS $Id: AbstractDOMFragment.java,v 1.3 2004/03/05 13:03:01
bdelacretaz Exp $
+ * @version CVS $Id$
*/
-
public abstract class AbstractDOMFragment implements XMLFragment {
/**
* Generates SAX events representing the object's state by serializing the
* result of <code>toDOM()</code>.
*/
-
public void toSAX(ContentHandler handler) throws SAXException {
// The ComponentManager is unknown here : use JAXP to create a document
DocumentBuilder builder;
try {
builder =
DocumentBuilderFactory.newInstance().newDocumentBuilder();
- }
- catch (ParserConfigurationException pce) {
- throw new SAXException("Couldn't get a DocumentBuilder", pce);
+ } catch (ParserConfigurationException e) {
+ throw new SAXException("Couldn't get a DocumentBuilder", e);
}
Document doc = builder.newDocument();
@@ -62,15 +60,13 @@
// Build the DOM representation of this object
try {
toDOM(df);
- }
- catch(Exception e) {
+ } catch(Exception e) {
throw new SAXException("Exception while converting object to DOM",
e);
}
// Stream the document fragment
handler.startDocument();
- DOMStreamer streamer = new DOMStreamer(handler);
- streamer.stream(df);
+ new DOMStreamer(handler).stream(df);
handler.endDocument();
}
}
Modified:
cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/xml/AbstractSAXFragment.java
==============================================================================
---
cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/xml/AbstractSAXFragment.java
(original)
+++
cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/xml/AbstractSAXFragment.java
Thu Oct 7 07:25:45 2004
@@ -1,12 +1,12 @@
/*
* Copyright 1999-2004 The Apache Software Foundation.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -19,25 +19,23 @@
import org.w3c.dom.Node;
/**
- * Abstract implementation of [EMAIL PROTECTED] XMLFragment} for objects that
are more easily represented
- * as SAX events.
- * <br/>
- * The toDOM() method is implemented by piping in a <code>DOMBuilder</code>
the results
- * of <code>toSAX()</code> that must be implemented by concrete subclasses.
+ * Abstract implementation of [EMAIL PROTECTED] XMLFragment} for objects that
are more
+ * easily represented as SAX events.
+ *
+ * <p>The [EMAIL PROTECTED] #toDOM} method is implemented by piping in a
[EMAIL PROTECTED] DOMBuilder}
+ * the results of [EMAIL PROTECTED] #toSAX} that must be implemented by
concrete
+ * subclasses.</p>
*
* @author <a href="mailto:[EMAIL PROTECTED]">Sylvain Wallez</a>
- * @version CVS $Id: AbstractSAXFragment.java,v 1.2 2004/03/05 13:03:01
bdelacretaz Exp $
+ * @version CVS $Id$
*/
-
public abstract class AbstractSAXFragment implements XMLFragment {
/**
- * Appends children representing the object's state to the given node by
using
- * the results of <code>toSAX()</code>.
+ * Appends children representing the object's state to the given node
+ * by using the results of <code>toSAX()</code>.
*/
- public void toDOM(Node node) throws Exception
- {
- DOMBuilder builder = new DOMBuilder(node);
- this.toSAX(builder);
+ public void toDOM(Node node) throws Exception {
+ toSAX(new DOMBuilder(node));
}
}
Modified:
cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/xml/AbstractXMLPipe.java
==============================================================================
---
cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/xml/AbstractXMLPipe.java
(original)
+++
cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/xml/AbstractXMLPipe.java
Thu Oct 7 07:25:45 2004
@@ -1,12 +1,12 @@
/*
* Copyright 1999-2004 The Apache Software Foundation.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -24,11 +24,10 @@
* handlers and lexical handlers.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Stefano Mazzocchi</a>
- * @version CVS $Id: AbstractXMLPipe.java,v 1.2 2004/03/05 13:03:01
bdelacretaz Exp $
+ * @version CVS $Id$
*/
-public abstract class AbstractXMLPipe
-extends AbstractXMLProducer
-implements XMLPipe {
+public abstract class AbstractXMLPipe extends AbstractXMLProducer
+ implements XMLPipe {
/**
* Receive an object for locating the origin of SAX document events.
Modified:
cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/xml/AbstractXMLProducer.java
==============================================================================
---
cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/xml/AbstractXMLProducer.java
(original)
+++
cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/xml/AbstractXMLProducer.java
Thu Oct 7 07:25:45 2004
@@ -1,12 +1,12 @@
/*
* Copyright 1999-2004 The Apache Software Foundation.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -26,11 +26,10 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Pierpaolo Fumagalli</a>
* (Apache Software Foundation)
- * @version CVS $Id: AbstractXMLProducer.java,v 1.3 2004/03/18 18:33:13 joerg
Exp $
+ * @version CVS $Id$
*/
-public abstract class AbstractXMLProducer
-extends AbstractLogEnabled
-implements XMLProducer, Recyclable {
+public abstract class AbstractXMLProducer extends AbstractLogEnabled
+ implements XMLProducer, Recyclable {
/** The <code>XMLConsumer</code> receiving SAX events. */
protected XMLConsumer xmlConsumer;
Modified:
cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/xml/XMLFragment.java
==============================================================================
---
cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/xml/XMLFragment.java
(original)
+++
cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/xml/XMLFragment.java
Thu Oct 7 07:25:45 2004
@@ -1,12 +1,12 @@
/*
* Copyright 1999-2004 The Apache Software Foundation.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,25 +20,18 @@
/**
* This interface must be implemented by classes willing
* to provide an XML representation of their current state.
- * <br/>
- * This interface exists in both Cocoon 1 and Cocoon 2 and to ensure
- * a minimal compatibility between the two versions.
- * <br/>
- * Cocoon 2 only objects can implement the SAX-only <code>XMLizable</code>
- * interface.
+ *
+ * <p>This interface exists in both Cocoon 1 and Cocoon 2 and to ensure
+ * a minimal compatibility between the two versions.</p>
+ *
+ * <p>Cocoon 2 only objects can implement the SAX-only <code>XMLizable</code>
+ * interface.</p>
*
* @author <a href="mailto:[EMAIL PROTECTED]">Sylvain Wallez</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Ricardo Rocha</a> for the
original XObject class
- * @version CVS $Id: XMLFragment.java,v 1.2 2004/03/05 13:03:01 bdelacretaz
Exp $
+ * @version CVS $Id$
*/
-
public interface XMLFragment extends org.apache.excalibur.xml.sax.XMLizable {
-// Now inherited from XMLizable
-// /**
-// * Generates SAX events representing the object's state
-// * for the given content handler.
-// */
-// void toSAX(ContentHandler handler) throws SAXException;
/**
* Appends children representing the object's state to the given node.