Return-Path: Delivered-To: apmail-cocoon-cvs-archive@www.apache.org Received: (qmail 17897 invoked from network); 28 Sep 2005 22:04:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 28 Sep 2005 22:04:15 -0000 Received: (qmail 9224 invoked by uid 500); 28 Sep 2005 22:04:14 -0000 Delivered-To: apmail-cocoon-cvs-archive@cocoon.apache.org Received: (qmail 9169 invoked by uid 500); 28 Sep 2005 22:04:13 -0000 Mailing-List: contact cvs-help@cocoon.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@cocoon.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@cocoon.apache.org Received: (qmail 9155 invoked by uid 99); 28 Sep 2005 22:04:13 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 28 Sep 2005 15:04:13 -0700 Received: (qmail 17435 invoked by uid 65534); 28 Sep 2005 22:03:53 -0000 Message-ID: <20050928220353.17434.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r292327 - in /cocoon/trunk: ./ src/java/org/apache/cocoon/components/source/impl/ src/webapp/WEB-INF/xconf/ Date: Wed, 28 Sep 2005 22:03:51 -0000 To: cvs@cocoon.apache.org From: vgritsenko@apache.org X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: vgritsenko Date: Wed Sep 28 15:03:40 2005 New Revision: 292327 URL: http://svn.apache.org/viewcvs?rev=292327&view=rev Log: rename create-document: to empty: Added: cocoon/trunk/src/java/org/apache/cocoon/components/source/impl/EmptySource.java - copied, changed from r292307, cocoon/trunk/src/java/org/apache/cocoon/components/source/impl/CreateDocumentSource.java cocoon/trunk/src/java/org/apache/cocoon/components/source/impl/EmptySourceFactory.java - copied, changed from r292307, cocoon/trunk/src/java/org/apache/cocoon/components/source/impl/CreateDocumentSourceFactory.java Removed: cocoon/trunk/src/java/org/apache/cocoon/components/source/impl/CreateDocumentSource.java cocoon/trunk/src/java/org/apache/cocoon/components/source/impl/CreateDocumentSourceFactory.java Modified: cocoon/trunk/src/webapp/WEB-INF/xconf/cocoon-core.xconf cocoon/trunk/status.xml Copied: cocoon/trunk/src/java/org/apache/cocoon/components/source/impl/EmptySource.java (from r292307, cocoon/trunk/src/java/org/apache/cocoon/components/source/impl/CreateDocumentSource.java) URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/components/source/impl/EmptySource.java?p2=cocoon/trunk/src/java/org/apache/cocoon/components/source/impl/EmptySource.java&p1=cocoon/trunk/src/java/org/apache/cocoon/components/source/impl/CreateDocumentSource.java&r1=292307&r2=292327&rev=292327&view=diff ============================================================================== --- cocoon/trunk/src/java/org/apache/cocoon/components/source/impl/CreateDocumentSource.java (original) +++ cocoon/trunk/src/java/org/apache/cocoon/components/source/impl/EmptySource.java Wed Sep 28 15:03:40 2005 @@ -30,27 +30,31 @@ import org.xml.sax.SAXException; /** - * A Source that generates an empty XML document or an - * XML document just containing a root node. - * The URI syntax is "create-document:" or "create-document:ROOT_ELEMENT_NAME". + * A Source that generates completely empty XML document or an + * XML document that contains just a root node. * - * @version $Id:$ + *

+ * The URI syntax is empty: for completely empty XML document + * or create-document:root-element for document with root element, + * where root-element is the name of the root element to create. + * + * @version $Id$ * @since 2.1.8 */ -public class CreateDocumentSource - implements XMLizable, Source { +public class EmptySource implements XMLizable, Source { protected String rootElementName; protected String scheme; protected String uri; protected String xmlDocument; - public CreateDocumentSource(String location) { + public EmptySource(String location) { this.uri = location; final int pos = location.indexOf(':'); this.scheme = location.substring(0, pos); - final String rootName = location.substring(pos+1); - if (rootName != null && rootName.trim().length() > 0 ) { + + final String rootName = location.substring(pos + 1); + if (rootName != null && rootName.trim().length() > 0) { this.rootElementName = rootName.trim(); this.xmlDocument = '<' + this.rootElementName + "/>"; } else { @@ -63,7 +67,7 @@ */ public void toSAX(ContentHandler handler) throws SAXException { handler.startDocument(); - if ( rootElementName != null ) { + if (rootElementName != null) { XMLUtils.createElement(handler, this.rootElementName); } handler.endDocument(); @@ -132,5 +136,4 @@ public void refresh() { // nothing to do here } - } Copied: cocoon/trunk/src/java/org/apache/cocoon/components/source/impl/EmptySourceFactory.java (from r292307, cocoon/trunk/src/java/org/apache/cocoon/components/source/impl/CreateDocumentSourceFactory.java) URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/components/source/impl/EmptySourceFactory.java?p2=cocoon/trunk/src/java/org/apache/cocoon/components/source/impl/EmptySourceFactory.java&p1=cocoon/trunk/src/java/org/apache/cocoon/components/source/impl/CreateDocumentSourceFactory.java&r1=292307&r2=292327&rev=292327&view=diff ============================================================================== --- cocoon/trunk/src/java/org/apache/cocoon/components/source/impl/CreateDocumentSourceFactory.java (original) +++ cocoon/trunk/src/java/org/apache/cocoon/components/source/impl/EmptySourceFactory.java Wed Sep 28 15:03:40 2005 @@ -25,33 +25,31 @@ import org.apache.excalibur.source.SourceFactory; /** - * A factory for 'create-document:' sources (see {@link CreateDocumentSource}). - * - * @version $Id:$ + * A factory for 'empty:' sources (see {@link EmptySource}). + * + * @version $Id$ * @since 2.1.8 */ -public class CreateDocumentSourceFactory - extends AbstractLogEnabled - implements SourceFactory, ThreadSafe { - +public class EmptySourceFactory extends AbstractLogEnabled + implements SourceFactory, ThreadSafe { + /** - * Get a {@link CreateDocumentSource} object. - * + * Get an {@link EmptySource} object. + * * @param location The URI to resolve - this URI includes the scheme. * @param parameters this is optional and not used here * * @see org.apache.excalibur.source.SourceFactory#getSource(java.lang.String, java.util.Map) */ - public Source getSource( String location, Map parameters ) + public Source getSource(String location, Map parameters) throws IOException, MalformedURLException { - return new CreateDocumentSource(location); + return new EmptySource(location); } - + /** * @see org.apache.excalibur.source.SourceFactory#release(org.apache.excalibur.source.Source) */ - public void release( Source source ) { + public void release(Source source) { // Do nothing here } - } Modified: cocoon/trunk/src/webapp/WEB-INF/xconf/cocoon-core.xconf URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/webapp/WEB-INF/xconf/cocoon-core.xconf?rev=292327&r1=292326&r2=292327&view=diff ============================================================================== --- cocoon/trunk/src/webapp/WEB-INF/xconf/cocoon-core.xconf (original) +++ cocoon/trunk/src/webapp/WEB-INF/xconf/cocoon-core.xconf Wed Sep 28 15:03:40 2005 @@ -539,8 +539,7 @@ - - +