Return-Path: Delivered-To: apmail-cocoon-cvs-archive@www.apache.org Received: (qmail 53928 invoked from network); 13 Apr 2005 22:11:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 13 Apr 2005 22:11:33 -0000 Received: (qmail 30400 invoked by uid 500); 13 Apr 2005 22:11:26 -0000 Delivered-To: apmail-cocoon-cvs-archive@cocoon.apache.org Received: (qmail 30337 invoked by uid 500); 13 Apr 2005 22:11:26 -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: Delivered-To: mailing list cvs@cocoon.apache.org Received: (qmail 30322 invoked by uid 99); 13 Apr 2005 22:11:25 -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 minotaur.apache.org (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Wed, 13 Apr 2005 15:11:24 -0700 Received: (qmail 53730 invoked by uid 65534); 13 Apr 2005 22:11:23 -0000 Message-ID: <20050413221123.53728.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mailer: svnmailer-1.0.0-dev Date: Wed, 13 Apr 2005 22:11:23 -0000 Subject: svn commit: r161225 - cocoon/trunk/src/java/org/apache/cocoon/components/source/impl/SitemapSource.java To: cvs@cocoon.apache.org From: vgritsenko@apache.org X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: vgritsenko Date: Wed Apr 13 15:11:22 2005 New Revision: 161225 URL: http://svn.apache.org/viewcvs?view=3Drev&rev=3D161225 Log: return null validity when validity is null. ahem. Modified: cocoon/trunk/src/java/org/apache/cocoon/components/source/impl/SitemapS= ource.java Modified: cocoon/trunk/src/java/org/apache/cocoon/components/source/impl/Si= temapSource.java URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/= components/source/impl/SitemapSource.java?view=3Ddiff&r1=3D161224&r2=3D1612= 25 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- cocoon/trunk/src/java/org/apache/cocoon/components/source/impl/SitemapS= ource.java (original) +++ cocoon/trunk/src/java/org/apache/cocoon/components/source/impl/SitemapS= ource.java Wed Apr 13 15:11:22 2005 @@ -1,5 +1,5 @@ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Copyright 1999-2005 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. @@ -51,13 +51,13 @@ * by invoking a pipeline. * * @author Carsten Ziegeler - * @version CVS $Id$ + * @version $Id$ */ public final class SitemapSource -extends AbstractLogEnabled -implements Source, XMLizable { + extends AbstractLogEnabled + implements Source, XMLizable { =20 - /** validities for the internal pipeline */ + /** The internal event pipeline validities */ private SitemapSourceValidity validity; =20 /** The system id */ @@ -200,6 +200,7 @@ } finally { EnvironmentHelper.leaveProcessor(); } + return new ByteArrayInputStream(os.toByteArray()); =20 } catch (ResourceNotFoundException e) { @@ -214,14 +215,14 @@ } =20 /** - * Return the unique identifer for this source + * Returns the unique identifer for this source */ public String getURI() { return this.systemIdForCaching; } =20 /** - * + * Returns true always. * @see org.apache.excalibur.source.Source#exists() */ public boolean exists() { @@ -229,13 +230,11 @@ } =20 /** - * Get the Validity object. This can either wrap the last modification - * date or the expires information or... - * If it is currently not possible to calculate such an information - * null is returned. + * Get the validity object. This wraps validity of the enclosed event + * pipeline. If pipeline is not cacheable, null is return= ed. */ public SourceValidity getValidity() { - return this.validity; + return this.validity.getNestedValidity() =3D=3D null? null: this.v= alidity; } =20 /** @@ -431,33 +430,33 @@ */ public static final class SitemapSourceValidity implements SourceValid= ity { =20 - private SourceValidity nested_validity =3D null; + private SourceValidity validity; =20 private SitemapSourceValidity() { super(); } =20 private void set(SourceValidity validity) { - this.nested_validity =3D validity; + this.validity =3D validity; } =20 public int isValid() { - return(this.nested_validity !=3D null? - this.nested_validity.isValid(): - SourceValidity.INVALID); + return (this.validity !=3D null ? + this.validity.isValid() : + SourceValidity.INVALID); } =20 public int isValid(SourceValidity validity) { if (validity instanceof SitemapSourceValidity) { - return(this.nested_validity !=3D null? - this.nested_validity.isValid(((SitemapSourceValidi= ty) validity).getNestedValidity()): + return (this.validity !=3D null ? + this.validity.isValid(((SitemapSourceValidity) val= idity).getNestedValidity()) : SourceValidity.INVALID); } return SourceValidity.INVALID; } =20 public SourceValidity getNestedValidity() { - return this.nested_validity; + return this.validity; } } }