You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cz...@apache.org on 2003/02/07 08:25:31 UTC
cvs commit: xml-cocoon2/src/scratchpad/src/org/apache/cocoon/util ResizableContainer.java
cziegeler 2003/02/06 23:25:31
Modified: src/scratchpad/src/org/apache/cocoon/precept/stores/bean/test
Tag: cocoon_2_0_3_branch
CocoonInstallationBean.java UserBean.java
SystemBean.java
src/scratchpad/src/org/apache/cocoon/precept/preceptors Tag:
cocoon_2_0_3_branch PreceptorBuilder.java
AbstractPreceptor.java
src/scratchpad/src/org/apache/cocoon/precept Tag:
cocoon_2_0_3_branch InstanceTransformer.java
InvalidXPathSyntaxException.java Constraint.java
Context.java PreceptorViolationException.java
Preceptor.java Instance.java InstanceFactory.java
NoSuchNodeException.java
src/scratchpad/src/org/apache/cocoon/precept/preceptors/easyrelax/constraints
Tag: cocoon_2_0_3_branch ChoiceConstraint.java
RegexprConstraint.java AbstractConstraint.java
src/scratchpad/src/org/apache/cocoon/precept/stores/bean
Tag: cocoon_2_0_3_branch InstanceImpl.java
src/scratchpad/src/org/apache/cocoon/sunshine/xml Tag:
cocoon_2_0_3_branch XMLUtil.java NodeListImpl.java
src/scratchpad/src/org/apache/cocoon/precept/preceptors/easyrelax
Tag: cocoon_2_0_3_branch ConstraintFactory.java
ElementPreceptorNode.java
AbstractPreceptorNode.java
PreceptorBuilderImpl.java PreceptorImpl.java
AttributePreceptorNode.java
src/scratchpad/src/org/apache/cocoon/transformation/constrained
Tag: cocoon_2_0_3_branch ElementEventListener.java
XmlTreeConstraint.java ElementValueEvent.java
ElementEventAdapter.java
ContainerElementEndEvent.java
AbstractConstrainedTransformer.java
src/scratchpad/src/org/apache/cocoon/sunshine/context Tag:
cocoon_2_0_3_branch SessionContext.java
StandardSessionContextProvider.java
ResponseSessionContext.java
RequestSessionContext.java
SessionContextProvider.java
SimpleSessionContext.java
src/scratchpad/src/org/apache/cocoon/transformation Tag:
cocoon_2_0_3_branch XMLDBTransformer.java
AsynchronousCIncludeTransformer.java
Chart2SvgTransformer.java
src/scratchpad/src/org/apache/cocoon/sunshine/sunspot/sunlet
Tag: cocoon_2_0_3_branch SunLetThread.java
Sunlet.java
src/scratchpad/src/org/apache/cocoon/sunshine/sunspot/context
Tag: cocoon_2_0_3_branch
SessionContextProviderImpl.java
SessionContextImpl.java
src/scratchpad/src/org/apache/cocoon/callback Tag:
cocoon_2_0_3_branch XMLCallBack.java
XMLEventDescriptor.java XMLSource.java
DefaultCallBackHandler.java CallBackHandler.java
src/scratchpad/src/org/apache/cocoon/precept/stores/dom/simple
Tag: cocoon_2_0_3_branch InstanceImpl.java
Node.java AttributeNode.java ElementNode.java
src/scratchpad/src/org/apache/cocoon/reading Tag:
cocoon_2_0_3_branch ImageReader.java
DirectoryZipArchiver.java
src/scratchpad/src/org/apache/cocoon/sunshine/connector Tag:
cocoon_2_0_3_branch XMLSaver.java
ResourceConnector.java XMLLoader.java
ResourceConnectorImpl.java Resource.java
src/scratchpad/src/org/apache/cocoon/sunshine/sunrise/acting
Tag: cocoon_2_0_3_branch LogoutAction.java
AuthAction.java LoggedInAction.java
LoginAction.java
src/scratchpad/src/org/apache/cocoon/transformation/pagination
Tag: cocoon_2_0_3_branch ItemGroup.java
Pagesheet.java PageRules.java Paginator.java
src/scratchpad/src/org/apache/cocoon/sunshine/sunrise Tag:
cocoon_2_0_3_branch ApplicationHandler.java
SunRise.java Handler.java Constants.java
src/scratchpad/src/org/apache/cocoon/sunshine/sunrise/generation
Tag: cocoon_2_0_3_branch
ConfigurationGenerator.java
src/scratchpad/src/org/apache/cocoon/sunshine/helpers Tag:
cocoon_2_0_3_branch URLRewriter.java
src/scratchpad/src/org/apache/cocoon/transformation/asynchronous
Tag: cocoon_2_0_3_branch AsyncHelper.java
PooledThread.java XMLByteStreamFileInterpreter.java
ThreadPool.java XMLByteStreamFileCompiler.java
VariableHardResourceLimitingPool.java
XMLByteStreamFile.java
src/scratchpad/src/org/apache/cocoon/sunshine/transformation
Tag: cocoon_2_0_3_branch
SunShinePreTransformer.java
SunShineConnectTransformer.java
SunShineTransformer.java
AbstractSunShineTransformer.java
SunShinePostTransformer.java InsertTransformer.java
src/scratchpad/src/org/apache/cocoon/sunshine/sunspot/acting
Tag: cocoon_2_0_3_branch AuthAction.java
src/scratchpad/src/org/apache/cocoon/sunshine/sunspot/generation
Tag: cocoon_2_0_3_branch PortalGenerator.java
ConfigurationGenerator.java
src/scratchpad/src/org/apache/cocoon/sunshine/sunspot Tag:
cocoon_2_0_3_branch SunSpot.java Constants.java
src/scratchpad/src/org/apache/cocoon/sunshine/components
Tag: cocoon_2_0_3_branch
AbstractSunShineComponent.java
src/scratchpad/src/org/apache/cocoon/precept/stores Tag:
cocoon_2_0_3_branch AbstractInstance.java
src/scratchpad/src/org/apache/cocoon/precept/acting Tag:
cocoon_2_0_3_branch AbstractPreceptorAction.java
PreceptorDemoAction.java AbstractMethodAction.java
src/scratchpad/src/org/apache/cocoon/sunshine/acting Tag:
cocoon_2_0_3_branch SessionAction.java
src/scratchpad/src/org/apache/cocoon/sunshine Tag:
cocoon_2_0_3_branch SunShine.java
SunShineConstants.java
src/scratchpad/src/org/apache/cocoon/sunshine/sunrise/selection
Tag: cocoon_2_0_3_branch MediaSelector.java
src/scratchpad/src/org/apache/cocoon/sunshine/sunrise/context
Tag: cocoon_2_0_3_branch
SessionContextProviderImpl.java
SessionContextImpl.java
src/scratchpad/src/org/apache/cocoon/treeprocessor Tag:
cocoon_2_0_3_branch TreeProcessor.java
src/scratchpad/src/org/apache/cocoon/generation Tag:
cocoon_2_0_3_branch XPathDirectoryGenerator.java
src/scratchpad/src/org/apache/cocoon/storejanitor Tag:
cocoon_2_0_3_branch StoreJanitorImpl.java
src/scratchpad/src/org/apache/cocoon/util Tag:
cocoon_2_0_3_branch ResizableContainer.java
Log:
changed some copyright statements from 2002 to 2003
Revision Changes Path
No revision
No revision
1.2.2.1 +110 -110 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/stores/bean/test/Attic/CocoonInstallationBean.java
Index: CocoonInstallationBean.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/stores/bean/test/Attic/CocoonInstallationBean.java,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- CocoonInstallationBean.java 25 Mar 2002 23:23:55 -0000 1.2
+++ CocoonInstallationBean.java 7 Feb 2003 07:25:21 -0000 1.2.2.1
@@ -1,110 +1,110 @@
-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
- used to endorse or promote products derived from this software without
- prior written permission. For written permission, please contact
- apache@apache.org.
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation and was originally created by
- Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
- Software Foundation, please see <http://www.apache.org/>.
-
-*/
-
-package org.apache.cocoon.precept.stores.bean.test;
-
-/*
- * @version: Mar 20, 2002
- * @author: Torsten Curdt <tc...@dff.st>
- */
-public class CocoonInstallationBean {
- private UserBean user;
- private SystemBean system;
- private int number;
- private String live_url;
- private boolean publish;
-
- public CocoonInstallationBean() {
- user = new UserBean();
- system = new SystemBean();
- }
-
- public UserBean getUser() {
- return user;
- }
-
- public void setUser(UserBean user) {
- this.user = user;
- }
-
- public SystemBean getSystem() {
- return system;
- }
-
- public void setSystem(SystemBean system) {
- this.system = system;
- }
-
- public int getNumber() {
- return number;
- }
-
- public void setNumber(int number) {
- this.number = number;
- }
-
- public String getLive_url() {
- return live_url;
- }
-
- public void setLive_url(String live_url) {
- this.live_url = live_url;
- }
-
- public boolean isPublish() {
- return publish;
- }
-
- public void setPublish(boolean publish) {
- this.publish = publish;
- }
-
-}
+/*
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
+ used to endorse or promote products derived from this software without
+ prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package org.apache.cocoon.precept.stores.bean.test;
+
+/*
+ * @version: Mar 20, 2002
+ * @author: Torsten Curdt <tc...@dff.st>
+ */
+public class CocoonInstallationBean {
+ private UserBean user;
+ private SystemBean system;
+ private int number;
+ private String live_url;
+ private boolean publish;
+
+ public CocoonInstallationBean() {
+ user = new UserBean();
+ system = new SystemBean();
+ }
+
+ public UserBean getUser() {
+ return user;
+ }
+
+ public void setUser(UserBean user) {
+ this.user = user;
+ }
+
+ public SystemBean getSystem() {
+ return system;
+ }
+
+ public void setSystem(SystemBean system) {
+ this.system = system;
+ }
+
+ public int getNumber() {
+ return number;
+ }
+
+ public void setNumber(int number) {
+ this.number = number;
+ }
+
+ public String getLive_url() {
+ return live_url;
+ }
+
+ public void setLive_url(String live_url) {
+ this.live_url = live_url;
+ }
+
+ public boolean isPublish() {
+ return publish;
+ }
+
+ public void setPublish(boolean publish) {
+ this.publish = publish;
+ }
+
+}
1.2.2.1 +89 -89 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/stores/bean/test/Attic/UserBean.java
Index: UserBean.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/stores/bean/test/Attic/UserBean.java,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- UserBean.java 25 Mar 2002 23:23:55 -0000 1.2
+++ UserBean.java 7 Feb 2003 07:25:21 -0000 1.2.2.1
@@ -1,89 +1,89 @@
-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
- used to endorse or promote products derived from this software without
- prior written permission. For written permission, please contact
- apache@apache.org.
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation and was originally created by
- Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
- Software Foundation, please see <http://www.apache.org/>.
-
-*/
-
-package org.apache.cocoon.precept.stores.bean.test;
-
-/*
- * @version: Mar 20, 2002
- * @author: Torsten Curdt <tc...@dff.st>
- */
-public class UserBean {
- private String firstname;
- private String lastname;
- private String email;
-
- public UserBean() {
- }
-
- public String getFirstname() {
- return firstname;
- }
-
- public void setFirstname(String firstname) {
- this.firstname = firstname;
- }
-
- public String getLastname() {
- return lastname;
- }
-
- public void setLastname(String lastname) {
- this.lastname = lastname;
- }
-
- public String getEmail() {
- return email;
- }
-
- public void setEmail(String email) {
- this.email = email;
- }
-}
+/*
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
+ used to endorse or promote products derived from this software without
+ prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package org.apache.cocoon.precept.stores.bean.test;
+
+/*
+ * @version: Mar 20, 2002
+ * @author: Torsten Curdt <tc...@dff.st>
+ */
+public class UserBean {
+ private String firstname;
+ private String lastname;
+ private String email;
+
+ public UserBean() {
+ }
+
+ public String getFirstname() {
+ return firstname;
+ }
+
+ public void setFirstname(String firstname) {
+ this.firstname = firstname;
+ }
+
+ public String getLastname() {
+ return lastname;
+ }
+
+ public void setLastname(String lastname) {
+ this.lastname = lastname;
+ }
+
+ public String getEmail() {
+ return email;
+ }
+
+ public void setEmail(String email) {
+ this.email = email;
+ }
+}
1.2.2.1 +107 -107 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/stores/bean/test/Attic/SystemBean.java
Index: SystemBean.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/stores/bean/test/Attic/SystemBean.java,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- SystemBean.java 25 Mar 2002 23:23:55 -0000 1.2
+++ SystemBean.java 7 Feb 2003 07:25:21 -0000 1.2.2.1
@@ -1,107 +1,107 @@
-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
- used to endorse or promote products derived from this software without
- prior written permission. For written permission, please contact
- apache@apache.org.
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation and was originally created by
- Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
- Software Foundation, please see <http://www.apache.org/>.
-
-*/
-
-package org.apache.cocoon.precept.stores.bean.test;
-
-/*
- * @version: Mar 20, 2002
- * @author: Torsten Curdt <tc...@dff.st>
- */
-public class SystemBean {
- private String os;
- private String processor;
- private int ram;
- private String servlet_engine;
- private String java_version;
-
- public SystemBean() {
- }
-
- public String getOs() {
- return os;
- }
-
- public void setOs(String os) {
- this.os = os;
- }
-
- public String getProcessor() {
- return processor;
- }
-
- public void setProcessor(String processor) {
- this.processor = processor;
- }
-
- public int getRam() {
- return ram;
- }
-
- public void setRam(int ram) {
- this.ram = ram;
- }
-
- public String getServlet_engine() {
- return servlet_engine;
- }
-
- public void setServlet_engine(String servlet_engine) {
- this.servlet_engine = servlet_engine;
- }
-
- public String getJava_version() {
- return java_version;
- }
-
- public void setJava_version(String java_version) {
- this.java_version = java_version;
- }
-}
+/*
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
+ used to endorse or promote products derived from this software without
+ prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package org.apache.cocoon.precept.stores.bean.test;
+
+/*
+ * @version: Mar 20, 2002
+ * @author: Torsten Curdt <tc...@dff.st>
+ */
+public class SystemBean {
+ private String os;
+ private String processor;
+ private int ram;
+ private String servlet_engine;
+ private String java_version;
+
+ public SystemBean() {
+ }
+
+ public String getOs() {
+ return os;
+ }
+
+ public void setOs(String os) {
+ this.os = os;
+ }
+
+ public String getProcessor() {
+ return processor;
+ }
+
+ public void setProcessor(String processor) {
+ this.processor = processor;
+ }
+
+ public int getRam() {
+ return ram;
+ }
+
+ public void setRam(int ram) {
+ this.ram = ram;
+ }
+
+ public String getServlet_engine() {
+ return servlet_engine;
+ }
+
+ public void setServlet_engine(String servlet_engine) {
+ this.servlet_engine = servlet_engine;
+ }
+
+ public String getJava_version() {
+ return java_version;
+ }
+
+ public void setJava_version(String java_version) {
+ this.java_version = java_version;
+ }
+}
No revision
No revision
1.2.2.1 +55 -55 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/preceptors/Attic/PreceptorBuilder.java
Index: PreceptorBuilder.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/preceptors/Attic/PreceptorBuilder.java,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- PreceptorBuilder.java 25 Mar 2002 23:23:54 -0000 1.2
+++ PreceptorBuilder.java 7 Feb 2003 07:25:21 -0000 1.2.2.1
@@ -1,54 +1,54 @@
-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
- used to endorse or promote products derived from this software without
- prior written permission. For written permission, please contact
- apache@apache.org.
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation and was originally created by
- Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
- Software Foundation, please see <http://www.apache.org/>.
-
-*/
-
+/*
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
+ used to endorse or promote products derived from this software without
+ prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
package org.apache.cocoon.precept.preceptors;
import org.apache.avalon.framework.component.Component;
@@ -56,10 +56,10 @@
import java.net.URL;
-/*
- * @version: Mar 20, 2002
- * @author: Torsten Curdt <tc...@dff.st>
- */
+/*
+ * @version: Mar 20, 2002
+ * @author: Torsten Curdt <tc...@dff.st>
+ */
public interface PreceptorBuilder extends Component {
public String ROLE = "org.apache.cocoon.precept.PreceptorBuilder";
1.3.2.1 +58 -58 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/preceptors/Attic/AbstractPreceptor.java
Index: AbstractPreceptor.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/preceptors/Attic/AbstractPreceptor.java,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -u -r1.3 -r1.3.2.1
--- AbstractPreceptor.java 26 Mar 2002 19:56:44 -0000 1.3
+++ AbstractPreceptor.java 7 Feb 2003 07:25:21 -0000 1.3.2.1
@@ -1,70 +1,70 @@
-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
- used to endorse or promote products derived from this software without
- prior written permission. For written permission, please contact
- apache@apache.org.
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation and was originally created by
- Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
- Software Foundation, please see <http://www.apache.org/>.
-
-*/
-
+/*
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
+ used to endorse or promote products derived from this software without
+ prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
package org.apache.cocoon.precept.preceptors;
import org.apache.avalon.framework.component.ComponentException;
import org.apache.avalon.framework.component.ComponentManager;
import org.apache.avalon.framework.component.Composable;
-import org.apache.avalon.framework.logger.AbstractLoggable;
-import org.apache.avalon.framework.configuration.Configuration;
+import org.apache.avalon.framework.logger.AbstractLoggable;
+import org.apache.avalon.framework.configuration.Configuration;
import org.apache.cocoon.precept.Preceptor;
-/*
- * @version: Mar 18, 2002
- * @author: Torsten Curdt <tc...@dff.st>
+/*
+ * @version: Mar 18, 2002
+ * @author: Torsten Curdt <tc...@dff.st>
*/
public abstract class AbstractPreceptor extends AbstractLoggable implements Preceptor, Composable {
- protected ComponentManager manager;
-
+ protected ComponentManager manager;
+
public void compose(ComponentManager manager) throws ComponentException {
this.manager = manager;
}
No revision
No revision
1.4.2.1 +293 -293 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/Attic/InstanceTransformer.java
Index: InstanceTransformer.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/Attic/InstanceTransformer.java,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -u -r1.4 -r1.4.2.1
--- InstanceTransformer.java 4 Apr 2002 07:02:09 -0000 1.4
+++ InstanceTransformer.java 7 Feb 2003 07:25:21 -0000 1.4.2.1
@@ -1,296 +1,296 @@
-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
- used to endorse or promote products derived from this software without
- prior written permission. For written permission, please contact
- apache@apache.org.
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation and was originally created by
- Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
- Software Foundation, please see <http://www.apache.org/>.
-
-*/
-
-package org.apache.cocoon.precept;
-
-import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.cocoon.ProcessingException;
-import org.apache.cocoon.precept.acting.AbstractPreceptorAction;
-import org.apache.cocoon.caching.CacheValidity;
-import org.apache.cocoon.caching.NOPCacheValidity;
-import org.apache.cocoon.environment.ObjectModelHelper;
-import org.apache.cocoon.environment.Request;
-import org.apache.cocoon.environment.Session;
-import org.apache.cocoon.environment.SourceResolver;
-import org.apache.cocoon.transformation.AbstractTransformer;
-import org.apache.log.Logger;
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.AttributesImpl;
-
-import java.io.IOException;
-import java.util.Map;
-import java.util.List;
-import java.util.Iterator;
-import java.util.Collection;
-
-/*
- * @author: Torsten Curdt <tc...@dff.st>
- */
-public class InstanceTransformer extends AbstractTransformer {
- //implements Cacheable {
-
- public final static String NS = "http://www.dff.st/ns/desire/instance/1.0";
-
- public final static Attributes NOATTR = new AttributesImpl();
-
- public final static String TAG_INSERTINSTANCE = "insert-instance";
- public final static String TAG_INSERTINSTANCE_ATTR_ID = "id";
-
- public final static String TAG_INSTANCE = "instance";
- public final static String TAG_INSTANCE_ATTR_ID = "id";
-
- public final static String TAG_INSERTVIOLATIONS = "insert-violations";
-
- public final static String TAG_BUTTON = "button";
-
- public final static String TAG_LABEL = "label";
-
- public final static String TAG_OUTPUT = "output";
- public final static String TAG_TEXTBOX = "textbox";
- public final static String TAG_PASSWORD = "password";
- public final static String TAG_SELECTBOOLEAN = "selectBoolean";
- public final static String TAG_SELECTONE = "selectOne";
-
- public final static String TAG_SELECTMANY = "selectMany";
-
- public final static String TAG_COMMON_ATTR_REF = "ref";
- public final static String TAG_COMMON_ATTR_INSTANCE = "instance";
-
- private Request request;
- private Session session;
- private Instance defaultInstance;
- private Object value;
- private String prefix;
-
- public void setup(SourceResolver resolver, Map objectModel, String source, Parameters parameters) throws ProcessingException, SAXException, IOException {
- request = ObjectModelHelper.getRequest(objectModel);
- if (request == null) {
- getLogger().debug("no request object");
- throw new ProcessingException("no request object");
- }
-
- session = request.getSession(false);
- defaultInstance = null;
- prefix = null;
- }
-
-
- public void startElement(String uri, String name, String raw, Attributes attributes) throws SAXException {
- if (NS.equals(uri)) {
- if (prefix == null) {
- prefix = raw.substring(0, raw.length() - name.length() - 1);
- getLogger().debug("found prefix [" + String.valueOf(prefix) + "] for namespace [" + NS + "]");
- }
-
- if (TAG_INSERTINSTANCE.equals(name)) {
- if (session != null) {
- String id = attributes.getValue(TAG_INSERTINSTANCE_ATTR_ID);
-
- getLogger().debug("inserting instance [id=" + String.valueOf(id) + "]");
- Instance instance = (Instance) session.getAttribute(id);
- if (instance != null) {
- instance.toSAX(this, true);
- }
- else {
- getLogger().debug("could not find instance [id=" + String.valueOf(id) + "]");
- }
- }
- else {
- getLogger().debug("no session - no instance");
- }
- }
- else if (TAG_INSERTVIOLATIONS.equals(name)) {
- Collection violations = (Collection) request.getAttribute(AbstractPreceptorAction.PRECEPTORVIOLATIONS);
- if (violations != null) {
- for (Iterator it = violations.iterator(); it.hasNext();) {
- Constraint constraint = (Constraint) it.next();
- super.startElement(uri, "constraint", prefix + ":" + "constraint", NOATTR);
- String v = String.valueOf(constraint);
- super.characters(v.toCharArray(), 0, v.length());
- super.endElement(uri, "constraint", prefix + ":" + "constraint");
- }
- }
- }
- else if (TAG_INSTANCE.equals(name)) {
- if (session != null) {
- String id = attributes.getValue(TAG_INSTANCE_ATTR_ID);
- defaultInstance = (Instance) session.getAttribute(id);
- if (defaultInstance != null) {
- getLogger().debug("using default instance [id=" + String.valueOf(id) + "]");
- }
- else {
- getLogger().error("could not find instance [id=" + String.valueOf(id) + "]");
- }
- }
- }
- else if (TAG_OUTPUT.equals(name) ||
- TAG_TEXTBOX.equals(name) ||
- TAG_PASSWORD.equals(name) ||
- TAG_SELECTBOOLEAN.equals(name) ||
- TAG_SELECTONE.equals(name)) {
- String ref = attributes.getValue(TAG_COMMON_ATTR_REF);
- String id = attributes.getValue(TAG_COMMON_ATTR_INSTANCE);
-
- getLogger().debug("[" + String.valueOf(name) + "] getting value from [" + String.valueOf(ref) + "]");
-
- if (ref != null) {
- Instance instance = defaultInstance;
-
- if (id != null) {
- if (session != null) {
- instance = (Instance) session.getAttribute(id);
- if (instance != null) {
- getLogger().debug("using instance [id=" + String.valueOf(id) + "]");
- }
- else {
- getLogger().error("could not find instance [id=" + String.valueOf(id) + "]");
- }
- }
- }
-
- super.startElement(uri, name, raw, attributes);
- try {
- value = instance.getValue(ref);
-
- getLogger().debug("[" + String.valueOf(ref) + "] = " + String.valueOf(value));
-
- super.startElement(uri, "value", prefix + ":" + "value", NOATTR);
- if (value != null) {
- String v = String.valueOf(value);
- super.characters(v.toCharArray(),0,v.length());
- }
- super.endElement(uri, "value", prefix + ":" + "value");
-
- if (instance.getPreceptor() != null) {
- Collection constraints = instance.getPreceptor().getConstraintsFor(ref);
- if (constraints != null) {
- for (Iterator it = constraints.iterator(); it.hasNext();) {
- Constraint constraint = (Constraint) it.next();
- constraint.toSAX(this);
- }
- }
- }
- }
- catch (InvalidXPathSyntaxException e) {
- throw new SAXException(e);
- }
- catch (NoSuchNodeException e) {
- //throw new SAXException(e);
- }
- }
- else {
- throw new SAXException("[" + String.valueOf(name) + "] needs an \"" + TAG_COMMON_ATTR_REF + "\" attribute");
- }
- }
- else if (TAG_SELECTMANY.equals(name)) {
- //NYI
- throw new SAXException("NYI");
- }
- else if (TAG_BUTTON.equals(name)) {
- //NYI
- super.startElement(uri, name, raw, attributes);
- }
- else {
- getLogger().error("unknown element [" + String.valueOf(name) + "]");
- super.startElement(uri, name, raw, attributes);
- }
- }
- else {
- super.startElement(uri, name, raw, attributes);
- }
- }
-
-
- public void endElement(String uri, String name, String raw) throws SAXException {
- if (NS.equals(uri)) {
- if (TAG_INSERTINSTANCE.equals(name)) {
- }
- else if (TAG_INSERTVIOLATIONS.equals(name)) {
- }
- else if (TAG_INSTANCE.equals(name)) {
- }
- else if (TAG_OUTPUT.equals(name) ||
- TAG_TEXTBOX.equals(name) ||
- TAG_PASSWORD.equals(name) ||
- TAG_SELECTBOOLEAN.equals(name) ||
- TAG_SELECTONE.equals(name) ) {
- super.endElement(uri, name, raw);
- }
- else if (TAG_SELECTMANY.equals(name)) {
- }
- else if (TAG_BUTTON.equals(name)) {
- super.endElement(uri, name, raw);
- }
- else {
- getLogger().error("unknown element [" + String.valueOf(name) + "]");
- super.endElement(uri, name, raw);
- }
- }
- else {
- super.endElement(uri, name, raw);
- }
- }
-
- public void characters(char[] chars, int start, int len) throws SAXException {
- super.characters(chars, start, len);
- }
-
- public long generateKey() {
- return (1);
- }
-
- public CacheValidity generateValidity() {
- return (new NOPCacheValidity());
- }
+/*
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
+ used to endorse or promote products derived from this software without
+ prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package org.apache.cocoon.precept;
+
+import org.apache.avalon.framework.parameters.Parameters;
+import org.apache.cocoon.ProcessingException;
+import org.apache.cocoon.precept.acting.AbstractPreceptorAction;
+import org.apache.cocoon.caching.CacheValidity;
+import org.apache.cocoon.caching.NOPCacheValidity;
+import org.apache.cocoon.environment.ObjectModelHelper;
+import org.apache.cocoon.environment.Request;
+import org.apache.cocoon.environment.Session;
+import org.apache.cocoon.environment.SourceResolver;
+import org.apache.cocoon.transformation.AbstractTransformer;
+import org.apache.log.Logger;
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.AttributesImpl;
+
+import java.io.IOException;
+import java.util.Map;
+import java.util.List;
+import java.util.Iterator;
+import java.util.Collection;
+
+/*
+ * @author: Torsten Curdt <tc...@dff.st>
+ */
+public class InstanceTransformer extends AbstractTransformer {
+ //implements Cacheable {
+
+ public final static String NS = "http://www.dff.st/ns/desire/instance/1.0";
+
+ public final static Attributes NOATTR = new AttributesImpl();
+
+ public final static String TAG_INSERTINSTANCE = "insert-instance";
+ public final static String TAG_INSERTINSTANCE_ATTR_ID = "id";
+
+ public final static String TAG_INSTANCE = "instance";
+ public final static String TAG_INSTANCE_ATTR_ID = "id";
+
+ public final static String TAG_INSERTVIOLATIONS = "insert-violations";
+
+ public final static String TAG_BUTTON = "button";
+
+ public final static String TAG_LABEL = "label";
+
+ public final static String TAG_OUTPUT = "output";
+ public final static String TAG_TEXTBOX = "textbox";
+ public final static String TAG_PASSWORD = "password";
+ public final static String TAG_SELECTBOOLEAN = "selectBoolean";
+ public final static String TAG_SELECTONE = "selectOne";
+
+ public final static String TAG_SELECTMANY = "selectMany";
+
+ public final static String TAG_COMMON_ATTR_REF = "ref";
+ public final static String TAG_COMMON_ATTR_INSTANCE = "instance";
+
+ private Request request;
+ private Session session;
+ private Instance defaultInstance;
+ private Object value;
+ private String prefix;
+
+ public void setup(SourceResolver resolver, Map objectModel, String source, Parameters parameters) throws ProcessingException, SAXException, IOException {
+ request = ObjectModelHelper.getRequest(objectModel);
+ if (request == null) {
+ getLogger().debug("no request object");
+ throw new ProcessingException("no request object");
+ }
+
+ session = request.getSession(false);
+ defaultInstance = null;
+ prefix = null;
+ }
+
+
+ public void startElement(String uri, String name, String raw, Attributes attributes) throws SAXException {
+ if (NS.equals(uri)) {
+ if (prefix == null) {
+ prefix = raw.substring(0, raw.length() - name.length() - 1);
+ getLogger().debug("found prefix [" + String.valueOf(prefix) + "] for namespace [" + NS + "]");
+ }
+
+ if (TAG_INSERTINSTANCE.equals(name)) {
+ if (session != null) {
+ String id = attributes.getValue(TAG_INSERTINSTANCE_ATTR_ID);
+
+ getLogger().debug("inserting instance [id=" + String.valueOf(id) + "]");
+ Instance instance = (Instance) session.getAttribute(id);
+ if (instance != null) {
+ instance.toSAX(this, true);
+ }
+ else {
+ getLogger().debug("could not find instance [id=" + String.valueOf(id) + "]");
+ }
+ }
+ else {
+ getLogger().debug("no session - no instance");
+ }
+ }
+ else if (TAG_INSERTVIOLATIONS.equals(name)) {
+ Collection violations = (Collection) request.getAttribute(AbstractPreceptorAction.PRECEPTORVIOLATIONS);
+ if (violations != null) {
+ for (Iterator it = violations.iterator(); it.hasNext();) {
+ Constraint constraint = (Constraint) it.next();
+ super.startElement(uri, "constraint", prefix + ":" + "constraint", NOATTR);
+ String v = String.valueOf(constraint);
+ super.characters(v.toCharArray(), 0, v.length());
+ super.endElement(uri, "constraint", prefix + ":" + "constraint");
+ }
+ }
+ }
+ else if (TAG_INSTANCE.equals(name)) {
+ if (session != null) {
+ String id = attributes.getValue(TAG_INSTANCE_ATTR_ID);
+ defaultInstance = (Instance) session.getAttribute(id);
+ if (defaultInstance != null) {
+ getLogger().debug("using default instance [id=" + String.valueOf(id) + "]");
+ }
+ else {
+ getLogger().error("could not find instance [id=" + String.valueOf(id) + "]");
+ }
+ }
+ }
+ else if (TAG_OUTPUT.equals(name) ||
+ TAG_TEXTBOX.equals(name) ||
+ TAG_PASSWORD.equals(name) ||
+ TAG_SELECTBOOLEAN.equals(name) ||
+ TAG_SELECTONE.equals(name)) {
+ String ref = attributes.getValue(TAG_COMMON_ATTR_REF);
+ String id = attributes.getValue(TAG_COMMON_ATTR_INSTANCE);
+
+ getLogger().debug("[" + String.valueOf(name) + "] getting value from [" + String.valueOf(ref) + "]");
+
+ if (ref != null) {
+ Instance instance = defaultInstance;
+
+ if (id != null) {
+ if (session != null) {
+ instance = (Instance) session.getAttribute(id);
+ if (instance != null) {
+ getLogger().debug("using instance [id=" + String.valueOf(id) + "]");
+ }
+ else {
+ getLogger().error("could not find instance [id=" + String.valueOf(id) + "]");
+ }
+ }
+ }
+
+ super.startElement(uri, name, raw, attributes);
+ try {
+ value = instance.getValue(ref);
+
+ getLogger().debug("[" + String.valueOf(ref) + "] = " + String.valueOf(value));
+
+ super.startElement(uri, "value", prefix + ":" + "value", NOATTR);
+ if (value != null) {
+ String v = String.valueOf(value);
+ super.characters(v.toCharArray(),0,v.length());
+ }
+ super.endElement(uri, "value", prefix + ":" + "value");
+
+ if (instance.getPreceptor() != null) {
+ Collection constraints = instance.getPreceptor().getConstraintsFor(ref);
+ if (constraints != null) {
+ for (Iterator it = constraints.iterator(); it.hasNext();) {
+ Constraint constraint = (Constraint) it.next();
+ constraint.toSAX(this);
+ }
+ }
+ }
+ }
+ catch (InvalidXPathSyntaxException e) {
+ throw new SAXException(e);
+ }
+ catch (NoSuchNodeException e) {
+ //throw new SAXException(e);
+ }
+ }
+ else {
+ throw new SAXException("[" + String.valueOf(name) + "] needs an \"" + TAG_COMMON_ATTR_REF + "\" attribute");
+ }
+ }
+ else if (TAG_SELECTMANY.equals(name)) {
+ //NYI
+ throw new SAXException("NYI");
+ }
+ else if (TAG_BUTTON.equals(name)) {
+ //NYI
+ super.startElement(uri, name, raw, attributes);
+ }
+ else {
+ getLogger().error("unknown element [" + String.valueOf(name) + "]");
+ super.startElement(uri, name, raw, attributes);
+ }
+ }
+ else {
+ super.startElement(uri, name, raw, attributes);
+ }
+ }
+
+
+ public void endElement(String uri, String name, String raw) throws SAXException {
+ if (NS.equals(uri)) {
+ if (TAG_INSERTINSTANCE.equals(name)) {
+ }
+ else if (TAG_INSERTVIOLATIONS.equals(name)) {
+ }
+ else if (TAG_INSTANCE.equals(name)) {
+ }
+ else if (TAG_OUTPUT.equals(name) ||
+ TAG_TEXTBOX.equals(name) ||
+ TAG_PASSWORD.equals(name) ||
+ TAG_SELECTBOOLEAN.equals(name) ||
+ TAG_SELECTONE.equals(name) ) {
+ super.endElement(uri, name, raw);
+ }
+ else if (TAG_SELECTMANY.equals(name)) {
+ }
+ else if (TAG_BUTTON.equals(name)) {
+ super.endElement(uri, name, raw);
+ }
+ else {
+ getLogger().error("unknown element [" + String.valueOf(name) + "]");
+ super.endElement(uri, name, raw);
+ }
+ }
+ else {
+ super.endElement(uri, name, raw);
+ }
+ }
+
+ public void characters(char[] chars, int start, int len) throws SAXException {
+ super.characters(chars, start, len);
+ }
+
+ public long generateKey() {
+ return (1);
+ }
+
+ public CacheValidity generateValidity() {
+ return (new NOPCacheValidity());
+ }
}
1.2.2.1 +68 -68 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/Attic/InvalidXPathSyntaxException.java
Index: InvalidXPathSyntaxException.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/Attic/InvalidXPathSyntaxException.java,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- InvalidXPathSyntaxException.java 25 Mar 2002 23:23:54 -0000 1.2
+++ InvalidXPathSyntaxException.java 7 Feb 2003 07:25:21 -0000 1.2.2.1
@@ -1,68 +1,68 @@
-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
- used to endorse or promote products derived from this software without
- prior written permission. For written permission, please contact
- apache@apache.org.
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation and was originally created by
- Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
- Software Foundation, please see <http://www.apache.org/>.
-
-*/
-
-package org.apache.cocoon.precept;
-
-import org.apache.avalon.framework.CascadingException;
-
-/*
- * @version: Mar 14, 2002
- * @author: Torsten Curdt <tc...@dff.st>
- */
-public class InvalidXPathSyntaxException extends CascadingException {
- public InvalidXPathSyntaxException(String s) {
- super(s);
- }
-
- public InvalidXPathSyntaxException(Throwable t) {
- super("",t);
- }
-}
+/*
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
+ used to endorse or promote products derived from this software without
+ prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package org.apache.cocoon.precept;
+
+import org.apache.avalon.framework.CascadingException;
+
+/*
+ * @version: Mar 14, 2002
+ * @author: Torsten Curdt <tc...@dff.st>
+ */
+public class InvalidXPathSyntaxException extends CascadingException {
+ public InvalidXPathSyntaxException(String s) {
+ super(s);
+ }
+
+ public InvalidXPathSyntaxException(Throwable t) {
+ super("",t);
+ }
+}
1.2.2.1 +68 -68 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/Attic/Constraint.java
Index: Constraint.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/Attic/Constraint.java,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- Constraint.java 25 Mar 2002 23:23:54 -0000 1.2
+++ Constraint.java 7 Feb 2003 07:25:21 -0000 1.2.2.1
@@ -1,68 +1,68 @@
-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
- used to endorse or promote products derived from this software without
- prior written permission. For written permission, please contact
- apache@apache.org.
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation and was originally created by
- Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
- Software Foundation, please see <http://www.apache.org/>.
-
-*/
-
-package org.apache.cocoon.precept;
-
-import org.apache.cocoon.precept.Context;
-import org.apache.avalon.framework.configuration.Configuration;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.SAXException;
-
-/*
- * @version: Mar 14, 2002
- * @author: Torsten Curdt <tc...@dff.st>
- */
-public interface Constraint {
- public boolean isSatisfiedBy( Object value, Context context );
- public String getId();
- public String getType();
- public void toSAX(ContentHandler handler) throws SAXException;
-}
+/*
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
+ used to endorse or promote products derived from this software without
+ prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package org.apache.cocoon.precept;
+
+import org.apache.cocoon.precept.Context;
+import org.apache.avalon.framework.configuration.Configuration;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.SAXException;
+
+/*
+ * @version: Mar 14, 2002
+ * @author: Torsten Curdt <tc...@dff.st>
+ */
+public interface Constraint {
+ public boolean isSatisfiedBy( Object value, Context context );
+ public String getId();
+ public String getType();
+ public void toSAX(ContentHandler handler) throws SAXException;
+}
1.2.2.1 +61 -61 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/Attic/Context.java
Index: Context.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/Attic/Context.java,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- Context.java 25 Mar 2002 23:23:54 -0000 1.2
+++ Context.java 7 Feb 2003 07:25:21 -0000 1.2.2.1
@@ -1,61 +1,61 @@
-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
- used to endorse or promote products derived from this software without
- prior written permission. For written permission, please contact
- apache@apache.org.
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation and was originally created by
- Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
- Software Foundation, please see <http://www.apache.org/>.
-
-*/
-
-package org.apache.cocoon.precept;
-
-import java.util.Locale;
-
-/*
- * @version: Mar 14, 2002
- * @author: Torsten Curdt <tc...@dff.st>
- */
-public class Context {
-}
+/*
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
+ used to endorse or promote products derived from this software without
+ prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package org.apache.cocoon.precept;
+
+import java.util.Locale;
+
+/*
+ * @version: Mar 14, 2002
+ * @author: Torsten Curdt <tc...@dff.st>
+ */
+public class Context {
+}
1.2.2.1 +68 -68 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/Attic/PreceptorViolationException.java
Index: PreceptorViolationException.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/Attic/PreceptorViolationException.java,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- PreceptorViolationException.java 25 Mar 2002 23:23:54 -0000 1.2
+++ PreceptorViolationException.java 7 Feb 2003 07:25:21 -0000 1.2.2.1
@@ -1,68 +1,68 @@
-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
- used to endorse or promote products derived from this software without
- prior written permission. For written permission, please contact
- apache@apache.org.
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation and was originally created by
- Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
- Software Foundation, please see <http://www.apache.org/>.
-
-*/
-
-package org.apache.cocoon.precept;
-
-import org.apache.avalon.framework.CascadingException;
-
-/*
- * @version: Mar 14, 2002
- * @author: Torsten Curdt <tc...@dff.st>
- */
-public class PreceptorViolationException extends CascadingException {
- public PreceptorViolationException(String s) {
- super(s);
- }
-
- public PreceptorViolationException(Throwable t) {
- super("",t);
- }
-}
+/*
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
+ used to endorse or promote products derived from this software without
+ prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package org.apache.cocoon.precept;
+
+import org.apache.avalon.framework.CascadingException;
+
+/*
+ * @version: Mar 14, 2002
+ * @author: Torsten Curdt <tc...@dff.st>
+ */
+public class PreceptorViolationException extends CascadingException {
+ public PreceptorViolationException(String s) {
+ super(s);
+ }
+
+ public PreceptorViolationException(Throwable t) {
+ super("",t);
+ }
+}
1.3.2.1 +63 -63 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/Attic/Preceptor.java
Index: Preceptor.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/Attic/Preceptor.java,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -u -r1.3 -r1.3.2.1
--- Preceptor.java 4 Apr 2002 07:02:09 -0000 1.3
+++ Preceptor.java 7 Feb 2003 07:25:21 -0000 1.3.2.1
@@ -1,75 +1,75 @@
-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
- used to endorse or promote products derived from this software without
- prior written permission. For written permission, please contact
- apache@apache.org.
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation and was originally created by
- Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
- Software Foundation, please see <http://www.apache.org/>.
-
-*/
-
+/*
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
+ used to endorse or promote products derived from this software without
+ prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
package org.apache.cocoon.precept;
import org.apache.avalon.framework.component.Component;
-import java.util.Collection;
+import java.util.Collection;
import java.net.URL;
-/*
- * @version: Mar 14, 2002
- * @author: Torsten Curdt <tc...@dff.st>
- */
+/*
+ * @version: Mar 14, 2002
+ * @author: Torsten Curdt <tc...@dff.st>
+ */
public interface Preceptor extends Component {
public String ROLE = "org.apache.cocoon.precept.Preceptor";
-
+
public Collection getConstraintsFor( String xpath ) throws InvalidXPathSyntaxException, NoSuchNodeException;
-
+
public boolean isValidNode( String xpath ) throws InvalidXPathSyntaxException;
-
+
public void buildInstance( Instance instance );
-
- public Collection validate(Instance instance, String xpath, Context context) throws InvalidXPathSyntaxException, NoSuchNodeException;
- public Collection validate(Instance instance, Context context) throws InvalidXPathSyntaxException;
-
+
+ public Collection validate(Instance instance, String xpath, Context context) throws InvalidXPathSyntaxException, NoSuchNodeException;
+ public Collection validate(Instance instance, Context context) throws InvalidXPathSyntaxException;
+
}
1.4.2.1 +60 -60 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/Attic/Instance.java
Index: Instance.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/Attic/Instance.java,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -u -r1.4 -r1.4.2.1
--- Instance.java 4 Apr 2002 14:12:47 -0000 1.4
+++ Instance.java 7 Feb 2003 07:25:21 -0000 1.4.2.1
@@ -1,77 +1,77 @@
-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
- used to endorse or promote products derived from this software without
- prior written permission. For written permission, please contact
- apache@apache.org.
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation and was originally created by
- Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
- Software Foundation, please see <http://www.apache.org/>.
-
-*/
-
+/*
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
+ used to endorse or promote products derived from this software without
+ prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
package org.apache.cocoon.precept;
import org.apache.avalon.framework.component.Component;
import org.xml.sax.ContentHandler;
-import org.xml.sax.SAXException;
-
+import org.xml.sax.SAXException;
+
import java.util.Collection;
-/*
- * @version: Mar 15, 2002
- * @author: Torsten Curdt <tc...@dff.st>
- */
+/*
+ * @version: Mar 15, 2002
+ * @author: Torsten Curdt <tc...@dff.st>
+ */
public interface Instance extends Component {
public String ROLE = "org.apache.cocoon.precept.Instance";
-
+
public void setValue(String xpath, Object value) throws PreceptorViolationException, InvalidXPathSyntaxException;
public void setValue(String xpath, Object value, Context context) throws PreceptorViolationException, InvalidXPathSyntaxException;
- public Object getValue(String xpath) throws InvalidXPathSyntaxException, NoSuchNodeException;
+ public Object getValue(String xpath) throws InvalidXPathSyntaxException, NoSuchNodeException;
public Collection getNodePaths();
public void setPreceptor( Preceptor preceptor );
public Preceptor getPreceptor();
-
+
public void toSAX( ContentHandler handler, boolean constraints) throws SAXException;
public long getLastModified();
}
1.3.2.1 +59 -59 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/Attic/InstanceFactory.java
Index: InstanceFactory.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/Attic/InstanceFactory.java,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -u -r1.3 -r1.3.2.1
--- InstanceFactory.java 4 Apr 2002 07:00:40 -0000 1.3
+++ InstanceFactory.java 7 Feb 2003 07:25:21 -0000 1.3.2.1
@@ -1,54 +1,54 @@
-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
- used to endorse or promote products derived from this software without
- prior written permission. For written permission, please contact
- apache@apache.org.
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation and was originally created by
- Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
- Software Foundation, please see <http://www.apache.org/>.
-
-*/
-
+/*
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
+ used to endorse or promote products derived from this software without
+ prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
package org.apache.cocoon.precept;
import org.apache.avalon.framework.logger.AbstractLoggable;
@@ -65,10 +65,10 @@
import org.apache.cocoon.precept.preceptors.PreceptorBuilder;
-/*
- * @version: Mar 18, 2002
- * @author: Torsten Curdt <tc...@dff.st>
- */
+/*
+ * @version: Mar 18, 2002
+ * @author: Torsten Curdt <tc...@dff.st>
+ */
public class InstanceFactory extends AbstractLoggable implements Component, Configurable, Composable, ThreadSafe {
public final static String ROLE = "org.apache.cocoon.precept.InstanceFactory";
@@ -85,10 +85,10 @@
Configuration instance = instances[p];
String name = instance.getAttribute("name");
getLogger().debug("registering instance [name=" + String.valueOf(name) + ";impl=" + String.valueOf(instance.getAttribute("impl")) + "]");
- if (instanceConfigurationMap.containsKey(name)) {
- getLogger().error("instance [name=" + String.valueOf(name) + "] appears more than once");
- throw new ConfigurationException("instance [name=" + String.valueOf(name) + "] appears more than once");
- }
+ if (instanceConfigurationMap.containsKey(name)) {
+ getLogger().error("instance [name=" + String.valueOf(name) + "] appears more than once");
+ throw new ConfigurationException("instance [name=" + String.valueOf(name) + "] appears more than once");
+ }
instanceConfigurationMap.put(name, instance);
}
}
1.2.2.1 +68 -68 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/Attic/NoSuchNodeException.java
Index: NoSuchNodeException.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/Attic/NoSuchNodeException.java,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- NoSuchNodeException.java 25 Mar 2002 23:23:54 -0000 1.2
+++ NoSuchNodeException.java 7 Feb 2003 07:25:21 -0000 1.2.2.1
@@ -1,68 +1,68 @@
-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
- used to endorse or promote products derived from this software without
- prior written permission. For written permission, please contact
- apache@apache.org.
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation and was originally created by
- Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
- Software Foundation, please see <http://www.apache.org/>.
-
-*/
-
-package org.apache.cocoon.precept;
-
-import org.apache.avalon.framework.CascadingException;
-
-/*
- * @version: Mar 14, 2002
- * @author: Torsten Curdt <tc...@dff.st>
- */
-public class NoSuchNodeException extends CascadingException {
- public NoSuchNodeException(String s) {
- super(s);
- }
-
- public NoSuchNodeException(Throwable t) {
- super("",t);
- }
-}
+/*
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
+ used to endorse or promote products derived from this software without
+ prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package org.apache.cocoon.precept;
+
+import org.apache.avalon.framework.CascadingException;
+
+/*
+ * @version: Mar 14, 2002
+ * @author: Torsten Curdt <tc...@dff.st>
+ */
+public class NoSuchNodeException extends CascadingException {
+ public NoSuchNodeException(String s) {
+ super(s);
+ }
+
+ public NoSuchNodeException(Throwable t) {
+ super("",t);
+ }
+}
No revision
No revision
1.3.2.1 +133 -133 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/preceptors/easyrelax/constraints/Attic/ChoiceConstraint.java
Index: ChoiceConstraint.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/preceptors/easyrelax/constraints/Attic/ChoiceConstraint.java,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -u -r1.3 -r1.3.2.1
--- ChoiceConstraint.java 26 Mar 2002 19:56:44 -0000 1.3
+++ ChoiceConstraint.java 7 Feb 2003 07:25:22 -0000 1.3.2.1
@@ -1,133 +1,133 @@
-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
- used to endorse or promote products derived from this software without
- prior written permission. For written permission, please contact
- apache@apache.org.
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation and was originally created by
- Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
- Software Foundation, please see <http://www.apache.org/>.
-
-*/
-
-package org.apache.cocoon.precept.preceptors.easyrelax.constraints;
-
-import org.apache.cocoon.precept.Context;
-import org.apache.cocoon.precept.ConfigurationHelper;
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.Configurable;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.thread.SingleThreaded;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.AttributesImpl;
-
-import java.util.*;
-
-/*
- * @version: Mar 21, 2002
- * @author: Torsten Curdt <tc...@dff.st>
- */
-public class ChoiceConstraint extends AbstractConstraint implements Configurable, SingleThreaded {
- public Collection validValues = new ArrayList();
- public Map validValuesDescription = new HashMap();
-
- public void configure(Configuration configuration) throws ConfigurationException {
- id = configuration.getAttribute("name");
-
- getLogger().debug("configuring constraint [" + String.valueOf(id) + "]");
-
- if (validValues.size() == 0) {
- Configuration[] choices = configuration.getChildren("choice");
- for(int i=0;i<choices.length;i++) {
- Configuration choice = choices[i];
- String value = choice.getAttribute("value");
- String valueDescription = choice.getValue();
-
- getLogger().debug("registered choice [" + String.valueOf(value) + "] = [" + String.valueOf(valueDescription) + "]");
-
- validValues.add(value);
- validValuesDescription.put(value,valueDescription);
- }
- }
- }
-
- public boolean isSatisfiedBy(Object value, Context context ) {
- boolean isValid = validValues.contains(value);
- System.out.println("checking choice [" + String.valueOf(value) + "] contains [" + String.valueOf(validValues) + "] is " + isValid);
- getLogger().debug("checking choice [" + String.valueOf(value) + "] contains [" + String.valueOf(validValues) + "] is " + isValid);
- return(isValid);
- }
-
- public String getId() {
- return(id);
- }
-
- public String getType() {
- return("choice");
- }
-
- public String toString() {
- return( String.valueOf(getType()) + "[" + String.valueOf(getId()) + "] -> [" + String.valueOf(validValues) + "]");
- }
-
- public void toSAX(ContentHandler handler) throws SAXException {
- AttributesImpl attributes = new AttributesImpl();
- attributes.addAttribute("","type","type","CDATA",getType());
- attributes.addAttribute("","name","name","CDATA",id);
-
- handler.startElement("","constraint","constraint",attributes);
- for (Iterator it = validValues.iterator(); it.hasNext();) {
- String value = (String) it.next();
- String description = (String) validValuesDescription.get(value);
-
- AttributesImpl choiceAttributes = new AttributesImpl();
- choiceAttributes.addAttribute("","value","value","CDATA",value);
-
- handler.startElement("","choice","choice",choiceAttributes);
- handler.characters(description.toCharArray(),0,description.length());
- handler.endElement("","choice","choice");
- }
- handler.endElement("","constraint","constraint");
- }
-
-}
+/*
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
+ used to endorse or promote products derived from this software without
+ prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package org.apache.cocoon.precept.preceptors.easyrelax.constraints;
+
+import org.apache.cocoon.precept.Context;
+import org.apache.cocoon.precept.ConfigurationHelper;
+import org.apache.avalon.framework.configuration.Configuration;
+import org.apache.avalon.framework.configuration.Configurable;
+import org.apache.avalon.framework.configuration.ConfigurationException;
+import org.apache.avalon.framework.thread.SingleThreaded;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.AttributesImpl;
+
+import java.util.*;
+
+/*
+ * @version: Mar 21, 2002
+ * @author: Torsten Curdt <tc...@dff.st>
+ */
+public class ChoiceConstraint extends AbstractConstraint implements Configurable, SingleThreaded {
+ public Collection validValues = new ArrayList();
+ public Map validValuesDescription = new HashMap();
+
+ public void configure(Configuration configuration) throws ConfigurationException {
+ id = configuration.getAttribute("name");
+
+ getLogger().debug("configuring constraint [" + String.valueOf(id) + "]");
+
+ if (validValues.size() == 0) {
+ Configuration[] choices = configuration.getChildren("choice");
+ for(int i=0;i<choices.length;i++) {
+ Configuration choice = choices[i];
+ String value = choice.getAttribute("value");
+ String valueDescription = choice.getValue();
+
+ getLogger().debug("registered choice [" + String.valueOf(value) + "] = [" + String.valueOf(valueDescription) + "]");
+
+ validValues.add(value);
+ validValuesDescription.put(value,valueDescription);
+ }
+ }
+ }
+
+ public boolean isSatisfiedBy(Object value, Context context ) {
+ boolean isValid = validValues.contains(value);
+ System.out.println("checking choice [" + String.valueOf(value) + "] contains [" + String.valueOf(validValues) + "] is " + isValid);
+ getLogger().debug("checking choice [" + String.valueOf(value) + "] contains [" + String.valueOf(validValues) + "] is " + isValid);
+ return(isValid);
+ }
+
+ public String getId() {
+ return(id);
+ }
+
+ public String getType() {
+ return("choice");
+ }
+
+ public String toString() {
+ return( String.valueOf(getType()) + "[" + String.valueOf(getId()) + "] -> [" + String.valueOf(validValues) + "]");
+ }
+
+ public void toSAX(ContentHandler handler) throws SAXException {
+ AttributesImpl attributes = new AttributesImpl();
+ attributes.addAttribute("","type","type","CDATA",getType());
+ attributes.addAttribute("","name","name","CDATA",id);
+
+ handler.startElement("","constraint","constraint",attributes);
+ for (Iterator it = validValues.iterator(); it.hasNext();) {
+ String value = (String) it.next();
+ String description = (String) validValuesDescription.get(value);
+
+ AttributesImpl choiceAttributes = new AttributesImpl();
+ choiceAttributes.addAttribute("","value","value","CDATA",value);
+
+ handler.startElement("","choice","choice",choiceAttributes);
+ handler.characters(description.toCharArray(),0,description.length());
+ handler.endElement("","choice","choice");
+ }
+ handler.endElement("","constraint","constraint");
+ }
+
+}
1.3.2.1 +110 -110 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/preceptors/easyrelax/constraints/Attic/RegexprConstraint.java
Index: RegexprConstraint.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/preceptors/easyrelax/constraints/Attic/RegexprConstraint.java,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -u -r1.3 -r1.3.2.1
--- RegexprConstraint.java 26 Mar 2002 19:56:44 -0000 1.3
+++ RegexprConstraint.java 7 Feb 2003 07:25:22 -0000 1.3.2.1
@@ -1,110 +1,110 @@
-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
- used to endorse or promote products derived from this software without
- prior written permission. For written permission, please contact
- apache@apache.org.
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation and was originally created by
- Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
- Software Foundation, please see <http://www.apache.org/>.
-
-*/
-
-package org.apache.cocoon.precept.preceptors.easyrelax.constraints;
-
-import org.apache.cocoon.precept.Context;
-import org.apache.cocoon.precept.ConfigurationHelper;
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.Configurable;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.thread.SingleThreaded;
-import org.apache.regexp.RE;
-import org.apache.regexp.RESyntaxException;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.SAXException;
-
-/*
- * @version: Mar 21, 2002
- * @author: Torsten Curdt <tc...@dff.st>
- */
-public class RegexprConstraint extends AbstractConstraint implements Configurable, SingleThreaded {
-
- private String expressionString;
- private RE expression;
-
- public void configure(Configuration configuration) throws ConfigurationException {
- id = configuration.getAttribute("name");
-
- expressionString = configuration.getValue();
-
- getLogger().debug("expression [" + String.valueOf(expressionString) + "]");
-
- try {
- expression = new RE(expressionString);
- }
- catch (RESyntaxException e) {
- throw new ConfigurationException("",e);
- }
- }
-
- public boolean isSatisfiedBy(Object value, Context context ) {
- boolean isValid = expression.match(String.valueOf(value));
- System.out.println("checking regexpr [" + String.valueOf(value) + "] matches [" + String.valueOf(expressionString) + "] is " + isValid);
- getLogger().debug("checking regexpr [" + String.valueOf(value) + "] matches [" + String.valueOf(expressionString) + "] is " + isValid);
- return(isValid);
- }
-
- public String getId() {
- return(id);
- }
-
- public String getType() {
- return("regexpr");
- }
-
- public String toString() {
- return( String.valueOf(getType()) + "[" + String.valueOf(getId()) + "] -> [" + String.valueOf(expressionString) + "]");
- }
-
- public void toSAX(ContentHandler handler) throws SAXException {
- }
-}
+/*
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
+ used to endorse or promote products derived from this software without
+ prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package org.apache.cocoon.precept.preceptors.easyrelax.constraints;
+
+import org.apache.cocoon.precept.Context;
+import org.apache.cocoon.precept.ConfigurationHelper;
+import org.apache.avalon.framework.configuration.Configuration;
+import org.apache.avalon.framework.configuration.Configurable;
+import org.apache.avalon.framework.configuration.ConfigurationException;
+import org.apache.avalon.framework.thread.SingleThreaded;
+import org.apache.regexp.RE;
+import org.apache.regexp.RESyntaxException;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.SAXException;
+
+/*
+ * @version: Mar 21, 2002
+ * @author: Torsten Curdt <tc...@dff.st>
+ */
+public class RegexprConstraint extends AbstractConstraint implements Configurable, SingleThreaded {
+
+ private String expressionString;
+ private RE expression;
+
+ public void configure(Configuration configuration) throws ConfigurationException {
+ id = configuration.getAttribute("name");
+
+ expressionString = configuration.getValue();
+
+ getLogger().debug("expression [" + String.valueOf(expressionString) + "]");
+
+ try {
+ expression = new RE(expressionString);
+ }
+ catch (RESyntaxException e) {
+ throw new ConfigurationException("",e);
+ }
+ }
+
+ public boolean isSatisfiedBy(Object value, Context context ) {
+ boolean isValid = expression.match(String.valueOf(value));
+ System.out.println("checking regexpr [" + String.valueOf(value) + "] matches [" + String.valueOf(expressionString) + "] is " + isValid);
+ getLogger().debug("checking regexpr [" + String.valueOf(value) + "] matches [" + String.valueOf(expressionString) + "] is " + isValid);
+ return(isValid);
+ }
+
+ public String getId() {
+ return(id);
+ }
+
+ public String getType() {
+ return("regexpr");
+ }
+
+ public String toString() {
+ return( String.valueOf(getType()) + "[" + String.valueOf(getId()) + "] -> [" + String.valueOf(expressionString) + "]");
+ }
+
+ public void toSAX(ContentHandler handler) throws SAXException {
+ }
+}
1.3.2.1 +64 -64 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/preceptors/easyrelax/constraints/Attic/AbstractConstraint.java
Index: AbstractConstraint.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/preceptors/easyrelax/constraints/Attic/AbstractConstraint.java,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -u -r1.3 -r1.3.2.1
--- AbstractConstraint.java 26 Mar 2002 19:56:44 -0000 1.3
+++ AbstractConstraint.java 7 Feb 2003 07:25:22 -0000 1.3.2.1
@@ -1,64 +1,64 @@
-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
- used to endorse or promote products derived from this software without
- prior written permission. For written permission, please contact
- apache@apache.org.
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation and was originally created by
- Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
- Software Foundation, please see <http://www.apache.org/>.
-
-*/
-
-package org.apache.cocoon.precept.preceptors.easyrelax.constraints;
-
-import org.apache.cocoon.precept.Constraint;
-import org.apache.avalon.framework.logger.AbstractLoggable;
-import org.apache.avalon.framework.component.Component;
-
-/*
- * @version: Mar 21, 2002
- * @author: Torsten Curdt <tc...@dff.st>
- */
-public abstract class AbstractConstraint extends AbstractLoggable implements Constraint, Component {
- protected String id = null;
-}
+/*
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
+ used to endorse or promote products derived from this software without
+ prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package org.apache.cocoon.precept.preceptors.easyrelax.constraints;
+
+import org.apache.cocoon.precept.Constraint;
+import org.apache.avalon.framework.logger.AbstractLoggable;
+import org.apache.avalon.framework.component.Component;
+
+/*
+ * @version: Mar 21, 2002
+ * @author: Torsten Curdt <tc...@dff.st>
+ */
+public abstract class AbstractConstraint extends AbstractLoggable implements Constraint, Component {
+ protected String id = null;
+}
No revision
No revision
1.3.2.1 +187 -187 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/stores/bean/Attic/InstanceImpl.java
Index: InstanceImpl.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/stores/bean/Attic/InstanceImpl.java,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -u -r1.3 -r1.3.2.1
--- InstanceImpl.java 4 Apr 2002 14:12:47 -0000 1.3
+++ InstanceImpl.java 7 Feb 2003 07:25:22 -0000 1.3.2.1
@@ -1,187 +1,187 @@
-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
- used to endorse or promote products derived from this software without
- prior written permission. For written permission, please contact
- apache@apache.org.
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation and was originally created by
- Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
- Software Foundation, please see <http://www.apache.org/>.
-
-*/
-
-package org.apache.cocoon.precept.stores.bean;
-
-import org.apache.avalon.framework.component.ComponentException;
-import org.apache.avalon.framework.configuration.Configurable;
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.cocoon.components.classloader.ClassLoaderManager;
-import org.apache.cocoon.xml.DocumentHandlerAdapter;
-import org.apache.commons.jxpath.JXPathContext;
-import org.exolab.castor.mapping.Mapping;
-import org.exolab.castor.mapping.MappingException;
-import org.exolab.castor.xml.MarshalException;
-import org.exolab.castor.xml.Marshaller;
-import org.exolab.castor.xml.ValidationException;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.SAXException;
-import org.apache.cocoon.precept.*;
-import org.apache.cocoon.precept.stores.AbstractInstance;
-
-import java.util.List;
-import java.util.Collection;
-
-/*
- * @version: Mar 15, 2002
- * @author: Torsten Curdt <tc...@dff.st>
- */
-public class InstanceImpl extends AbstractInstance implements Configurable {
- private Preceptor preceptor;
- private Mapping mapping;
- private Object bean;
- private JXPathContext beanContext;
-
- public void setBean(Object bean) {
- this.bean = bean;
- this.beanContext = JXPathContext.newContext(bean);
- }
-
- public void configure(Configuration configuration) throws ConfigurationException {
- Configuration clazzConf = configuration.getChild("class");
- if (clazzConf != null) {
- ClassLoaderManager clazzLoader = null;
- try {
- String clazzName = clazzConf.getValue();
- String mappingURI = clazzConf.getAttribute("mapping");
-
- if (mappingURI != null) {
- mapping = new Mapping();
- // resolve
- //mapping.loadMapping(getFile(resolver,mappingURI));
- getLogger().debug("bean class = [" + String.valueOf(clazzName) + "] mapping [" + String.valueOf(mappingURI) + "]");
- }
- else {
- getLogger().debug("bean class = [" + String.valueOf(clazzName) + "] using default mapping");
- }
-
- clazzLoader = (ClassLoaderManager) manager.lookup(ClassLoaderManager.ROLE);
- Class clazz = clazzLoader.loadClass(clazzName);
- setBean(clazz.newInstance());
- }
- catch (ComponentException e) {
- throw new ConfigurationException("", e);
- }
- catch (ClassNotFoundException e) {
- throw new ConfigurationException("", e);
- }
- catch (InstantiationException e) {
- throw new ConfigurationException("", e);
- }
- catch (IllegalAccessException e) {
- throw new ConfigurationException("", e);
- }
- finally {
- manager.release(clazzLoader);
- }
- }
- }
-
- public void setValue(String xpath, Object value) throws PreceptorViolationException, InvalidXPathSyntaxException {
- setValue(xpath, value, null);
- }
-
- public void setValue(String xpath, Object value, Context context) throws PreceptorViolationException, InvalidXPathSyntaxException {
- try {
- beanContext.setValue(xpath, value);
- }
- catch (Exception e) {
- throw new PreceptorViolationException(e);
- }
- }
-
- public Object getValue(String xpath) throws InvalidXPathSyntaxException {
- try {
- return (beanContext.getValue(xpath));
- }
- catch (Exception e) {
- throw new InvalidXPathSyntaxException(e);
- }
- }
-
- public void setPreceptor(Preceptor preceptor) {
- this.preceptor = preceptor;
- preceptor.buildInstance(this);
- }
-
- public Preceptor getPreceptor() {
- return (preceptor);
- }
-
- public long getLastModified() {
- //NYI
- return 0;
- }
-
- public void toSAX(ContentHandler handler, boolean withConstraints) throws SAXException {
- try {
- Marshaller marshaller = new Marshaller(new DocumentHandlerAdapter(handler));
- if (mapping != null) {
- marshaller.setMapping(mapping);
- }
- marshaller.marshal(bean);
- }
- catch (ValidationException e) {
- throw new SAXException(e);
- }
- catch (MappingException e) {
- throw new SAXException(e);
- }
- catch (MarshalException e) {
- throw new SAXException(e);
- }
- }
-
- public Collection getNodePaths() {
- return null;
- }
-}
+/*
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
+ used to endorse or promote products derived from this software without
+ prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package org.apache.cocoon.precept.stores.bean;
+
+import org.apache.avalon.framework.component.ComponentException;
+import org.apache.avalon.framework.configuration.Configurable;
+import org.apache.avalon.framework.configuration.Configuration;
+import org.apache.avalon.framework.configuration.ConfigurationException;
+import org.apache.cocoon.components.classloader.ClassLoaderManager;
+import org.apache.cocoon.xml.DocumentHandlerAdapter;
+import org.apache.commons.jxpath.JXPathContext;
+import org.exolab.castor.mapping.Mapping;
+import org.exolab.castor.mapping.MappingException;
+import org.exolab.castor.xml.MarshalException;
+import org.exolab.castor.xml.Marshaller;
+import org.exolab.castor.xml.ValidationException;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.SAXException;
+import org.apache.cocoon.precept.*;
+import org.apache.cocoon.precept.stores.AbstractInstance;
+
+import java.util.List;
+import java.util.Collection;
+
+/*
+ * @version: Mar 15, 2002
+ * @author: Torsten Curdt <tc...@dff.st>
+ */
+public class InstanceImpl extends AbstractInstance implements Configurable {
+ private Preceptor preceptor;
+ private Mapping mapping;
+ private Object bean;
+ private JXPathContext beanContext;
+
+ public void setBean(Object bean) {
+ this.bean = bean;
+ this.beanContext = JXPathContext.newContext(bean);
+ }
+
+ public void configure(Configuration configuration) throws ConfigurationException {
+ Configuration clazzConf = configuration.getChild("class");
+ if (clazzConf != null) {
+ ClassLoaderManager clazzLoader = null;
+ try {
+ String clazzName = clazzConf.getValue();
+ String mappingURI = clazzConf.getAttribute("mapping");
+
+ if (mappingURI != null) {
+ mapping = new Mapping();
+ // resolve
+ //mapping.loadMapping(getFile(resolver,mappingURI));
+ getLogger().debug("bean class = [" + String.valueOf(clazzName) + "] mapping [" + String.valueOf(mappingURI) + "]");
+ }
+ else {
+ getLogger().debug("bean class = [" + String.valueOf(clazzName) + "] using default mapping");
+ }
+
+ clazzLoader = (ClassLoaderManager) manager.lookup(ClassLoaderManager.ROLE);
+ Class clazz = clazzLoader.loadClass(clazzName);
+ setBean(clazz.newInstance());
+ }
+ catch (ComponentException e) {
+ throw new ConfigurationException("", e);
+ }
+ catch (ClassNotFoundException e) {
+ throw new ConfigurationException("", e);
+ }
+ catch (InstantiationException e) {
+ throw new ConfigurationException("", e);
+ }
+ catch (IllegalAccessException e) {
+ throw new ConfigurationException("", e);
+ }
+ finally {
+ manager.release(clazzLoader);
+ }
+ }
+ }
+
+ public void setValue(String xpath, Object value) throws PreceptorViolationException, InvalidXPathSyntaxException {
+ setValue(xpath, value, null);
+ }
+
+ public void setValue(String xpath, Object value, Context context) throws PreceptorViolationException, InvalidXPathSyntaxException {
+ try {
+ beanContext.setValue(xpath, value);
+ }
+ catch (Exception e) {
+ throw new PreceptorViolationException(e);
+ }
+ }
+
+ public Object getValue(String xpath) throws InvalidXPathSyntaxException {
+ try {
+ return (beanContext.getValue(xpath));
+ }
+ catch (Exception e) {
+ throw new InvalidXPathSyntaxException(e);
+ }
+ }
+
+ public void setPreceptor(Preceptor preceptor) {
+ this.preceptor = preceptor;
+ preceptor.buildInstance(this);
+ }
+
+ public Preceptor getPreceptor() {
+ return (preceptor);
+ }
+
+ public long getLastModified() {
+ //NYI
+ return 0;
+ }
+
+ public void toSAX(ContentHandler handler, boolean withConstraints) throws SAXException {
+ try {
+ Marshaller marshaller = new Marshaller(new DocumentHandlerAdapter(handler));
+ if (mapping != null) {
+ marshaller.setMapping(mapping);
+ }
+ marshaller.marshal(bean);
+ }
+ catch (ValidationException e) {
+ throw new SAXException(e);
+ }
+ catch (MappingException e) {
+ throw new SAXException(e);
+ }
+ catch (MarshalException e) {
+ throw new SAXException(e);
+ }
+ }
+
+ public Collection getNodePaths() {
+ return null;
+ }
+}
No revision
No revision
1.8.2.2 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/xml/Attic/XMLUtil.java
Index: XMLUtil.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/xml/Attic/XMLUtil.java,v
retrieving revision 1.8.2.1
retrieving revision 1.8.2.2
diff -u -r1.8.2.1 -r1.8.2.2
--- XMLUtil.java 7 Jun 2002 09:34:27 -0000 1.8.2.1
+++ XMLUtil.java 7 Feb 2003 07:25:22 -0000 1.8.2.2
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1.2.2.1 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/xml/Attic/NodeListImpl.java
Index: NodeListImpl.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/xml/Attic/NodeListImpl.java,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- NodeListImpl.java 22 Feb 2002 06:57:19 -0000 1.2
+++ NodeListImpl.java 7 Feb 2003 07:25:22 -0000 1.2.2.1
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
No revision
No revision
1.2.2.1 +72 -72 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/preceptors/easyrelax/Attic/ConstraintFactory.java
Index: ConstraintFactory.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/preceptors/easyrelax/Attic/ConstraintFactory.java,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- ConstraintFactory.java 25 Mar 2002 23:23:54 -0000 1.2
+++ ConstraintFactory.java 7 Feb 2003 07:25:22 -0000 1.2.2.1
@@ -1,72 +1,72 @@
-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
- used to endorse or promote products derived from this software without
- prior written permission. For written permission, please contact
- apache@apache.org.
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation and was originally created by
- Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
- Software Foundation, please see <http://www.apache.org/>.
-
-*/
-
-package org.apache.cocoon.precept.preceptors.easyrelax;
-
-import org.apache.cocoon.precept.Constraint;
-import org.apache.cocoon.precept.preceptors.easyrelax.constraints.ChoiceConstraint;
-import org.apache.cocoon.precept.preceptors.easyrelax.constraints.RegexprConstraint;
-import org.apache.avalon.framework.configuration.Configuration;
-
-/*
- * @version: Mar 21, 2002
- * @author: Torsten Curdt <tc...@dff.st>
- */
-public class ConstraintFactory {
- public Constraint createConstraintInstance(String type, String name, Object context, Configuration conf) {
- if ("choice".equals(type)) {
- return(new ChoiceConstraint());
- }
- else {
- return(new RegexprConstraint());
- }
- }
-}
+/*
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
+ used to endorse or promote products derived from this software without
+ prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package org.apache.cocoon.precept.preceptors.easyrelax;
+
+import org.apache.cocoon.precept.Constraint;
+import org.apache.cocoon.precept.preceptors.easyrelax.constraints.ChoiceConstraint;
+import org.apache.cocoon.precept.preceptors.easyrelax.constraints.RegexprConstraint;
+import org.apache.avalon.framework.configuration.Configuration;
+
+/*
+ * @version: Mar 21, 2002
+ * @author: Torsten Curdt <tc...@dff.st>
+ */
+public class ConstraintFactory {
+ public Constraint createConstraintInstance(String type, String name, Object context, Configuration conf) {
+ if ("choice".equals(type)) {
+ return(new ChoiceConstraint());
+ }
+ else {
+ return(new RegexprConstraint());
+ }
+ }
+}
1.2.2.1 +224 -224 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/preceptors/easyrelax/Attic/ElementPreceptorNode.java
Index: ElementPreceptorNode.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/preceptors/easyrelax/Attic/ElementPreceptorNode.java,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- ElementPreceptorNode.java 25 Mar 2002 23:23:54 -0000 1.2
+++ ElementPreceptorNode.java 7 Feb 2003 07:25:22 -0000 1.2.2.1
@@ -1,224 +1,224 @@
-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
- used to endorse or promote products derived from this software without
- prior written permission. For written permission, please contact
- apache@apache.org.
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation and was originally created by
- Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
- Software Foundation, please see <http://www.apache.org/>.
-
-*/
-
-package org.apache.cocoon.precept.preceptors.easyrelax;
-
-
-import org.apache.cocoon.precept.Preceptor;
-import org.apache.cocoon.precept.Constraint;
-
-import java.util.*;
-
-/*
- * @version: Feb 22, 2002
- * @author: Torsten Curdt <tc...@dff.st>
- */
-public class ElementPreceptorNode extends AbstractPreceptorNode {
- public final static int UNBOUND = -1;
-
- private Map childs;
- private Map attributes;
-// private List values;
- private int minOcc;
- private int maxOcc;
-
- public ElementPreceptorNode( Preceptor preceptor, ElementPreceptorNode parent, String name, int minOcc, int maxOcc) {
- this.name = name;
- this.minOcc = minOcc;
- this.maxOcc = maxOcc;
- this.parent = parent;
- this.preceptor = preceptor;
-
- }
-
- public AttributePreceptorNode addAttribute( String name, boolean required, List constraints ) {
- if (attributes == null) attributes = new HashMap();
- AttributePreceptorNode a = new AttributePreceptorNode( preceptor, this, name, required );
- a.addConstraints(constraints);
- attributes.put(name,a);
- return(a);
- }
-
- public ElementPreceptorNode addElement( String name, int min, int max, List constraints ) {
- if (childs == null) childs = new HashMap();
- ElementPreceptorNode e = new ElementPreceptorNode( preceptor, this, name, min, max);
- e.addConstraints(constraints);
- childs.put(name,e);
- return(e);
- }
-
- public ElementPreceptorNode getChild( String name ) {
- if (childs != null) {
- return((ElementPreceptorNode)childs.get(name));
- }
- else {
- return(null);
- }
- }
-
- public Collection getChildElements() {
- if (childs != null) {
- return(childs.values());
- }
- else {
- return(null);
- }
- }
-
- public AttributePreceptorNode getAttribute( String name ) {
- if (attributes != null) {
- return((AttributePreceptorNode)attributes.get(name));
- }
- else {
- return(null);
- }
- }
-
- public Collection getAttributes() {
- if (attributes != null) {
- return(attributes.values());
- }
- else {
- return(null);
- }
- }
-
- public int getMinOcc() {
- return(this.minOcc);
- }
-
- public int getMaxOcc() {
- return(this.maxOcc);
- }
-
-/*
- public StringBuffer setValue(int i, String value) throws PreceptorViolationException {
- if (values == null) values = new ArrayList(1);
-
- if (i <= values.size()) {
- // already there
- StringBuffer valueObject = (StringBuffer) values.get(i-1);
- valueObject.setLength(0);
- valueObject.append(value);
- return(valueObject);
- }
- else {
- // create a slot
- if (i > maxOcc) {
- // restricted
- throw new PreceptorViolationException( String.valueOf(name) + " is out of bound");
- }
- else {
- StringBuffer valueObject = new StringBuffer(value);
- values.add(valueObject);
- return(valueObject);
- }
- }
- }
-
- public StringBuffer getValue(int i) {
- if (values != null && i <= values.size()) {
- // is there
- return((StringBuffer)values.get(i-1));
- }
- else {
- return(null);
- }
- }
-
- public int valueCount() {
- if (values != null) {
- return(values.size());
- }
- else {
- return(0);
- }
- }
- */
-
- public void toStringBuffer( StringBuffer sb, ElementPreceptorNode e, int depth) {
- StringBuffer ident = new StringBuffer();
- for(int i=0;i<depth*3;i++) ident.append(" ");
-
- sb.append("\n").append(ident).append("<").append(e.getName());
- sb.append("[").append(e.getMinOcc()).append(",").append(e.getMaxOcc()).append("]");
-
- Collection attributes = e.getAttributes();
- if (attributes != null) {
- for (Iterator it = attributes.iterator(); it.hasNext();) {
- AttributePreceptorNode attr = (AttributePreceptorNode) it.next();
- attr.toStringBuffer(sb,depth);
- }
- }
-
- sb.append(">");
-
- if (e.getConstraints() != null) {
- for (Iterator it = e.getConstraints().iterator(); it.hasNext();) {
- Constraint constraint = (Constraint) it.next();
- sb.append("{").append(constraint.getType()).append("}");
- }
- }
- else {
- sb.append("{*}");
- }
-
- Collection childs = e.getChildElements();
- if (childs != null) {
- for (Iterator it = childs.iterator(); it.hasNext();) {
- ElementPreceptorNode child = (ElementPreceptorNode) it.next();
- toStringBuffer(sb, child, depth + 1);
- }
- }
- sb.append("</").append(e.getName()).append(">");
- }
-
-}
+/*
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
+ used to endorse or promote products derived from this software without
+ prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package org.apache.cocoon.precept.preceptors.easyrelax;
+
+
+import org.apache.cocoon.precept.Preceptor;
+import org.apache.cocoon.precept.Constraint;
+
+import java.util.*;
+
+/*
+ * @version: Feb 22, 2002
+ * @author: Torsten Curdt <tc...@dff.st>
+ */
+public class ElementPreceptorNode extends AbstractPreceptorNode {
+ public final static int UNBOUND = -1;
+
+ private Map childs;
+ private Map attributes;
+// private List values;
+ private int minOcc;
+ private int maxOcc;
+
+ public ElementPreceptorNode( Preceptor preceptor, ElementPreceptorNode parent, String name, int minOcc, int maxOcc) {
+ this.name = name;
+ this.minOcc = minOcc;
+ this.maxOcc = maxOcc;
+ this.parent = parent;
+ this.preceptor = preceptor;
+
+ }
+
+ public AttributePreceptorNode addAttribute( String name, boolean required, List constraints ) {
+ if (attributes == null) attributes = new HashMap();
+ AttributePreceptorNode a = new AttributePreceptorNode( preceptor, this, name, required );
+ a.addConstraints(constraints);
+ attributes.put(name,a);
+ return(a);
+ }
+
+ public ElementPreceptorNode addElement( String name, int min, int max, List constraints ) {
+ if (childs == null) childs = new HashMap();
+ ElementPreceptorNode e = new ElementPreceptorNode( preceptor, this, name, min, max);
+ e.addConstraints(constraints);
+ childs.put(name,e);
+ return(e);
+ }
+
+ public ElementPreceptorNode getChild( String name ) {
+ if (childs != null) {
+ return((ElementPreceptorNode)childs.get(name));
+ }
+ else {
+ return(null);
+ }
+ }
+
+ public Collection getChildElements() {
+ if (childs != null) {
+ return(childs.values());
+ }
+ else {
+ return(null);
+ }
+ }
+
+ public AttributePreceptorNode getAttribute( String name ) {
+ if (attributes != null) {
+ return((AttributePreceptorNode)attributes.get(name));
+ }
+ else {
+ return(null);
+ }
+ }
+
+ public Collection getAttributes() {
+ if (attributes != null) {
+ return(attributes.values());
+ }
+ else {
+ return(null);
+ }
+ }
+
+ public int getMinOcc() {
+ return(this.minOcc);
+ }
+
+ public int getMaxOcc() {
+ return(this.maxOcc);
+ }
+
+/*
+ public StringBuffer setValue(int i, String value) throws PreceptorViolationException {
+ if (values == null) values = new ArrayList(1);
+
+ if (i <= values.size()) {
+ // already there
+ StringBuffer valueObject = (StringBuffer) values.get(i-1);
+ valueObject.setLength(0);
+ valueObject.append(value);
+ return(valueObject);
+ }
+ else {
+ // create a slot
+ if (i > maxOcc) {
+ // restricted
+ throw new PreceptorViolationException( String.valueOf(name) + " is out of bound");
+ }
+ else {
+ StringBuffer valueObject = new StringBuffer(value);
+ values.add(valueObject);
+ return(valueObject);
+ }
+ }
+ }
+
+ public StringBuffer getValue(int i) {
+ if (values != null && i <= values.size()) {
+ // is there
+ return((StringBuffer)values.get(i-1));
+ }
+ else {
+ return(null);
+ }
+ }
+
+ public int valueCount() {
+ if (values != null) {
+ return(values.size());
+ }
+ else {
+ return(0);
+ }
+ }
+ */
+
+ public void toStringBuffer( StringBuffer sb, ElementPreceptorNode e, int depth) {
+ StringBuffer ident = new StringBuffer();
+ for(int i=0;i<depth*3;i++) ident.append(" ");
+
+ sb.append("\n").append(ident).append("<").append(e.getName());
+ sb.append("[").append(e.getMinOcc()).append(",").append(e.getMaxOcc()).append("]");
+
+ Collection attributes = e.getAttributes();
+ if (attributes != null) {
+ for (Iterator it = attributes.iterator(); it.hasNext();) {
+ AttributePreceptorNode attr = (AttributePreceptorNode) it.next();
+ attr.toStringBuffer(sb,depth);
+ }
+ }
+
+ sb.append(">");
+
+ if (e.getConstraints() != null) {
+ for (Iterator it = e.getConstraints().iterator(); it.hasNext();) {
+ Constraint constraint = (Constraint) it.next();
+ sb.append("{").append(constraint.getType()).append("}");
+ }
+ }
+ else {
+ sb.append("{*}");
+ }
+
+ Collection childs = e.getChildElements();
+ if (childs != null) {
+ for (Iterator it = childs.iterator(); it.hasNext();) {
+ ElementPreceptorNode child = (ElementPreceptorNode) it.next();
+ toStringBuffer(sb, child, depth + 1);
+ }
+ }
+ sb.append("</").append(e.getName()).append(">");
+ }
+
+}
1.2.2.1 +115 -115 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/preceptors/easyrelax/Attic/AbstractPreceptorNode.java
Index: AbstractPreceptorNode.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/preceptors/easyrelax/Attic/AbstractPreceptorNode.java,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- AbstractPreceptorNode.java 25 Mar 2002 23:23:54 -0000 1.2
+++ AbstractPreceptorNode.java 7 Feb 2003 07:25:22 -0000 1.2.2.1
@@ -1,115 +1,115 @@
-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
- used to endorse or promote products derived from this software without
- prior written permission. For written permission, please contact
- apache@apache.org.
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation and was originally created by
- Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
- Software Foundation, please see <http://www.apache.org/>.
-
-*/
-
-package org.apache.cocoon.precept.preceptors.easyrelax;
-
-import org.apache.cocoon.precept.Preceptor;
-import org.apache.cocoon.precept.Constraint;
-
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-/*
- * @version: Feb 22, 2002
- * @author: Torsten Curdt <tc...@dff.st>
- */
-public abstract class AbstractPreceptorNode {
- protected String name;
- protected List constraints;
- protected ElementPreceptorNode parent;
- protected Preceptor preceptor;
-
-
- public String getName() {
- return(this.name);
- }
-
- public ElementPreceptorNode getParent() {
- return(this.parent);
- }
-
- public List validate(Object value) {
- if (constraints != null) {
- for (Iterator it = constraints.iterator(); it.hasNext();) {
- Constraint constraint = (Constraint) it.next();
- }
- return(null);
- }
- else {
- return(null);
- }
- }
-
- public List getConstraints() {
- return(constraints);
- }
-
- public AbstractPreceptorNode addConstraints(List constraints) {
- if (constraints != null) {
- if (this.constraints == null) {
- this.constraints = new ArrayList(constraints.size());
- }
- this.constraints.addAll(constraints);
- }
- return(this);
- }
-
- public AbstractPreceptorNode addConstraint(Constraint constraint) {
- if (constraint != null) {
- if (this.constraints == null){
- this.constraints = new ArrayList(1);
- }
- this.constraints.add(constraint);
- }
- return(this);
- }
-}
+/*
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
+ used to endorse or promote products derived from this software without
+ prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package org.apache.cocoon.precept.preceptors.easyrelax;
+
+import org.apache.cocoon.precept.Preceptor;
+import org.apache.cocoon.precept.Constraint;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Iterator;
+
+/*
+ * @version: Feb 22, 2002
+ * @author: Torsten Curdt <tc...@dff.st>
+ */
+public abstract class AbstractPreceptorNode {
+ protected String name;
+ protected List constraints;
+ protected ElementPreceptorNode parent;
+ protected Preceptor preceptor;
+
+
+ public String getName() {
+ return(this.name);
+ }
+
+ public ElementPreceptorNode getParent() {
+ return(this.parent);
+ }
+
+ public List validate(Object value) {
+ if (constraints != null) {
+ for (Iterator it = constraints.iterator(); it.hasNext();) {
+ Constraint constraint = (Constraint) it.next();
+ }
+ return(null);
+ }
+ else {
+ return(null);
+ }
+ }
+
+ public List getConstraints() {
+ return(constraints);
+ }
+
+ public AbstractPreceptorNode addConstraints(List constraints) {
+ if (constraints != null) {
+ if (this.constraints == null) {
+ this.constraints = new ArrayList(constraints.size());
+ }
+ this.constraints.addAll(constraints);
+ }
+ return(this);
+ }
+
+ public AbstractPreceptorNode addConstraint(Constraint constraint) {
+ if (constraint != null) {
+ if (this.constraints == null){
+ this.constraints = new ArrayList(1);
+ }
+ this.constraints.add(constraint);
+ }
+ return(this);
+ }
+}
1.3.2.1 +60 -60 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/preceptors/easyrelax/Attic/PreceptorBuilderImpl.java
Index: PreceptorBuilderImpl.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/preceptors/easyrelax/Attic/PreceptorBuilderImpl.java,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -u -r1.3 -r1.3.2.1
--- PreceptorBuilderImpl.java 26 Mar 2002 19:56:44 -0000 1.3
+++ PreceptorBuilderImpl.java 7 Feb 2003 07:25:22 -0000 1.3.2.1
@@ -1,54 +1,54 @@
-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
- used to endorse or promote products derived from this software without
- prior written permission. For written permission, please contact
- apache@apache.org.
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation and was originally created by
- Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
- Software Foundation, please see <http://www.apache.org/>.
-
-*/
-
+/*
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
+ used to endorse or promote products derived from this software without
+ prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
package org.apache.cocoon.precept.preceptors.easyrelax;
import org.apache.avalon.excalibur.pool.Poolable;
@@ -77,10 +77,10 @@
import java.util.*;
-/*
- * @version: Feb 23, 2002
- * @author: Torsten Curdt <tc...@dff.st>
- */
+/*
+ * @version: Feb 23, 2002
+ * @author: Torsten Curdt <tc...@dff.st>
+ */
public class PreceptorBuilderImpl extends AbstractXMLConsumer implements PreceptorBuilder, Composable, Disposable, Poolable {
//public final static String ROLE = "org.apache.cocoon.precept.PreceptorBuilderImpl";
@@ -145,7 +145,7 @@
parser.parse(source);
}
catch (Exception e) {
- e.printStackTrace(System.out);
+ e.printStackTrace(System.out);
getLogger().error("",e);
}
}
@@ -253,8 +253,8 @@
constraintName = attributes.getValue("name");
constraintContext = attributes.getValue("context");
- configurationHandler = new SAXConfigurationHandler();
-
+ configurationHandler = new SAXConfigurationHandler();
+
configurationHandler.startElement("", "constraint", "constraint", new AttributesImpl(attributes));
redirect = configurationHandler;
}
@@ -351,8 +351,8 @@
try {
((Configurable)constraint).configure(configurationHandler.getConfiguration());
}
- catch(Throwable t) {
- getLogger().error("",t);
+ catch(Throwable t) {
+ getLogger().error("",t);
}
}
1.4.2.1 +228 -228 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/preceptors/easyrelax/Attic/PreceptorImpl.java
Index: PreceptorImpl.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/preceptors/easyrelax/Attic/PreceptorImpl.java,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -u -r1.4 -r1.4.2.1
--- PreceptorImpl.java 4 Apr 2002 14:12:47 -0000 1.4
+++ PreceptorImpl.java 7 Feb 2003 07:25:22 -0000 1.4.2.1
@@ -1,228 +1,228 @@
-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
- used to endorse or promote products derived from this software without
- prior written permission. For written permission, please contact
- apache@apache.org.
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation and was originally created by
- Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
- Software Foundation, please see <http://www.apache.org/>.
-
-*/
-
-package org.apache.cocoon.precept.preceptors.easyrelax;
-
-import org.apache.cocoon.precept.*;
-import org.apache.cocoon.precept.preceptors.AbstractPreceptor;
-
-import java.util.*;
-
-/*
- * @version: Mar 14, 2002
- * @author: Torsten Curdt <tc...@dff.st>
- */
-
-public class PreceptorImpl extends AbstractPreceptor {
- HashMap index = new HashMap();
-
- public Collection validate(Instance instance, String xpath, Context context) throws InvalidXPathSyntaxException, NoSuchNodeException {
- Collection violations = null;
- Collection constraints = (Collection) getConstraintsFor(xpath);
- if (constraints != null) {
- Object value = instance.getValue(xpath);
- for (Iterator it = constraints.iterator(); it.hasNext();) {
- Constraint constraint = (Constraint) it.next();
- if (!constraint.isSatisfiedBy(value, context)) {
- if (violations == null) {
- violations = new HashSet();
- }
- violations.add(constraint);
- }
- }
- return (violations);
- }
- else {
- return (null);
- }
- }
-
- public Collection validate(Instance instance, Context context) throws InvalidXPathSyntaxException {
- Collection allViolations = null;
- Collection xpaths = instance.getNodePaths();
- for (Iterator it = xpaths.iterator(); it.hasNext();) {
- String xpath = (String) it.next();
- try {
- Collection violations = validate(instance, xpath, context);
- if (violations != null) {
- if (allViolations == null) {
- allViolations = new HashSet();
- }
- allViolations.addAll(violations);
- }
- }
- catch (NoSuchNodeException e) {
- getLogger().error("hm.. the instance just told us about the nodes!");
- }
- }
- return (allViolations);
- }
-
- public Collection getConstraintsFor(String xpath) throws NoSuchNodeException {
- AbstractPreceptorNode node = (AbstractPreceptorNode) index.get(xpath);
- if (node != null) {
- List constraints = node.getConstraints();
- if (constraints != null) {
- getLogger().debug(constraints.size() + " constraints for [" + String.valueOf(xpath) + "]");
- return (constraints);
- }
- else {
- getLogger().debug("no constraints for [" + String.valueOf(xpath) + "]");
- return (null);
- }
- }
- else {
- throw new NoSuchNodeException(xpath);
- }
- }
-
- public void buildInstance(Instance instance) {
- try {
- for (Iterator it = index.keySet().iterator(); it.hasNext();) {
- String xpath = (String) it.next();
- AbstractPreceptorNode node = (AbstractPreceptorNode) index.get(xpath);
- if (node instanceof ElementPreceptorNode) {
- for (int i = 0; i < ((ElementPreceptorNode) node).getMinOcc(); i++) {
- String s = xpath;
- if (i != 0) {
- s += "[" + (i + 1) + "]";
- }
- getLogger().debug("building node [" + String.valueOf(s) + "]");
- instance.setValue(s, "");
- }
- }
- else {
- getLogger().debug("building node [" + String.valueOf(xpath) + "]");
- instance.setValue(xpath, "");
- }
- }
- }
- catch (InvalidXPathSyntaxException e) {
- getLogger().error("hm.. the preceptor should know how to build the instance!");
- }
- catch (PreceptorViolationException e) {
- getLogger().error("hm.. the preceptor should know how to build the instance!");
- }
- }
-
- public boolean isValidNode(String xpath) throws InvalidXPathSyntaxException {
- StringBuffer currentPath = new StringBuffer();
- StringTokenizer tok = new StringTokenizer(xpath, "/", false);
- boolean first = true;
- while (tok.hasMoreTokens()) {
- String level = tok.nextToken();
- if (!first) {
- currentPath.append("/");
- }
- else {
- first = false;
- }
-
- if (level.startsWith("@")) {
- currentPath.append(level);
- AbstractPreceptorNode node = (AbstractPreceptorNode) index.get(currentPath.toString());
- if (node != null) {
- getLogger().debug("found attribute node [" + String.valueOf(currentPath) + "] in index");
- return (true);
- }
- else {
- getLogger().debug("could not find attribute [" + String.valueOf(currentPath) + "] in index");
- return (false);
- }
- }
- else {
- String levelName;
- int levelInt = 1;
- int open = level.indexOf("[");
- if (open > 0) {
- int close = level.indexOf("]", open);
- if (close > 0) {
- try {
- levelInt = Integer.parseInt(level.substring(open + 1, close));
- levelName = level.substring(0, open);
- }
- catch (NumberFormatException e) {
- getLogger().debug("invalid syntax [" + String.valueOf(level) + "]");
- throw new InvalidXPathSyntaxException(level);
- }
- }
- else {
- getLogger().debug("invalid syntax [" + String.valueOf(level) + "]");
- throw new InvalidXPathSyntaxException(level);
- }
- }
- else {
- levelName = level;
- }
-
- currentPath.append(levelName);
- AbstractPreceptorNode node = (AbstractPreceptorNode) index.get(currentPath.toString());
- if (node != null) {
- getLogger().debug("found node [" + String.valueOf(currentPath) + "] in index");
-
- if (node instanceof ElementPreceptorNode) {
- if (((ElementPreceptorNode) node).getMaxOcc() != ElementPreceptorNode.UNBOUND && levelInt > ((ElementPreceptorNode) node).getMaxOcc()) {
- getLogger().debug(String.valueOf(levelName) + "[" + levelInt + "] exceeds maximal occurrences [" + ((ElementPreceptorNode) node).getMaxOcc() + "]");
- return (false);
- }
- }
-
- if (!tok.hasMoreTokens()) return (true);
- }
- else {
- getLogger().debug("could not find [" + String.valueOf(currentPath) + "] in index");
- return (false);
- }
- }
- }
- return (false);
- }
-}
+/*
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
+ used to endorse or promote products derived from this software without
+ prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package org.apache.cocoon.precept.preceptors.easyrelax;
+
+import org.apache.cocoon.precept.*;
+import org.apache.cocoon.precept.preceptors.AbstractPreceptor;
+
+import java.util.*;
+
+/*
+ * @version: Mar 14, 2002
+ * @author: Torsten Curdt <tc...@dff.st>
+ */
+
+public class PreceptorImpl extends AbstractPreceptor {
+ HashMap index = new HashMap();
+
+ public Collection validate(Instance instance, String xpath, Context context) throws InvalidXPathSyntaxException, NoSuchNodeException {
+ Collection violations = null;
+ Collection constraints = (Collection) getConstraintsFor(xpath);
+ if (constraints != null) {
+ Object value = instance.getValue(xpath);
+ for (Iterator it = constraints.iterator(); it.hasNext();) {
+ Constraint constraint = (Constraint) it.next();
+ if (!constraint.isSatisfiedBy(value, context)) {
+ if (violations == null) {
+ violations = new HashSet();
+ }
+ violations.add(constraint);
+ }
+ }
+ return (violations);
+ }
+ else {
+ return (null);
+ }
+ }
+
+ public Collection validate(Instance instance, Context context) throws InvalidXPathSyntaxException {
+ Collection allViolations = null;
+ Collection xpaths = instance.getNodePaths();
+ for (Iterator it = xpaths.iterator(); it.hasNext();) {
+ String xpath = (String) it.next();
+ try {
+ Collection violations = validate(instance, xpath, context);
+ if (violations != null) {
+ if (allViolations == null) {
+ allViolations = new HashSet();
+ }
+ allViolations.addAll(violations);
+ }
+ }
+ catch (NoSuchNodeException e) {
+ getLogger().error("hm.. the instance just told us about the nodes!");
+ }
+ }
+ return (allViolations);
+ }
+
+ public Collection getConstraintsFor(String xpath) throws NoSuchNodeException {
+ AbstractPreceptorNode node = (AbstractPreceptorNode) index.get(xpath);
+ if (node != null) {
+ List constraints = node.getConstraints();
+ if (constraints != null) {
+ getLogger().debug(constraints.size() + " constraints for [" + String.valueOf(xpath) + "]");
+ return (constraints);
+ }
+ else {
+ getLogger().debug("no constraints for [" + String.valueOf(xpath) + "]");
+ return (null);
+ }
+ }
+ else {
+ throw new NoSuchNodeException(xpath);
+ }
+ }
+
+ public void buildInstance(Instance instance) {
+ try {
+ for (Iterator it = index.keySet().iterator(); it.hasNext();) {
+ String xpath = (String) it.next();
+ AbstractPreceptorNode node = (AbstractPreceptorNode) index.get(xpath);
+ if (node instanceof ElementPreceptorNode) {
+ for (int i = 0; i < ((ElementPreceptorNode) node).getMinOcc(); i++) {
+ String s = xpath;
+ if (i != 0) {
+ s += "[" + (i + 1) + "]";
+ }
+ getLogger().debug("building node [" + String.valueOf(s) + "]");
+ instance.setValue(s, "");
+ }
+ }
+ else {
+ getLogger().debug("building node [" + String.valueOf(xpath) + "]");
+ instance.setValue(xpath, "");
+ }
+ }
+ }
+ catch (InvalidXPathSyntaxException e) {
+ getLogger().error("hm.. the preceptor should know how to build the instance!");
+ }
+ catch (PreceptorViolationException e) {
+ getLogger().error("hm.. the preceptor should know how to build the instance!");
+ }
+ }
+
+ public boolean isValidNode(String xpath) throws InvalidXPathSyntaxException {
+ StringBuffer currentPath = new StringBuffer();
+ StringTokenizer tok = new StringTokenizer(xpath, "/", false);
+ boolean first = true;
+ while (tok.hasMoreTokens()) {
+ String level = tok.nextToken();
+ if (!first) {
+ currentPath.append("/");
+ }
+ else {
+ first = false;
+ }
+
+ if (level.startsWith("@")) {
+ currentPath.append(level);
+ AbstractPreceptorNode node = (AbstractPreceptorNode) index.get(currentPath.toString());
+ if (node != null) {
+ getLogger().debug("found attribute node [" + String.valueOf(currentPath) + "] in index");
+ return (true);
+ }
+ else {
+ getLogger().debug("could not find attribute [" + String.valueOf(currentPath) + "] in index");
+ return (false);
+ }
+ }
+ else {
+ String levelName;
+ int levelInt = 1;
+ int open = level.indexOf("[");
+ if (open > 0) {
+ int close = level.indexOf("]", open);
+ if (close > 0) {
+ try {
+ levelInt = Integer.parseInt(level.substring(open + 1, close));
+ levelName = level.substring(0, open);
+ }
+ catch (NumberFormatException e) {
+ getLogger().debug("invalid syntax [" + String.valueOf(level) + "]");
+ throw new InvalidXPathSyntaxException(level);
+ }
+ }
+ else {
+ getLogger().debug("invalid syntax [" + String.valueOf(level) + "]");
+ throw new InvalidXPathSyntaxException(level);
+ }
+ }
+ else {
+ levelName = level;
+ }
+
+ currentPath.append(levelName);
+ AbstractPreceptorNode node = (AbstractPreceptorNode) index.get(currentPath.toString());
+ if (node != null) {
+ getLogger().debug("found node [" + String.valueOf(currentPath) + "] in index");
+
+ if (node instanceof ElementPreceptorNode) {
+ if (((ElementPreceptorNode) node).getMaxOcc() != ElementPreceptorNode.UNBOUND && levelInt > ((ElementPreceptorNode) node).getMaxOcc()) {
+ getLogger().debug(String.valueOf(levelName) + "[" + levelInt + "] exceeds maximal occurrences [" + ((ElementPreceptorNode) node).getMaxOcc() + "]");
+ return (false);
+ }
+ }
+
+ if (!tok.hasMoreTokens()) return (true);
+ }
+ else {
+ getLogger().debug("could not find [" + String.valueOf(currentPath) + "] in index");
+ return (false);
+ }
+ }
+ }
+ return (false);
+ }
+}
1.2.2.1 +108 -108 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/preceptors/easyrelax/Attic/AttributePreceptorNode.java
Index: AttributePreceptorNode.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/preceptors/easyrelax/Attic/AttributePreceptorNode.java,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- AttributePreceptorNode.java 25 Mar 2002 23:23:54 -0000 1.2
+++ AttributePreceptorNode.java 7 Feb 2003 07:25:22 -0000 1.2.2.1
@@ -1,108 +1,108 @@
-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
- used to endorse or promote products derived from this software without
- prior written permission. For written permission, please contact
- apache@apache.org.
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation and was originally created by
- Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
- Software Foundation, please see <http://www.apache.org/>.
-
-*/
-
-package org.apache.cocoon.precept.preceptors.easyrelax;
-
-import org.apache.cocoon.precept.Preceptor;
-import org.apache.cocoon.precept.Constraint;
-
-import java.util.List;
-import java.util.Iterator;
-
-/*
- * @version: Feb 22, 2002
- * @author: Torsten Curdt <tc...@dff.st>
- */
-public class AttributePreceptorNode extends AbstractPreceptorNode {
- private boolean required;
- //private StringBuffer valueObject;
-
- public AttributePreceptorNode( Preceptor preceptor, ElementPreceptorNode parent, String name, boolean required ) {
- this.name = name;
- this.required = required;
- this.parent = parent;
- this.preceptor = preceptor;
- }
-
- public boolean isRequired() {
- return(required);
- }
-
- public void toStringBuffer( StringBuffer sb, int depth) {
- sb.append(" ").append(name).append("=");
-
- if (constraints != null) {
- for (Iterator it = constraints.iterator(); it.hasNext();) {
- Constraint constraint = (Constraint) it.next();
- sb.append("{").append(constraint.getType()).append("}");
- }
- }
-
- sb.append("[").append( (required)?"required":"optional" ).append("]");
- }
-
-/*
- public StringBuffer setValue( String value ) {
- if (valueObject == null){
- valueObject = new StringBuffer(value);
- }
- else {
- valueObject.setLength(0);
- valueObject.append(value);
- }
- return(valueObject);
- }
-
- public StringBuffer getValue() {
- return(valueObject);
- }
- */
-}
+/*
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
+ used to endorse or promote products derived from this software without
+ prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package org.apache.cocoon.precept.preceptors.easyrelax;
+
+import org.apache.cocoon.precept.Preceptor;
+import org.apache.cocoon.precept.Constraint;
+
+import java.util.List;
+import java.util.Iterator;
+
+/*
+ * @version: Feb 22, 2002
+ * @author: Torsten Curdt <tc...@dff.st>
+ */
+public class AttributePreceptorNode extends AbstractPreceptorNode {
+ private boolean required;
+ //private StringBuffer valueObject;
+
+ public AttributePreceptorNode( Preceptor preceptor, ElementPreceptorNode parent, String name, boolean required ) {
+ this.name = name;
+ this.required = required;
+ this.parent = parent;
+ this.preceptor = preceptor;
+ }
+
+ public boolean isRequired() {
+ return(required);
+ }
+
+ public void toStringBuffer( StringBuffer sb, int depth) {
+ sb.append(" ").append(name).append("=");
+
+ if (constraints != null) {
+ for (Iterator it = constraints.iterator(); it.hasNext();) {
+ Constraint constraint = (Constraint) it.next();
+ sb.append("{").append(constraint.getType()).append("}");
+ }
+ }
+
+ sb.append("[").append( (required)?"required":"optional" ).append("]");
+ }
+
+/*
+ public StringBuffer setValue( String value ) {
+ if (valueObject == null){
+ valueObject = new StringBuffer(value);
+ }
+ else {
+ valueObject.setLength(0);
+ valueObject.append(value);
+ }
+ return(valueObject);
+ }
+
+ public StringBuffer getValue() {
+ return(valueObject);
+ }
+ */
+}
No revision
No revision
1.1.2.1 +1 -1 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/constrained/ElementEventListener.java
Index: ElementEventListener.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/constrained/ElementEventListener.java,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -r1.1 -r1.1.2.1
--- ElementEventListener.java 8 Apr 2002 08:09:16 -0000 1.1
+++ ElementEventListener.java 7 Feb 2003 07:25:22 -0000 1.1.2.1
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1.1.2.1 +1 -1 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/constrained/XmlTreeConstraint.java
Index: XmlTreeConstraint.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/constrained/XmlTreeConstraint.java,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -r1.1 -r1.1.2.1
--- XmlTreeConstraint.java 8 Apr 2002 08:09:16 -0000 1.1
+++ XmlTreeConstraint.java 7 Feb 2003 07:25:22 -0000 1.1.2.1
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1.1.2.1 +1 -1 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/constrained/ElementValueEvent.java
Index: ElementValueEvent.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/constrained/ElementValueEvent.java,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -r1.1 -r1.1.2.1
--- ElementValueEvent.java 8 Apr 2002 08:09:16 -0000 1.1
+++ ElementValueEvent.java 7 Feb 2003 07:25:22 -0000 1.1.2.1
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1.1.2.1 +1 -1 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/constrained/ElementEventAdapter.java
Index: ElementEventAdapter.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/constrained/ElementEventAdapter.java,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -r1.1 -r1.1.2.1
--- ElementEventAdapter.java 8 Apr 2002 08:09:16 -0000 1.1
+++ ElementEventAdapter.java 7 Feb 2003 07:25:22 -0000 1.1.2.1
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1.1.2.1 +1 -1 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/constrained/ContainerElementEndEvent.java
Index: ContainerElementEndEvent.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/constrained/ContainerElementEndEvent.java,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -r1.1 -r1.1.2.1
--- ContainerElementEndEvent.java 8 Apr 2002 08:09:16 -0000 1.1
+++ ContainerElementEndEvent.java 7 Feb 2003 07:25:22 -0000 1.1.2.1
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1.1.2.1 +1 -1 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/constrained/AbstractConstrainedTransformer.java
Index: AbstractConstrainedTransformer.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/constrained/AbstractConstrainedTransformer.java,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -r1.1 -r1.1.2.1
--- AbstractConstrainedTransformer.java 8 Apr 2002 08:09:16 -0000 1.1
+++ AbstractConstrainedTransformer.java 7 Feb 2003 07:25:22 -0000 1.1.2.1
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
No revision
No revision
1.2.2.2 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/context/Attic/SessionContext.java
Index: SessionContext.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/context/Attic/SessionContext.java,v
retrieving revision 1.2.2.1
retrieving revision 1.2.2.2
diff -u -r1.2.2.1 -r1.2.2.2
--- SessionContext.java 7 Jun 2002 09:34:25 -0000 1.2.2.1
+++ SessionContext.java 7 Feb 2003 07:25:23 -0000 1.2.2.2
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1.2.2.1 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/context/Attic/StandardSessionContextProvider.java
Index: StandardSessionContextProvider.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/context/Attic/StandardSessionContextProvider.java,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- StandardSessionContextProvider.java 22 Feb 2002 06:57:17 -0000 1.2
+++ StandardSessionContextProvider.java 7 Feb 2003 07:25:23 -0000 1.2.2.1
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1.2.2.2 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/context/Attic/ResponseSessionContext.java
Index: ResponseSessionContext.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/context/Attic/ResponseSessionContext.java,v
retrieving revision 1.2.2.1
retrieving revision 1.2.2.2
diff -u -r1.2.2.1 -r1.2.2.2
--- ResponseSessionContext.java 7 Jun 2002 09:34:25 -0000 1.2.2.1
+++ ResponseSessionContext.java 7 Feb 2003 07:25:23 -0000 1.2.2.2
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1.4.2.3 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/context/Attic/RequestSessionContext.java
Index: RequestSessionContext.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/context/Attic/RequestSessionContext.java,v
retrieving revision 1.4.2.2
retrieving revision 1.4.2.3
diff -u -r1.4.2.2 -r1.4.2.3
--- RequestSessionContext.java 30 Jul 2002 01:45:48 -0000 1.4.2.2
+++ RequestSessionContext.java 7 Feb 2003 07:25:23 -0000 1.4.2.3
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1.2.2.1 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/context/Attic/SessionContextProvider.java
Index: SessionContextProvider.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/context/Attic/SessionContextProvider.java,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- SessionContextProvider.java 22 Feb 2002 06:57:17 -0000 1.2
+++ SessionContextProvider.java 7 Feb 2003 07:25:23 -0000 1.2.2.1
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1.3.2.2 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/context/Attic/SimpleSessionContext.java
Index: SimpleSessionContext.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/context/Attic/SimpleSessionContext.java,v
retrieving revision 1.3.2.1
retrieving revision 1.3.2.2
diff -u -r1.3.2.1 -r1.3.2.2
--- SimpleSessionContext.java 7 Jun 2002 09:34:25 -0000 1.3.2.1
+++ SimpleSessionContext.java 7 Feb 2003 07:25:23 -0000 1.3.2.2
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
No revision
No revision
1.6.2.2 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/XMLDBTransformer.java
Index: XMLDBTransformer.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/XMLDBTransformer.java,v
retrieving revision 1.6.2.1
retrieving revision 1.6.2.2
diff -u -r1.6.2.1 -r1.6.2.2
--- XMLDBTransformer.java 10 Jun 2002 03:37:38 -0000 1.6.2.1
+++ XMLDBTransformer.java 7 Feb 2003 07:25:23 -0000 1.6.2.2
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1.1.2.3 +1 -1 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/Attic/AsynchronousCIncludeTransformer.java
Index: AsynchronousCIncludeTransformer.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/Attic/AsynchronousCIncludeTransformer.java,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -r1.1.2.2 -r1.1.2.3
--- AsynchronousCIncludeTransformer.java 31 Jan 2003 12:37:41 -0000 1.1.2.2
+++ AsynchronousCIncludeTransformer.java 7 Feb 2003 07:25:23 -0000 1.1.2.3
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1.1.2.1 +1 -1 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/Attic/Chart2SvgTransformer.java
Index: Chart2SvgTransformer.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/Attic/Chart2SvgTransformer.java,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -r1.1 -r1.1.2.1
--- Chart2SvgTransformer.java 8 Apr 2002 08:09:17 -0000 1.1
+++ Chart2SvgTransformer.java 7 Feb 2003 07:25:23 -0000 1.1.2.1
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
No revision
No revision
1.3.2.2 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunspot/sunlet/Attic/SunLetThread.java
Index: SunLetThread.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunspot/sunlet/Attic/SunLetThread.java,v
retrieving revision 1.3.2.1
retrieving revision 1.3.2.2
diff -u -r1.3.2.1 -r1.3.2.2
--- SunLetThread.java 7 Jun 2002 09:34:26 -0000 1.3.2.1
+++ SunLetThread.java 7 Feb 2003 07:25:23 -0000 1.3.2.2
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1.2.2.2 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunspot/sunlet/Attic/Sunlet.java
Index: Sunlet.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunspot/sunlet/Attic/Sunlet.java,v
retrieving revision 1.2.2.1
retrieving revision 1.2.2.2
diff -u -r1.2.2.1 -r1.2.2.2
--- Sunlet.java 7 Jun 2002 09:34:26 -0000 1.2.2.1
+++ Sunlet.java 7 Feb 2003 07:25:23 -0000 1.2.2.2
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
No revision
No revision
1.2.2.3 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunspot/context/Attic/SessionContextProviderImpl.java
Index: SessionContextProviderImpl.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunspot/context/Attic/SessionContextProviderImpl.java,v
retrieving revision 1.2.2.2
retrieving revision 1.2.2.3
diff -u -r1.2.2.2 -r1.2.2.3
--- SessionContextProviderImpl.java 5 Aug 2002 11:12:07 -0000 1.2.2.2
+++ SessionContextProviderImpl.java 7 Feb 2003 07:25:23 -0000 1.2.2.3
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1.3.2.2 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunspot/context/Attic/SessionContextImpl.java
Index: SessionContextImpl.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunspot/context/Attic/SessionContextImpl.java,v
retrieving revision 1.3.2.1
retrieving revision 1.3.2.2
diff -u -r1.3.2.1 -r1.3.2.2
--- SessionContextImpl.java 7 Jun 2002 09:34:26 -0000 1.3.2.1
+++ SessionContextImpl.java 7 Feb 2003 07:25:24 -0000 1.3.2.2
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
No revision
No revision
1.3.2.1 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/callback/XMLCallBack.java
Index: XMLCallBack.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/callback/XMLCallBack.java,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -u -r1.3 -r1.3.2.1
--- XMLCallBack.java 6 Apr 2002 06:36:53 -0000 1.3
+++ XMLCallBack.java 7 Feb 2003 07:25:24 -0000 1.3.2.1
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1.1.2.1 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/callback/XMLEventDescriptor.java
Index: XMLEventDescriptor.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/callback/XMLEventDescriptor.java,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -r1.1 -r1.1.2.1
--- XMLEventDescriptor.java 18 Mar 2002 21:22:51 -0000 1.1
+++ XMLEventDescriptor.java 7 Feb 2003 07:25:24 -0000 1.1.2.1
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1.4.2.1 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/callback/XMLSource.java
Index: XMLSource.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/callback/XMLSource.java,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -u -r1.4 -r1.4.2.1
--- XMLSource.java 6 Apr 2002 06:36:53 -0000 1.4
+++ XMLSource.java 7 Feb 2003 07:25:24 -0000 1.4.2.1
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1.1.2.1 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/callback/DefaultCallBackHandler.java
Index: DefaultCallBackHandler.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/callback/DefaultCallBackHandler.java,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -r1.1 -r1.1.2.1
--- DefaultCallBackHandler.java 19 Mar 2002 13:05:32 -0000 1.1
+++ DefaultCallBackHandler.java 7 Feb 2003 07:25:24 -0000 1.1.2.1
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1.6.2.1 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/callback/CallBackHandler.java
Index: CallBackHandler.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/callback/CallBackHandler.java,v
retrieving revision 1.6
retrieving revision 1.6.2.1
diff -u -r1.6 -r1.6.2.1
--- CallBackHandler.java 6 Apr 2002 06:36:53 -0000 1.6
+++ CallBackHandler.java 7 Feb 2003 07:25:24 -0000 1.6.2.1
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
No revision
No revision
1.4.2.1 +231 -231 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/stores/dom/simple/Attic/InstanceImpl.java
Index: InstanceImpl.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/stores/dom/simple/Attic/InstanceImpl.java,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -u -r1.4 -r1.4.2.1
--- InstanceImpl.java 4 Apr 2002 14:12:47 -0000 1.4
+++ InstanceImpl.java 7 Feb 2003 07:25:24 -0000 1.4.2.1
@@ -1,231 +1,231 @@
-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
- used to endorse or promote products derived from this software without
- prior written permission. For written permission, please contact
- apache@apache.org.
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation and was originally created by
- Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
- Software Foundation, please see <http://www.apache.org/>.
-
-*/
-
-package org.apache.cocoon.precept.stores.dom.simple;
-
-
-import org.apache.cocoon.precept.*;
-import org.apache.cocoon.precept.Constraint;
-import org.apache.cocoon.precept.stores.dom.simple.Node;
-import org.apache.cocoon.precept.stores.AbstractInstance;
-
-import java.util.*;
-
-import org.xml.sax.ContentHandler;
-import org.xml.sax.SAXException;
-import org.apache.avalon.framework.component.Composable;
-import org.apache.avalon.framework.component.ComponentManager;
-import org.apache.avalon.framework.component.ComponentException;
-
-/*
- * @version: Mar 14, 2002
- * @author: Torsten Curdt <tc...@dff.st>
- */
-public class InstanceImpl extends AbstractInstance {
- private HashMap index = new HashMap();
- private Preceptor preceptor;
- private ElementNode root;
-
- public void setPreceptor(Preceptor preceptor) {
- this.preceptor = preceptor;
- preceptor.buildInstance(this);
- }
-
- private Node createNode(String xpath) throws InvalidXPathSyntaxException {
- try {
- StringBuffer currentPath = new StringBuffer();
- StringTokenizer tok = new StringTokenizer(xpath, "/", false);
- Node currentParent = root;
- boolean first = true;
- while (tok.hasMoreTokens()) {
- String level = tok.nextToken();
- if (!first) {
- currentPath.append("/");
- }
- else {
- first = false;
- }
- if (level.endsWith("[1]")) {
- level = level.substring(0, level.length() - 3);
- }
- currentPath.append(level);
- Node node = (Node) index.get(currentPath.toString());
- if (node != null) {
- getLogger().debug("found node [" + String.valueOf(currentPath) + "] in index");
- currentParent = node;
- }
- else {
- if (currentParent != null) {
- if (level.startsWith("@")) {
- if (level.indexOf("[") >= 0 || level.indexOf("]") >= 0) {
- throw new InvalidXPathSyntaxException(level);
- }
- if (preceptor != null) {
- node = new AttributeNode(level.substring(1), preceptor.getConstraintsFor(currentPath.toString()));
- }
- else {
- node = new AttributeNode(level.substring(1), null);
- }
- getLogger().debug("creating attribute [" + String.valueOf(currentPath) + "]");
- ((ElementNode) currentParent).addAttribute(node);
- index.put(currentPath.toString(), node);
- return (node);
- }
- else {
- if (preceptor != null) {
- node = new ElementNode(level, preceptor.getConstraintsFor(currentPath.toString()));
- }
- else {
- node = new ElementNode(level, null);
- }
- getLogger().debug("creating node [" + String.valueOf(currentPath) + "]");
- ((ElementNode) currentParent).addChild(node);
- index.put(currentPath.toString(), node);
- }
- }
- else {
- getLogger().debug("creating root node [" + String.valueOf(currentPath) + "]");
- if (preceptor != null) {
- node = root = new ElementNode(level, preceptor.getConstraintsFor(currentPath.toString()));
- }
- else {
- node = root = new ElementNode(level, null);
- }
- index.put(currentPath.toString(), node);
- }
- }
- currentParent = node;
- }
- return (currentParent);
- }
- catch (NoSuchNodeException e) {
- getLogger().error("hm.. this should not happen!");
- return (null);
- }
- }
-
- private Node lookupNode( String xpath ) {
- Node node = (Node) index.get(xpath);
- if (node == null) {
- node = (Node) index.get(xpath + "[1]");
- }
- return(node);
- }
-
- public void setValue(String xpath, Object value) throws PreceptorViolationException, InvalidXPathSyntaxException {
- setValue(xpath, value, null);
- }
-
- public void setValue(String xpath, Object value, Context context) throws PreceptorViolationException, InvalidXPathSyntaxException {
- Node node = lookupNode(xpath);
-
- if (node != null) {
- node.setValue((String) value);
- }
- else {
- if (preceptor != null) {
- getLogger().debug("checking preceptor for [" + String.valueOf(xpath) + "]");
- if (preceptor.isValidNode(xpath)) {
- node = createNode(xpath);
- node.setValue((String) value);
- }
- else {
- throw new PreceptorViolationException("[" + String.valueOf(xpath) + "] is prohibited by preceptor");
- }
- }
- else {
- getLogger().debug("no preceptor");
- node = createNode(xpath);
- node.setValue((String) value);
- }
- }
- }
-
- public Object getValue(String xpath) throws InvalidXPathSyntaxException, NoSuchNodeException {
- Node node = lookupNode(xpath);
- if (node != null) {
- return (node.getValue());
- }
- else {
- throw new NoSuchNodeException(xpath);
- }
- }
-
- public Preceptor getPreceptor() {
- return (preceptor);
- }
-
- public long getLastModified() {
- //NYI
- return 0;
- }
-
- public void toSAX(ContentHandler handler, boolean constraints) throws SAXException {
- if (root != null) {
- root.toSAX(handler, root, constraints);
- }
- }
-
- public String toString() {
- if (root != null) {
- StringBuffer sb = new StringBuffer();
- root.toStringBuffer(sb, root, 0);
- return (sb.toString());
- }
- else {
- return ("");
- }
- }
-
- public Collection getNodePaths() {
- return( Collections.unmodifiableCollection( index.keySet() ));
- }
-}
+/*
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
+ used to endorse or promote products derived from this software without
+ prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package org.apache.cocoon.precept.stores.dom.simple;
+
+
+import org.apache.cocoon.precept.*;
+import org.apache.cocoon.precept.Constraint;
+import org.apache.cocoon.precept.stores.dom.simple.Node;
+import org.apache.cocoon.precept.stores.AbstractInstance;
+
+import java.util.*;
+
+import org.xml.sax.ContentHandler;
+import org.xml.sax.SAXException;
+import org.apache.avalon.framework.component.Composable;
+import org.apache.avalon.framework.component.ComponentManager;
+import org.apache.avalon.framework.component.ComponentException;
+
+/*
+ * @version: Mar 14, 2002
+ * @author: Torsten Curdt <tc...@dff.st>
+ */
+public class InstanceImpl extends AbstractInstance {
+ private HashMap index = new HashMap();
+ private Preceptor preceptor;
+ private ElementNode root;
+
+ public void setPreceptor(Preceptor preceptor) {
+ this.preceptor = preceptor;
+ preceptor.buildInstance(this);
+ }
+
+ private Node createNode(String xpath) throws InvalidXPathSyntaxException {
+ try {
+ StringBuffer currentPath = new StringBuffer();
+ StringTokenizer tok = new StringTokenizer(xpath, "/", false);
+ Node currentParent = root;
+ boolean first = true;
+ while (tok.hasMoreTokens()) {
+ String level = tok.nextToken();
+ if (!first) {
+ currentPath.append("/");
+ }
+ else {
+ first = false;
+ }
+ if (level.endsWith("[1]")) {
+ level = level.substring(0, level.length() - 3);
+ }
+ currentPath.append(level);
+ Node node = (Node) index.get(currentPath.toString());
+ if (node != null) {
+ getLogger().debug("found node [" + String.valueOf(currentPath) + "] in index");
+ currentParent = node;
+ }
+ else {
+ if (currentParent != null) {
+ if (level.startsWith("@")) {
+ if (level.indexOf("[") >= 0 || level.indexOf("]") >= 0) {
+ throw new InvalidXPathSyntaxException(level);
+ }
+ if (preceptor != null) {
+ node = new AttributeNode(level.substring(1), preceptor.getConstraintsFor(currentPath.toString()));
+ }
+ else {
+ node = new AttributeNode(level.substring(1), null);
+ }
+ getLogger().debug("creating attribute [" + String.valueOf(currentPath) + "]");
+ ((ElementNode) currentParent).addAttribute(node);
+ index.put(currentPath.toString(), node);
+ return (node);
+ }
+ else {
+ if (preceptor != null) {
+ node = new ElementNode(level, preceptor.getConstraintsFor(currentPath.toString()));
+ }
+ else {
+ node = new ElementNode(level, null);
+ }
+ getLogger().debug("creating node [" + String.valueOf(currentPath) + "]");
+ ((ElementNode) currentParent).addChild(node);
+ index.put(currentPath.toString(), node);
+ }
+ }
+ else {
+ getLogger().debug("creating root node [" + String.valueOf(currentPath) + "]");
+ if (preceptor != null) {
+ node = root = new ElementNode(level, preceptor.getConstraintsFor(currentPath.toString()));
+ }
+ else {
+ node = root = new ElementNode(level, null);
+ }
+ index.put(currentPath.toString(), node);
+ }
+ }
+ currentParent = node;
+ }
+ return (currentParent);
+ }
+ catch (NoSuchNodeException e) {
+ getLogger().error("hm.. this should not happen!");
+ return (null);
+ }
+ }
+
+ private Node lookupNode( String xpath ) {
+ Node node = (Node) index.get(xpath);
+ if (node == null) {
+ node = (Node) index.get(xpath + "[1]");
+ }
+ return(node);
+ }
+
+ public void setValue(String xpath, Object value) throws PreceptorViolationException, InvalidXPathSyntaxException {
+ setValue(xpath, value, null);
+ }
+
+ public void setValue(String xpath, Object value, Context context) throws PreceptorViolationException, InvalidXPathSyntaxException {
+ Node node = lookupNode(xpath);
+
+ if (node != null) {
+ node.setValue((String) value);
+ }
+ else {
+ if (preceptor != null) {
+ getLogger().debug("checking preceptor for [" + String.valueOf(xpath) + "]");
+ if (preceptor.isValidNode(xpath)) {
+ node = createNode(xpath);
+ node.setValue((String) value);
+ }
+ else {
+ throw new PreceptorViolationException("[" + String.valueOf(xpath) + "] is prohibited by preceptor");
+ }
+ }
+ else {
+ getLogger().debug("no preceptor");
+ node = createNode(xpath);
+ node.setValue((String) value);
+ }
+ }
+ }
+
+ public Object getValue(String xpath) throws InvalidXPathSyntaxException, NoSuchNodeException {
+ Node node = lookupNode(xpath);
+ if (node != null) {
+ return (node.getValue());
+ }
+ else {
+ throw new NoSuchNodeException(xpath);
+ }
+ }
+
+ public Preceptor getPreceptor() {
+ return (preceptor);
+ }
+
+ public long getLastModified() {
+ //NYI
+ return 0;
+ }
+
+ public void toSAX(ContentHandler handler, boolean constraints) throws SAXException {
+ if (root != null) {
+ root.toSAX(handler, root, constraints);
+ }
+ }
+
+ public String toString() {
+ if (root != null) {
+ StringBuffer sb = new StringBuffer();
+ root.toStringBuffer(sb, root, 0);
+ return (sb.toString());
+ }
+ else {
+ return ("");
+ }
+ }
+
+ public Collection getNodePaths() {
+ return( Collections.unmodifiableCollection( index.keySet() ));
+ }
+}
1.3.2.1 +67 -67 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/stores/dom/simple/Attic/Node.java
Index: Node.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/stores/dom/simple/Attic/Node.java,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -u -r1.3 -r1.3.2.1
--- Node.java 4 Apr 2002 07:02:09 -0000 1.3
+++ Node.java 7 Feb 2003 07:25:24 -0000 1.3.2.1
@@ -1,72 +1,72 @@
-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
- used to endorse or promote products derived from this software without
- prior written permission. For written permission, please contact
- apache@apache.org.
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation and was originally created by
- Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
- Software Foundation, please see <http://www.apache.org/>.
-
-*/
-
-package org.apache.cocoon.precept.stores.dom.simple;
-
+/*
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
+ used to endorse or promote products derived from this software without
+ prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package org.apache.cocoon.precept.stores.dom.simple;
+
import org.apache.cocoon.precept.Context;
import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Collection;
-
-/*
- * @version: Mar 14, 2002
- * @author: Torsten Curdt <tc...@dff.st>
- */
+import java.util.HashMap;
+import java.util.Collection;
+
+/*
+ * @version: Mar 14, 2002
+ * @author: Torsten Curdt <tc...@dff.st>
+ */
public abstract class Node {
protected String name;
protected String value;
protected Collection constraints;
-
+
public Node( String name, Collection constraints) {
this.name = name;
this.constraints = constraints;
@@ -76,15 +76,15 @@
return(name);
}
- public String getValue() {
- return(value);
- }
+ public String getValue() {
+ return(value);
+ }
public void setValue( String value ) {
- this.value = value;
+ this.value = value;
}
public Collection getConstraints() {
return(constraints);
- }
-}
+ }
+}
1.3.2.1 +53 -53 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/stores/dom/simple/Attic/AttributeNode.java
Index: AttributeNode.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/stores/dom/simple/Attic/AttributeNode.java,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -u -r1.3 -r1.3.2.1
--- AttributeNode.java 4 Apr 2002 07:02:09 -0000 1.3
+++ AttributeNode.java 7 Feb 2003 07:25:24 -0000 1.3.2.1
@@ -1,61 +1,61 @@
-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
- used to endorse or promote products derived from this software without
- prior written permission. For written permission, please contact
- apache@apache.org.
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation and was originally created by
- Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
- Software Foundation, please see <http://www.apache.org/>.
-
-*/
+/*
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
+ used to endorse or promote products derived from this software without
+ prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+*/
package org.apache.cocoon.precept.stores.dom.simple;
import java.util.Iterator;
import java.util.Collection;
-/*
- * @author: Torsten Curdt <tc...@dff.st>
- */
+/*
+ * @author: Torsten Curdt <tc...@dff.st>
+ */
public class AttributeNode extends Node {
public AttributeNode( String name, Collection constraints) {
1.3.2.1 +155 -155 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/stores/dom/simple/Attic/ElementNode.java
Index: ElementNode.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/stores/dom/simple/Attic/ElementNode.java,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -u -r1.3 -r1.3.2.1
--- ElementNode.java 4 Apr 2002 07:02:09 -0000 1.3
+++ ElementNode.java 7 Feb 2003 07:25:24 -0000 1.3.2.1
@@ -1,166 +1,166 @@
-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
- used to endorse or promote products derived from this software without
- prior written permission. For written permission, please contact
- apache@apache.org.
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation and was originally created by
- Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
- Software Foundation, please see <http://www.apache.org/>.
-
-*/
-
-package org.apache.cocoon.precept.stores.dom.simple;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.AttributesImpl;
-import org.apache.cocoon.precept.Constraint;
-
-import java.util.*;
-
-/*
- * @author: Torsten Curdt <tc...@dff.st>
- */
-public class ElementNode extends Node {
- private final static Attributes NOATTR = new AttributesImpl();
-
- private ArrayList childs;
- private ArrayList attributes;
- private HashMap attributeIndex;
-
-
- public ElementNode(String name, Collection constraints) {
- super(name, constraints);
- }
-
- public void addAttribute(Node node) {
- if (attributes == null) attributes = new ArrayList();
- if (attributeIndex == null) attributeIndex = new HashMap();
- attributes.add(node);
- attributeIndex.put(node.getValue(), node);
+/*
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
+ used to endorse or promote products derived from this software without
+ prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package org.apache.cocoon.precept.stores.dom.simple;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.AttributesImpl;
+import org.apache.cocoon.precept.Constraint;
+
+import java.util.*;
+
+/*
+ * @author: Torsten Curdt <tc...@dff.st>
+ */
+public class ElementNode extends Node {
+ private final static Attributes NOATTR = new AttributesImpl();
+
+ private ArrayList childs;
+ private ArrayList attributes;
+ private HashMap attributeIndex;
+
+
+ public ElementNode(String name, Collection constraints) {
+ super(name, constraints);
+ }
+
+ public void addAttribute(Node node) {
+ if (attributes == null) attributes = new ArrayList();
+ if (attributeIndex == null) attributeIndex = new HashMap();
+ attributes.add(node);
+ attributeIndex.put(node.getValue(), node);
}
//public Node getAttribute( String name ) {
//}
- public List getAttributes() {
- return (attributes);
- }
-
-
- public void addChild(Node node) {
- if (childs == null) childs = new ArrayList();
- childs.add(node);
- }
-
- public List getChilds() {
- return (childs);
+ public List getAttributes() {
+ return (attributes);
+ }
+
+
+ public void addChild(Node node) {
+ if (childs == null) childs = new ArrayList();
+ childs.add(node);
+ }
+
+ public List getChilds() {
+ return (childs);
}
//public List getChilds( String name ) {
//}
- public void toStringBuffer(StringBuffer sb, ElementNode e, int depth) {
- StringBuffer ident = new StringBuffer();
- for (int i = 0; i < depth * 3; i++) ident.append(" ");
-
- sb.append("\n").append(ident).append("<").append(e.getName());
-
-
- Collection attributes = e.getAttributes();
- if (attributes != null) {
- for (Iterator it = attributes.iterator(); it.hasNext();) {
- AttributeNode attr = (AttributeNode) it.next();
- attr.toStringBuffer(sb, depth);
- }
- }
-
- sb.append(">").append("\n").append(ident).append(" ");
-
- sb.append(String.valueOf(e.getValue()));
-
- Collection childs = e.getChilds();
- if (childs != null) {
- for (Iterator it = childs.iterator(); it.hasNext();) {
- ElementNode child = (ElementNode) it.next();
- toStringBuffer(sb, child, depth + 1);
- }
- }
- sb.append("\n").append(ident);
- sb.append("</").append(e.getName()).append(">");
- }
-
-
- public void toSAX(ContentHandler handler, ElementNode e, boolean withConstraints) throws SAXException {
-
- handler.startElement("", e.getName(), e.getName(), NOATTR);
-
- if (e.getValue() != null) handler.characters(e.getValue().toString().toCharArray(), 0, e.getValue().length());
-
- if (withConstraints) {
- Collection constraints = e.getConstraints();
- if (constraints != null) {
- for (Iterator it = constraints.iterator(); it.hasNext();) {
- Constraint constraint = (Constraint) it.next();
-
- handler.startElement("", "constraint", "constraint", NOATTR);
- String s = String.valueOf(constraint.getId()) +
- " of type " + String.valueOf(constraint.getType()) +
- " is " + constraint.isSatisfiedBy(e.getValue(), null);
- handler.characters(s.toString().toCharArray(), 0, s.length());
- handler.endElement("", "constraint", "constraint");
- }
- }
- }
-
- Collection childs = e.getChilds();
- if (childs != null) {
- for (Iterator it = childs.iterator(); it.hasNext();) {
- ElementNode child = (ElementNode) it.next();
- toSAX(handler, child, withConstraints);
- }
- }
- handler.endElement("", getName(), e.getName());
- }
+ public void toStringBuffer(StringBuffer sb, ElementNode e, int depth) {
+ StringBuffer ident = new StringBuffer();
+ for (int i = 0; i < depth * 3; i++) ident.append(" ");
+
+ sb.append("\n").append(ident).append("<").append(e.getName());
+
+
+ Collection attributes = e.getAttributes();
+ if (attributes != null) {
+ for (Iterator it = attributes.iterator(); it.hasNext();) {
+ AttributeNode attr = (AttributeNode) it.next();
+ attr.toStringBuffer(sb, depth);
+ }
+ }
+
+ sb.append(">").append("\n").append(ident).append(" ");
+
+ sb.append(String.valueOf(e.getValue()));
+
+ Collection childs = e.getChilds();
+ if (childs != null) {
+ for (Iterator it = childs.iterator(); it.hasNext();) {
+ ElementNode child = (ElementNode) it.next();
+ toStringBuffer(sb, child, depth + 1);
+ }
+ }
+ sb.append("\n").append(ident);
+ sb.append("</").append(e.getName()).append(">");
+ }
+
+
+ public void toSAX(ContentHandler handler, ElementNode e, boolean withConstraints) throws SAXException {
+
+ handler.startElement("", e.getName(), e.getName(), NOATTR);
+
+ if (e.getValue() != null) handler.characters(e.getValue().toString().toCharArray(), 0, e.getValue().length());
+
+ if (withConstraints) {
+ Collection constraints = e.getConstraints();
+ if (constraints != null) {
+ for (Iterator it = constraints.iterator(); it.hasNext();) {
+ Constraint constraint = (Constraint) it.next();
+
+ handler.startElement("", "constraint", "constraint", NOATTR);
+ String s = String.valueOf(constraint.getId()) +
+ " of type " + String.valueOf(constraint.getType()) +
+ " is " + constraint.isSatisfiedBy(e.getValue(), null);
+ handler.characters(s.toString().toCharArray(), 0, s.length());
+ handler.endElement("", "constraint", "constraint");
+ }
+ }
+ }
+
+ Collection childs = e.getChilds();
+ if (childs != null) {
+ for (Iterator it = childs.iterator(); it.hasNext();) {
+ ElementNode child = (ElementNode) it.next();
+ toSAX(handler, child, withConstraints);
+ }
+ }
+ handler.endElement("", getName(), e.getName());
+ }
}
No revision
No revision
1.3.2.2 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/reading/ImageReader.java
Index: ImageReader.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/reading/ImageReader.java,v
retrieving revision 1.3.2.1
retrieving revision 1.3.2.2
diff -u -r1.3.2.1 -r1.3.2.2
--- ImageReader.java 11 Jun 2002 23:54:53 -0000 1.3.2.1
+++ ImageReader.java 7 Feb 2003 07:25:24 -0000 1.3.2.2
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1.3.2.2 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/reading/DirectoryZipArchiver.java
Index: DirectoryZipArchiver.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/reading/DirectoryZipArchiver.java,v
retrieving revision 1.3.2.1
retrieving revision 1.3.2.2
diff -u -r1.3.2.1 -r1.3.2.2
--- DirectoryZipArchiver.java 11 Jun 2002 23:54:53 -0000 1.3.2.1
+++ DirectoryZipArchiver.java 7 Feb 2003 07:25:24 -0000 1.3.2.2
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
No revision
No revision
1.2.2.2 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/connector/Attic/XMLSaver.java
Index: XMLSaver.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/connector/Attic/XMLSaver.java,v
retrieving revision 1.2.2.1
retrieving revision 1.2.2.2
diff -u -r1.2.2.1 -r1.2.2.2
--- XMLSaver.java 7 Jun 2002 09:34:24 -0000 1.2.2.1
+++ XMLSaver.java 7 Feb 2003 07:25:24 -0000 1.2.2.2
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1.2.2.2 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/connector/Attic/ResourceConnector.java
Index: ResourceConnector.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/connector/Attic/ResourceConnector.java,v
retrieving revision 1.2.2.1
retrieving revision 1.2.2.2
diff -u -r1.2.2.1 -r1.2.2.2
--- ResourceConnector.java 7 Jun 2002 09:34:24 -0000 1.2.2.1
+++ ResourceConnector.java 7 Feb 2003 07:25:24 -0000 1.2.2.2
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1.2.2.2 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/connector/Attic/XMLLoader.java
Index: XMLLoader.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/connector/Attic/XMLLoader.java,v
retrieving revision 1.2.2.1
retrieving revision 1.2.2.2
diff -u -r1.2.2.1 -r1.2.2.2
--- XMLLoader.java 7 Jun 2002 09:34:24 -0000 1.2.2.1
+++ XMLLoader.java 7 Feb 2003 07:25:24 -0000 1.2.2.2
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1.4.2.5 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/connector/Attic/ResourceConnectorImpl.java
Index: ResourceConnectorImpl.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/connector/Attic/ResourceConnectorImpl.java,v
retrieving revision 1.4.2.4
retrieving revision 1.4.2.5
diff -u -r1.4.2.4 -r1.4.2.5
--- ResourceConnectorImpl.java 11 Oct 2002 06:31:21 -0000 1.4.2.4
+++ ResourceConnectorImpl.java 7 Feb 2003 07:25:24 -0000 1.4.2.5
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1.3.2.2 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/connector/Attic/Resource.java
Index: Resource.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/connector/Attic/Resource.java,v
retrieving revision 1.3.2.1
retrieving revision 1.3.2.2
diff -u -r1.3.2.1 -r1.3.2.2
--- Resource.java 7 Jun 2002 09:34:24 -0000 1.3.2.1
+++ Resource.java 7 Feb 2003 07:25:24 -0000 1.3.2.2
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
No revision
No revision
1.2.2.1 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunrise/acting/Attic/LogoutAction.java
Index: LogoutAction.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunrise/acting/Attic/LogoutAction.java,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- LogoutAction.java 22 Feb 2002 06:57:18 -0000 1.2
+++ LogoutAction.java 7 Feb 2003 07:25:25 -0000 1.2.2.1
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1.2.2.2 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunrise/acting/Attic/AuthAction.java
Index: AuthAction.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunrise/acting/Attic/AuthAction.java,v
retrieving revision 1.2.2.1
retrieving revision 1.2.2.2
diff -u -r1.2.2.1 -r1.2.2.2
--- AuthAction.java 13 Aug 2002 15:33:33 -0000 1.2.2.1
+++ AuthAction.java 7 Feb 2003 07:25:25 -0000 1.2.2.2
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1.2.2.1 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunrise/acting/Attic/LoggedInAction.java
Index: LoggedInAction.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunrise/acting/Attic/LoggedInAction.java,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- LoggedInAction.java 22 Feb 2002 06:57:18 -0000 1.2
+++ LoggedInAction.java 7 Feb 2003 07:25:25 -0000 1.2.2.1
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1.2.2.2 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunrise/acting/Attic/LoginAction.java
Index: LoginAction.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunrise/acting/Attic/LoginAction.java,v
retrieving revision 1.2.2.1
retrieving revision 1.2.2.2
diff -u -r1.2.2.1 -r1.2.2.2
--- LoginAction.java 7 Jun 2002 09:34:25 -0000 1.2.2.1
+++ LoginAction.java 7 Feb 2003 07:25:25 -0000 1.2.2.2
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
No revision
No revision
1.3.2.1 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/pagination/ItemGroup.java
Index: ItemGroup.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/pagination/ItemGroup.java,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -u -r1.3 -r1.3.2.1
--- ItemGroup.java 22 Feb 2002 16:48:56 -0000 1.3
+++ ItemGroup.java 7 Feb 2003 07:25:25 -0000 1.3.2.1
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1.5.2.2 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/pagination/Pagesheet.java
Index: Pagesheet.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/pagination/Pagesheet.java,v
retrieving revision 1.5.2.1
retrieving revision 1.5.2.2
diff -u -r1.5.2.1 -r1.5.2.2
--- Pagesheet.java 4 Jul 2002 18:47:13 -0000 1.5.2.1
+++ Pagesheet.java 7 Feb 2003 07:25:25 -0000 1.5.2.2
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1.3.2.2 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/pagination/PageRules.java
Index: PageRules.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/pagination/PageRules.java,v
retrieving revision 1.3.2.1
retrieving revision 1.3.2.2
diff -u -r1.3.2.1 -r1.3.2.2
--- PageRules.java 4 Jul 2002 18:47:13 -0000 1.3.2.1
+++ PageRules.java 7 Feb 2003 07:25:25 -0000 1.3.2.2
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1.7.2.3 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/pagination/Paginator.java
Index: Paginator.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/pagination/Paginator.java,v
retrieving revision 1.7.2.2
retrieving revision 1.7.2.3
diff -u -r1.7.2.2 -r1.7.2.3
--- Paginator.java 4 Jul 2002 18:47:13 -0000 1.7.2.2
+++ Paginator.java 7 Feb 2003 07:25:25 -0000 1.7.2.3
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
No revision
No revision
1.3.2.2 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunrise/Attic/ApplicationHandler.java
Index: ApplicationHandler.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunrise/Attic/ApplicationHandler.java,v
retrieving revision 1.3.2.1
retrieving revision 1.3.2.2
diff -u -r1.3.2.1 -r1.3.2.2
--- ApplicationHandler.java 7 Jun 2002 09:34:25 -0000 1.3.2.1
+++ ApplicationHandler.java 7 Feb 2003 07:25:25 -0000 1.3.2.2
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1.5.2.7 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunrise/Attic/SunRise.java
Index: SunRise.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunrise/Attic/SunRise.java,v
retrieving revision 1.5.2.6
retrieving revision 1.5.2.7
diff -u -r1.5.2.6 -r1.5.2.7
--- SunRise.java 21 Nov 2002 15:06:50 -0000 1.5.2.6
+++ SunRise.java 7 Feb 2003 07:25:25 -0000 1.5.2.7
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1.4.2.2 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunrise/Attic/Handler.java
Index: Handler.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunrise/Attic/Handler.java,v
retrieving revision 1.4.2.1
retrieving revision 1.4.2.2
diff -u -r1.4.2.1 -r1.4.2.2
--- Handler.java 7 Jun 2002 09:34:25 -0000 1.4.2.1
+++ Handler.java 7 Feb 2003 07:25:25 -0000 1.4.2.2
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1.2.2.1 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunrise/Attic/Constants.java
Index: Constants.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunrise/Attic/Constants.java,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- Constants.java 22 Feb 2002 06:57:18 -0000 1.2
+++ Constants.java 7 Feb 2003 07:25:25 -0000 1.2.2.1
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
No revision
No revision
1.2.2.1 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunrise/generation/Attic/ConfigurationGenerator.java
Index: ConfigurationGenerator.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunrise/generation/Attic/ConfigurationGenerator.java,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- ConfigurationGenerator.java 22 Feb 2002 06:57:18 -0000 1.2
+++ ConfigurationGenerator.java 7 Feb 2003 07:25:26 -0000 1.2.2.1
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
No revision
No revision
1.2.2.1 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/helpers/Attic/URLRewriter.java
Index: URLRewriter.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/helpers/Attic/URLRewriter.java,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- URLRewriter.java 22 Feb 2002 06:57:17 -0000 1.2
+++ URLRewriter.java 7 Feb 2003 07:25:26 -0000 1.2.2.1
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
No revision
No revision
1.1.2.2 +1 -1 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/asynchronous/Attic/AsyncHelper.java
Index: AsyncHelper.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/asynchronous/Attic/AsyncHelper.java,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- AsyncHelper.java 9 Jan 2003 22:34:40 -0000 1.1.2.1
+++ AsyncHelper.java 7 Feb 2003 07:25:26 -0000 1.1.2.2
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1.1.2.2 +1 -1 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/asynchronous/Attic/PooledThread.java
Index: PooledThread.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/asynchronous/Attic/PooledThread.java,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- PooledThread.java 9 Jan 2003 22:34:40 -0000 1.1.2.1
+++ PooledThread.java 7 Feb 2003 07:25:26 -0000 1.1.2.2
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1.1.2.2 +1 -1 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/asynchronous/Attic/XMLByteStreamFileInterpreter.java
Index: XMLByteStreamFileInterpreter.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/asynchronous/Attic/XMLByteStreamFileInterpreter.java,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- XMLByteStreamFileInterpreter.java 9 Jan 2003 22:34:40 -0000 1.1.2.1
+++ XMLByteStreamFileInterpreter.java 7 Feb 2003 07:25:26 -0000 1.1.2.2
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1.1.2.2 +1 -1 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/asynchronous/Attic/ThreadPool.java
Index: ThreadPool.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/asynchronous/Attic/ThreadPool.java,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- ThreadPool.java 9 Jan 2003 22:34:40 -0000 1.1.2.1
+++ ThreadPool.java 7 Feb 2003 07:25:26 -0000 1.1.2.2
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1.1.2.2 +1 -1 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/asynchronous/Attic/XMLByteStreamFileCompiler.java
Index: XMLByteStreamFileCompiler.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/asynchronous/Attic/XMLByteStreamFileCompiler.java,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- XMLByteStreamFileCompiler.java 9 Jan 2003 22:34:40 -0000 1.1.2.1
+++ XMLByteStreamFileCompiler.java 7 Feb 2003 07:25:26 -0000 1.1.2.2
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1.1.2.2 +1 -1 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/asynchronous/Attic/VariableHardResourceLimitingPool.java
Index: VariableHardResourceLimitingPool.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/asynchronous/Attic/VariableHardResourceLimitingPool.java,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- VariableHardResourceLimitingPool.java 9 Jan 2003 22:34:40 -0000 1.1.2.1
+++ VariableHardResourceLimitingPool.java 7 Feb 2003 07:25:26 -0000 1.1.2.2
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1.1.2.2 +1 -1 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/asynchronous/Attic/XMLByteStreamFile.java
Index: XMLByteStreamFile.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/asynchronous/Attic/XMLByteStreamFile.java,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- XMLByteStreamFile.java 9 Jan 2003 22:34:40 -0000 1.1.2.1
+++ XMLByteStreamFile.java 7 Feb 2003 07:25:26 -0000 1.1.2.2
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
No revision
No revision
1.4.2.2 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/transformation/Attic/SunShinePreTransformer.java
Index: SunShinePreTransformer.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/transformation/Attic/SunShinePreTransformer.java,v
retrieving revision 1.4.2.1
retrieving revision 1.4.2.2
diff -u -r1.4.2.1 -r1.4.2.2
--- SunShinePreTransformer.java 7 Jun 2002 09:34:26 -0000 1.4.2.1
+++ SunShinePreTransformer.java 7 Feb 2003 07:25:27 -0000 1.4.2.2
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1.2.2.2 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/transformation/Attic/SunShineConnectTransformer.java
Index: SunShineConnectTransformer.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/transformation/Attic/SunShineConnectTransformer.java,v
retrieving revision 1.2.2.1
retrieving revision 1.2.2.2
diff -u -r1.2.2.1 -r1.2.2.2
--- SunShineConnectTransformer.java 7 Jun 2002 09:34:26 -0000 1.2.2.1
+++ SunShineConnectTransformer.java 7 Feb 2003 07:25:27 -0000 1.2.2.2
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1.2.2.1 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/transformation/Attic/SunShineTransformer.java
Index: SunShineTransformer.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/transformation/Attic/SunShineTransformer.java,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- SunShineTransformer.java 22 Feb 2002 06:57:19 -0000 1.2
+++ SunShineTransformer.java 7 Feb 2003 07:25:27 -0000 1.2.2.1
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1.5.2.2 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/transformation/Attic/AbstractSunShineTransformer.java
Index: AbstractSunShineTransformer.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/transformation/Attic/AbstractSunShineTransformer.java,v
retrieving revision 1.5.2.1
retrieving revision 1.5.2.2
diff -u -r1.5.2.1 -r1.5.2.2
--- AbstractSunShineTransformer.java 7 Jun 2002 09:34:26 -0000 1.5.2.1
+++ AbstractSunShineTransformer.java 7 Feb 2003 07:25:27 -0000 1.5.2.2
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1.2.2.2 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/transformation/Attic/SunShinePostTransformer.java
Index: SunShinePostTransformer.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/transformation/Attic/SunShinePostTransformer.java,v
retrieving revision 1.2.2.1
retrieving revision 1.2.2.2
diff -u -r1.2.2.1 -r1.2.2.2
--- SunShinePostTransformer.java 7 Jun 2002 09:34:26 -0000 1.2.2.1
+++ SunShinePostTransformer.java 7 Feb 2003 07:25:27 -0000 1.2.2.2
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1.4.2.1 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/transformation/Attic/InsertTransformer.java
Index: InsertTransformer.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/transformation/Attic/InsertTransformer.java,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -u -r1.4 -r1.4.2.1
--- InsertTransformer.java 2 Apr 2002 14:23:45 -0000 1.4
+++ InsertTransformer.java 7 Feb 2003 07:25:27 -0000 1.4.2.1
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
No revision
No revision
1.2.2.1 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunspot/acting/Attic/AuthAction.java
Index: AuthAction.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunspot/acting/Attic/AuthAction.java,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- AuthAction.java 22 Feb 2002 06:57:18 -0000 1.2
+++ AuthAction.java 7 Feb 2003 07:25:27 -0000 1.2.2.1
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
No revision
No revision
1.2.2.1 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunspot/generation/Attic/PortalGenerator.java
Index: PortalGenerator.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunspot/generation/Attic/PortalGenerator.java,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- PortalGenerator.java 22 Feb 2002 06:57:19 -0000 1.2
+++ PortalGenerator.java 7 Feb 2003 07:25:27 -0000 1.2.2.1
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1.2.2.1 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunspot/generation/Attic/ConfigurationGenerator.java
Index: ConfigurationGenerator.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunspot/generation/Attic/ConfigurationGenerator.java,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- ConfigurationGenerator.java 22 Feb 2002 06:57:19 -0000 1.2
+++ ConfigurationGenerator.java 7 Feb 2003 07:25:27 -0000 1.2.2.1
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
No revision
No revision
1.5.2.4 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunspot/Attic/SunSpot.java
Index: SunSpot.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunspot/Attic/SunSpot.java,v
retrieving revision 1.5.2.3
retrieving revision 1.5.2.4
diff -u -r1.5.2.3 -r1.5.2.4
--- SunSpot.java 21 Nov 2002 15:06:51 -0000 1.5.2.3
+++ SunSpot.java 7 Feb 2003 07:25:27 -0000 1.5.2.4
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1.2.2.1 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunspot/Attic/Constants.java
Index: Constants.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunspot/Attic/Constants.java,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- Constants.java 22 Feb 2002 06:57:18 -0000 1.2
+++ Constants.java 7 Feb 2003 07:25:27 -0000 1.2.2.1
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
No revision
No revision
1.2.2.2 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/components/Attic/AbstractSunShineComponent.java
Index: AbstractSunShineComponent.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/components/Attic/AbstractSunShineComponent.java,v
retrieving revision 1.2.2.1
retrieving revision 1.2.2.2
diff -u -r1.2.2.1 -r1.2.2.2
--- AbstractSunShineComponent.java 7 Jun 2002 09:34:24 -0000 1.2.2.1
+++ AbstractSunShineComponent.java 7 Feb 2003 07:25:28 -0000 1.2.2.2
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
No revision
No revision
1.2.2.1 +85 -85 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/stores/Attic/AbstractInstance.java
Index: AbstractInstance.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/stores/Attic/AbstractInstance.java,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- AbstractInstance.java 25 Mar 2002 23:23:55 -0000 1.2
+++ AbstractInstance.java 7 Feb 2003 07:25:28 -0000 1.2.2.1
@@ -1,85 +1,85 @@
-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
- used to endorse or promote products derived from this software without
- prior written permission. For written permission, please contact
- apache@apache.org.
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation and was originally created by
- Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
- Software Foundation, please see <http://www.apache.org/>.
-
-*/
-
-package org.apache.cocoon.precept.stores;
-
-import org.apache.avalon.framework.logger.AbstractLoggable;
-import org.apache.avalon.framework.component.Composable;
-import org.apache.avalon.framework.component.ComponentManager;
-import org.apache.avalon.framework.component.ComponentException;
-import org.apache.avalon.framework.activity.Disposable;
-import org.apache.cocoon.precept.Instance;
-
-import javax.servlet.http.HttpSessionBindingListener;
-import javax.servlet.http.HttpSessionBindingEvent;
-
-/*
- * @version: Mar 18, 2002
- * @author: Torsten Curdt <tc...@dff.st>
- */
-public abstract class AbstractInstance extends AbstractLoggable implements Instance, Composable, Disposable, HttpSessionBindingListener {
- protected ComponentManager manager;
-
- public void compose(ComponentManager manager) throws ComponentException {
- this.manager = manager;
- }
-
- public void valueBound(HttpSessionBindingEvent event) {
- }
-
- public void valueUnbound(HttpSessionBindingEvent event) {
- getLogger().debug("releasing instance in session");
- manager.release(this);
- }
-
- public void dispose() {
- }
-}
+/*
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
+ used to endorse or promote products derived from this software without
+ prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package org.apache.cocoon.precept.stores;
+
+import org.apache.avalon.framework.logger.AbstractLoggable;
+import org.apache.avalon.framework.component.Composable;
+import org.apache.avalon.framework.component.ComponentManager;
+import org.apache.avalon.framework.component.ComponentException;
+import org.apache.avalon.framework.activity.Disposable;
+import org.apache.cocoon.precept.Instance;
+
+import javax.servlet.http.HttpSessionBindingListener;
+import javax.servlet.http.HttpSessionBindingEvent;
+
+/*
+ * @version: Mar 18, 2002
+ * @author: Torsten Curdt <tc...@dff.st>
+ */
+public abstract class AbstractInstance extends AbstractLoggable implements Instance, Composable, Disposable, HttpSessionBindingListener {
+ protected ComponentManager manager;
+
+ public void compose(ComponentManager manager) throws ComponentException {
+ this.manager = manager;
+ }
+
+ public void valueBound(HttpSessionBindingEvent event) {
+ }
+
+ public void valueUnbound(HttpSessionBindingEvent event) {
+ getLogger().debug("releasing instance in session");
+ manager.release(this);
+ }
+
+ public void dispose() {
+ }
+}
No revision
No revision
1.3.2.1 +158 -158 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/acting/Attic/AbstractPreceptorAction.java
Index: AbstractPreceptorAction.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/acting/Attic/AbstractPreceptorAction.java,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -u -r1.3 -r1.3.2.1
--- AbstractPreceptorAction.java 4 Apr 2002 07:02:09 -0000 1.3
+++ AbstractPreceptorAction.java 7 Feb 2003 07:25:28 -0000 1.3.2.1
@@ -1,158 +1,158 @@
-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
- used to endorse or promote products derived from this software without
- prior written permission. For written permission, please contact
- apache@apache.org.
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation and was originally created by
- Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
- Software Foundation, please see <http://www.apache.org/>.
-
-*/
-
-package org.apache.cocoon.precept.acting;
-
-import org.apache.cocoon.environment.*;
-import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.avalon.framework.component.ComponentException;
-import org.apache.avalon.framework.thread.ThreadSafe;
-
-import java.util.*;
-
-import org.apache.cocoon.precept.*;
-import org.apache.cocoon.precept.acting.AbstractMethodAction;
-
-/*
- * @version: Feb 25, 2002
- * @author: Torsten Curdt <tc...@dff.st>
- */
-public abstract class AbstractPreceptorAction extends AbstractMethodAction implements ThreadSafe {
-
- public final static String PRECEPTORVIOLATIONS = "preceptorViolations";
-
- final protected Session createSession( Map objectModel ) {
- Request request = ObjectModelHelper.getRequest(objectModel);
- return(request.getSession(true));
- }
-
- final protected Instance getInstance( Map objectModel, String instanceId ) {
- Request request = ObjectModelHelper.getRequest(objectModel);
- Session session = request.getSession(false);
- return((Instance)session.getAttribute(instanceId));
- }
-
- final protected Instance createInstance(String id) throws ComponentException {
- InstanceFactory factory = (InstanceFactory) manager.lookup(InstanceFactory.ROLE);
- Instance instance = factory.createInstance(id);
- manager.release(factory);
- return(instance);
- }
-
- final protected void populate(Map objectModel, String instanceId, String xpath) throws PreceptorViolationException, InvalidXPathSyntaxException {
- Request request = ObjectModelHelper.getRequest(objectModel);
- Session session = request.getSession(false);
- if (session != null) {
- Instance instance = (Instance)session.getAttribute(instanceId);
- if (instance != null) {
- String value = request.getParameter(xpath);
- //String[] values = request.getParameterValues(xpath);
-
- if (value == null) value = "false";
-
- getLogger().debug("populating into " + String.valueOf(xpath) + " = " + String.valueOf(value));
- instance.setValue(xpath,value);
- }
- }
- }
-
- final protected void populate(Map objectModel, String instanceId, String[] xpaths) throws PreceptorViolationException, InvalidXPathSyntaxException {
- for(int i=0; i < xpaths.length; i++) {
- populate(objectModel,instanceId,xpaths[i]);
- }
- }
-
- final protected Collection validate(Map objectModel, String instanceId) throws InvalidXPathSyntaxException, NoSuchNodeException {
- Instance instance = getInstance(objectModel,instanceId);
- Preceptor preceptor = instance.getPreceptor();
- Collection violations = preceptor.validate(instance,null);
- return(violations);
- }
-
- final protected Collection validate(Map objectModel, String instanceId, String xpath) throws InvalidXPathSyntaxException, NoSuchNodeException {
- Instance instance = getInstance(objectModel,instanceId);
- Preceptor preceptor = instance.getPreceptor();
- Collection violations = preceptor.validate(instance,xpath,null);
- return(violations);
- }
-
- final protected void pass(Map objectModel, Collection violations) {
- if (violations != null) {
- Request request = ObjectModelHelper.getRequest(objectModel);
- List currentViolations = (List) request.getAttribute(PRECEPTORVIOLATIONS);
- if (currentViolations == null) {
- request.setAttribute(PRECEPTORVIOLATIONS, violations);
- }
- else {
- }
- }
- }
-
- final protected Collection validate(Map objectModel, String instanceId, String[] xpaths) throws InvalidXPathSyntaxException, NoSuchNodeException {
- Instance instance = getInstance(objectModel,instanceId);
- Preceptor preceptor = instance.getPreceptor();
- ArrayList allErrors = null;
- for(int i=0; i < xpaths.length; i++) {
- Collection errors = preceptor.validate(instance,xpaths[i],null);
- if (errors != null) {
- if (allErrors == null) allErrors = new ArrayList(1);
- allErrors.addAll(errors);
- }
- }
- return(allErrors);
- }
-
- final protected Map page( String id ) {
- Map m = new HashMap(1);
- m.put("page",id);
- return(m);
- }
-}
+/*
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
+ used to endorse or promote products derived from this software without
+ prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package org.apache.cocoon.precept.acting;
+
+import org.apache.cocoon.environment.*;
+import org.apache.avalon.framework.parameters.Parameters;
+import org.apache.avalon.framework.component.ComponentException;
+import org.apache.avalon.framework.thread.ThreadSafe;
+
+import java.util.*;
+
+import org.apache.cocoon.precept.*;
+import org.apache.cocoon.precept.acting.AbstractMethodAction;
+
+/*
+ * @version: Feb 25, 2002
+ * @author: Torsten Curdt <tc...@dff.st>
+ */
+public abstract class AbstractPreceptorAction extends AbstractMethodAction implements ThreadSafe {
+
+ public final static String PRECEPTORVIOLATIONS = "preceptorViolations";
+
+ final protected Session createSession( Map objectModel ) {
+ Request request = ObjectModelHelper.getRequest(objectModel);
+ return(request.getSession(true));
+ }
+
+ final protected Instance getInstance( Map objectModel, String instanceId ) {
+ Request request = ObjectModelHelper.getRequest(objectModel);
+ Session session = request.getSession(false);
+ return((Instance)session.getAttribute(instanceId));
+ }
+
+ final protected Instance createInstance(String id) throws ComponentException {
+ InstanceFactory factory = (InstanceFactory) manager.lookup(InstanceFactory.ROLE);
+ Instance instance = factory.createInstance(id);
+ manager.release(factory);
+ return(instance);
+ }
+
+ final protected void populate(Map objectModel, String instanceId, String xpath) throws PreceptorViolationException, InvalidXPathSyntaxException {
+ Request request = ObjectModelHelper.getRequest(objectModel);
+ Session session = request.getSession(false);
+ if (session != null) {
+ Instance instance = (Instance)session.getAttribute(instanceId);
+ if (instance != null) {
+ String value = request.getParameter(xpath);
+ //String[] values = request.getParameterValues(xpath);
+
+ if (value == null) value = "false";
+
+ getLogger().debug("populating into " + String.valueOf(xpath) + " = " + String.valueOf(value));
+ instance.setValue(xpath,value);
+ }
+ }
+ }
+
+ final protected void populate(Map objectModel, String instanceId, String[] xpaths) throws PreceptorViolationException, InvalidXPathSyntaxException {
+ for(int i=0; i < xpaths.length; i++) {
+ populate(objectModel,instanceId,xpaths[i]);
+ }
+ }
+
+ final protected Collection validate(Map objectModel, String instanceId) throws InvalidXPathSyntaxException, NoSuchNodeException {
+ Instance instance = getInstance(objectModel,instanceId);
+ Preceptor preceptor = instance.getPreceptor();
+ Collection violations = preceptor.validate(instance,null);
+ return(violations);
+ }
+
+ final protected Collection validate(Map objectModel, String instanceId, String xpath) throws InvalidXPathSyntaxException, NoSuchNodeException {
+ Instance instance = getInstance(objectModel,instanceId);
+ Preceptor preceptor = instance.getPreceptor();
+ Collection violations = preceptor.validate(instance,xpath,null);
+ return(violations);
+ }
+
+ final protected void pass(Map objectModel, Collection violations) {
+ if (violations != null) {
+ Request request = ObjectModelHelper.getRequest(objectModel);
+ List currentViolations = (List) request.getAttribute(PRECEPTORVIOLATIONS);
+ if (currentViolations == null) {
+ request.setAttribute(PRECEPTORVIOLATIONS, violations);
+ }
+ else {
+ }
+ }
+ }
+
+ final protected Collection validate(Map objectModel, String instanceId, String[] xpaths) throws InvalidXPathSyntaxException, NoSuchNodeException {
+ Instance instance = getInstance(objectModel,instanceId);
+ Preceptor preceptor = instance.getPreceptor();
+ ArrayList allErrors = null;
+ for(int i=0; i < xpaths.length; i++) {
+ Collection errors = preceptor.validate(instance,xpaths[i],null);
+ if (errors != null) {
+ if (allErrors == null) allErrors = new ArrayList(1);
+ allErrors.addAll(errors);
+ }
+ }
+ return(allErrors);
+ }
+
+ final protected Map page( String id ) {
+ Map m = new HashMap(1);
+ m.put("page",id);
+ return(m);
+ }
+}
1.3.2.1 +188 -188 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/acting/Attic/PreceptorDemoAction.java
Index: PreceptorDemoAction.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/acting/Attic/PreceptorDemoAction.java,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -u -r1.3 -r1.3.2.1
--- PreceptorDemoAction.java 4 Apr 2002 07:02:09 -0000 1.3
+++ PreceptorDemoAction.java 7 Feb 2003 07:25:28 -0000 1.3.2.1
@@ -1,188 +1,188 @@
-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
- used to endorse or promote products derived from this software without
- prior written permission. For written permission, please contact
- apache@apache.org.
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation and was originally created by
- Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
- Software Foundation, please see <http://www.apache.org/>.
-
-*/
-
-/*
- * @version: Feb 25, 2002
- * @author: Torsten Curdt <tc...@dff.st>
- */
-package org.apache.cocoon.precept.acting;
-
-import org.apache.cocoon.environment.*;
-import org.apache.avalon.framework.parameters.Parameters;
-
-import java.util.*;
-
-import org.apache.cocoon.precept.Instance;
-import org.apache.cocoon.precept.acting.AbstractPreceptorAction;
-
-/*
- * @author: Torsten Curdt <tc...@dff.st>
- */
-public class PreceptorDemoAction extends AbstractPreceptorAction {
-
- private final static String VIEW1 = "view1";
- private final static String VIEW2 = "view2";
- private final static String VIEW3 = "view3";
- private final static String VIEW4 = "view4";
- private final static String VIEW_THANKS = "thanks";
- private final static String VIEW_ERROR = "error";
-
- private final static String[] SET_PERSON = {
- "cocoon-installation/user/firstname",
- "cocoon-installation/user/lastname",
- "cocoon-installation/user/email",
- "cocoon-installation/user/age"
- };
-
- private final static String[] SET_INSTALLATION = {
- "cocoon-installation/number",
- "cocoon-installation/live-url",
- "cocoon-installation/publish"
- };
-
- private final static String[] SET_SYSTEM = {
- "cocoon-installation/system/os",
- "cocoon-installation/system/processor",
- "cocoon-installation/system/ram",
- "cocoon-installation/system/servlet-engine",
- "cocoon-installation/system/java-version"
- };
-
-
- public Map introspection(Redirector redirector, SourceResolver resolver, Map objectModel, String src, Parameters par) throws Exception {
- getLogger().debug("start of flow");
-
- Session session = createSession(objectModel);
- Instance instance = createInstance("feedback");
-
- session.setAttribute("form-feedback",instance);
- return(page(VIEW1));
- }
-
- public Map doPrev1(Redirector redirector, SourceResolver resolver, Map objectModel, String src, Parameters par) throws Exception {
- populate(objectModel, "form-feedback", SET_INSTALLATION );
- return (page(VIEW1));
- }
- public Map doPrev2(Redirector redirector, SourceResolver resolver, Map objectModel, String src, Parameters par) throws Exception {
- populate(objectModel, "form-feedback", SET_SYSTEM );
- return (page(VIEW2));
- }
- public Map doPrev3(Redirector redirector, SourceResolver resolver, Map objectModel, String src, Parameters par) throws Exception {
- return (page(VIEW3));
- }
-
- public Map doNext2(Redirector redirector, SourceResolver resolver, Map objectModel, String src, Parameters par) throws Exception {
- getLogger().debug("populating");
- populate(objectModel, "form-feedback", SET_PERSON );
-
- Collection errors = validate(objectModel, "form-feedback", SET_PERSON );
- if(errors != null) {
- getLogger().debug("some constraints FAILED");
- pass(objectModel,errors);
- return (page(VIEW1));
- }
- else {
- getLogger().debug("all constraints are ok");
- return (page(VIEW2));
- }
- }
-
- public Map doNext3(Redirector redirector, SourceResolver resolver, Map objectModel, String src, Parameters par) throws Exception {
- getLogger().debug("populating");
- populate(objectModel, "form-feedback", SET_INSTALLATION );
-
- Collection errors = validate(objectModel, "form-feedback", SET_INSTALLATION );
- if(errors != null) {
- getLogger().debug("some constraints FAILED");
- pass(objectModel,errors);
- return (page(VIEW2));
- }
- else {
- getLogger().debug("all constraints are ok");
- return (page(VIEW3));
- }
- }
-
- public Map doNext4(Redirector redirector, SourceResolver resolver, Map objectModel, String src, Parameters par) throws Exception {
- getLogger().debug("populating");
- populate(objectModel, "form-feedback", SET_SYSTEM );
-
- Collection errors = validate(objectModel, "form-feedback", SET_SYSTEM );
- if(errors != null) {
- getLogger().debug("some constraints FAILED");
- pass(objectModel,errors);
- return (page(VIEW3));
- }
- else {
- getLogger().debug("all constraints are ok");
- return (page(VIEW4));
- }
- }
-
- public Map doSubmit(Redirector redirector, SourceResolver resolver, Map objectModel, String src, Parameters par) throws Exception {
- getLogger().debug("submitting");
- Collection errors = validate(objectModel, "form-feedback");
- if (errors != null) {
- getLogger().debug("some constraints FAILED");
- pass(objectModel,errors);
- return (page(VIEW_ERROR));
- }
- else {
- getLogger().debug("instance is valid - submitting");
-
- /*
- * do whatever you want with the instance data
- */
-
- return (page(VIEW_THANKS));
- }
- }
-}
+/*
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
+ used to endorse or promote products derived from this software without
+ prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+/*
+ * @version: Feb 25, 2002
+ * @author: Torsten Curdt <tc...@dff.st>
+ */
+package org.apache.cocoon.precept.acting;
+
+import org.apache.cocoon.environment.*;
+import org.apache.avalon.framework.parameters.Parameters;
+
+import java.util.*;
+
+import org.apache.cocoon.precept.Instance;
+import org.apache.cocoon.precept.acting.AbstractPreceptorAction;
+
+/*
+ * @author: Torsten Curdt <tc...@dff.st>
+ */
+public class PreceptorDemoAction extends AbstractPreceptorAction {
+
+ private final static String VIEW1 = "view1";
+ private final static String VIEW2 = "view2";
+ private final static String VIEW3 = "view3";
+ private final static String VIEW4 = "view4";
+ private final static String VIEW_THANKS = "thanks";
+ private final static String VIEW_ERROR = "error";
+
+ private final static String[] SET_PERSON = {
+ "cocoon-installation/user/firstname",
+ "cocoon-installation/user/lastname",
+ "cocoon-installation/user/email",
+ "cocoon-installation/user/age"
+ };
+
+ private final static String[] SET_INSTALLATION = {
+ "cocoon-installation/number",
+ "cocoon-installation/live-url",
+ "cocoon-installation/publish"
+ };
+
+ private final static String[] SET_SYSTEM = {
+ "cocoon-installation/system/os",
+ "cocoon-installation/system/processor",
+ "cocoon-installation/system/ram",
+ "cocoon-installation/system/servlet-engine",
+ "cocoon-installation/system/java-version"
+ };
+
+
+ public Map introspection(Redirector redirector, SourceResolver resolver, Map objectModel, String src, Parameters par) throws Exception {
+ getLogger().debug("start of flow");
+
+ Session session = createSession(objectModel);
+ Instance instance = createInstance("feedback");
+
+ session.setAttribute("form-feedback",instance);
+ return(page(VIEW1));
+ }
+
+ public Map doPrev1(Redirector redirector, SourceResolver resolver, Map objectModel, String src, Parameters par) throws Exception {
+ populate(objectModel, "form-feedback", SET_INSTALLATION );
+ return (page(VIEW1));
+ }
+ public Map doPrev2(Redirector redirector, SourceResolver resolver, Map objectModel, String src, Parameters par) throws Exception {
+ populate(objectModel, "form-feedback", SET_SYSTEM );
+ return (page(VIEW2));
+ }
+ public Map doPrev3(Redirector redirector, SourceResolver resolver, Map objectModel, String src, Parameters par) throws Exception {
+ return (page(VIEW3));
+ }
+
+ public Map doNext2(Redirector redirector, SourceResolver resolver, Map objectModel, String src, Parameters par) throws Exception {
+ getLogger().debug("populating");
+ populate(objectModel, "form-feedback", SET_PERSON );
+
+ Collection errors = validate(objectModel, "form-feedback", SET_PERSON );
+ if(errors != null) {
+ getLogger().debug("some constraints FAILED");
+ pass(objectModel,errors);
+ return (page(VIEW1));
+ }
+ else {
+ getLogger().debug("all constraints are ok");
+ return (page(VIEW2));
+ }
+ }
+
+ public Map doNext3(Redirector redirector, SourceResolver resolver, Map objectModel, String src, Parameters par) throws Exception {
+ getLogger().debug("populating");
+ populate(objectModel, "form-feedback", SET_INSTALLATION );
+
+ Collection errors = validate(objectModel, "form-feedback", SET_INSTALLATION );
+ if(errors != null) {
+ getLogger().debug("some constraints FAILED");
+ pass(objectModel,errors);
+ return (page(VIEW2));
+ }
+ else {
+ getLogger().debug("all constraints are ok");
+ return (page(VIEW3));
+ }
+ }
+
+ public Map doNext4(Redirector redirector, SourceResolver resolver, Map objectModel, String src, Parameters par) throws Exception {
+ getLogger().debug("populating");
+ populate(objectModel, "form-feedback", SET_SYSTEM );
+
+ Collection errors = validate(objectModel, "form-feedback", SET_SYSTEM );
+ if(errors != null) {
+ getLogger().debug("some constraints FAILED");
+ pass(objectModel,errors);
+ return (page(VIEW3));
+ }
+ else {
+ getLogger().debug("all constraints are ok");
+ return (page(VIEW4));
+ }
+ }
+
+ public Map doSubmit(Redirector redirector, SourceResolver resolver, Map objectModel, String src, Parameters par) throws Exception {
+ getLogger().debug("submitting");
+ Collection errors = validate(objectModel, "form-feedback");
+ if (errors != null) {
+ getLogger().debug("some constraints FAILED");
+ pass(objectModel,errors);
+ return (page(VIEW_ERROR));
+ }
+ else {
+ getLogger().debug("instance is valid - submitting");
+
+ /*
+ * do whatever you want with the instance data
+ */
+
+ return (page(VIEW_THANKS));
+ }
+ }
+}
1.2.2.1 +136 -136 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/acting/Attic/AbstractMethodAction.java
Index: AbstractMethodAction.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/acting/Attic/AbstractMethodAction.java,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- AbstractMethodAction.java 25 Mar 2002 23:23:54 -0000 1.2
+++ AbstractMethodAction.java 7 Feb 2003 07:25:28 -0000 1.2.2.1
@@ -1,136 +1,136 @@
-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
- used to endorse or promote products derived from this software without
- prior written permission. For written permission, please contact
- apache@apache.org.
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation and was originally created by
- Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
- Software Foundation, please see <http://www.apache.org/>.
-
-*/
-
-package org.apache.cocoon.precept.acting;
-
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.cocoon.environment.Redirector;
-import org.apache.cocoon.environment.SourceResolver;
-import org.apache.cocoon.environment.Request;
-import org.apache.cocoon.environment.ObjectModelHelper;
-import org.apache.cocoon.acting.ConfigurableComposerAction;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.lang.reflect.Method;
-
-
-/*
- * @version: Feb 25, 2002
- * @author: Torsten Curdt <tc...@dff.st>
- */
-public abstract class AbstractMethodAction extends ConfigurableComposerAction {
-
- private static final String ACTION_METHOD_PREFIX = "do";
- private static final String ACTION_METHOD_PARAMETER = "method";
-
- private HashMap methodIndex = null;
-
- public void configure(Configuration conf) throws ConfigurationException {
- super.configure(conf);
-
- if (methodIndex == null) {
- try {
- Method[] methods = this.getClass().getMethods();
- methodIndex = new HashMap();
-
- int prefixLen = ACTION_METHOD_PREFIX.length();
- for (int i = 0; i < methods.length; i++) {
- String methodName = methods[i].getName();
- if (methodName.startsWith(ACTION_METHOD_PREFIX)) {
- String actionName = methodName.substring(prefixLen, prefixLen + 1).toLowerCase() +
- methodName.substring(prefixLen + 1);
- methodIndex.put(actionName, methods[i]);
- if (getLogger().isDebugEnabled()) {
- getLogger().debug("registered method \"" + methodName + "\" as action \"" + actionName + "\"");
- }
- }
- }
- }
- catch (Exception e) {
- throw new ConfigurationException("cannot get methods by reflection", e);
- }
- }
- }
-
- public Map introspection( Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) throws Exception {
- return(EMPTY_MAP);
- }
-
- public Map act( Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) throws Exception {
- String actionMethod = parameters.getParameter(ACTION_METHOD_PARAMETER,null);
- if (actionMethod != null) {
- Method method = (Method) methodIndex.get(actionMethod);
- if (method != null) {
- getLogger().debug("calling method ["+ String.valueOf(actionMethod) + "]");
- return((Map) method.invoke(this, new Object[]{ redirector,resolver,objectModel,source,parameters }));
- }
- else {
- throw new Exception("action has no method \"" + actionMethod + "\"");
- }
- }
- else {
- Request request = ObjectModelHelper.getRequest(objectModel);
- if (request != null && "GET".equalsIgnoreCase(request.getMethod())) {
- // just the first view of the page
- // call introspection
- getLogger().debug("calling introspection");
- return(introspection(redirector,resolver,objectModel,source,parameters ));
- }
- else {
- getLogger().debug("already in flow - no introspection");
- return(EMPTY_MAP);
- }
- }
- }
-}
+/*
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
+ used to endorse or promote products derived from this software without
+ prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ Stefano Mazzocchi <st...@apache.org>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package org.apache.cocoon.precept.acting;
+
+import org.apache.avalon.framework.configuration.Configuration;
+import org.apache.avalon.framework.configuration.ConfigurationException;
+import org.apache.avalon.framework.parameters.Parameters;
+import org.apache.cocoon.environment.Redirector;
+import org.apache.cocoon.environment.SourceResolver;
+import org.apache.cocoon.environment.Request;
+import org.apache.cocoon.environment.ObjectModelHelper;
+import org.apache.cocoon.acting.ConfigurableComposerAction;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.lang.reflect.Method;
+
+
+/*
+ * @version: Feb 25, 2002
+ * @author: Torsten Curdt <tc...@dff.st>
+ */
+public abstract class AbstractMethodAction extends ConfigurableComposerAction {
+
+ private static final String ACTION_METHOD_PREFIX = "do";
+ private static final String ACTION_METHOD_PARAMETER = "method";
+
+ private HashMap methodIndex = null;
+
+ public void configure(Configuration conf) throws ConfigurationException {
+ super.configure(conf);
+
+ if (methodIndex == null) {
+ try {
+ Method[] methods = this.getClass().getMethods();
+ methodIndex = new HashMap();
+
+ int prefixLen = ACTION_METHOD_PREFIX.length();
+ for (int i = 0; i < methods.length; i++) {
+ String methodName = methods[i].getName();
+ if (methodName.startsWith(ACTION_METHOD_PREFIX)) {
+ String actionName = methodName.substring(prefixLen, prefixLen + 1).toLowerCase() +
+ methodName.substring(prefixLen + 1);
+ methodIndex.put(actionName, methods[i]);
+ if (getLogger().isDebugEnabled()) {
+ getLogger().debug("registered method \"" + methodName + "\" as action \"" + actionName + "\"");
+ }
+ }
+ }
+ }
+ catch (Exception e) {
+ throw new ConfigurationException("cannot get methods by reflection", e);
+ }
+ }
+ }
+
+ public Map introspection( Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) throws Exception {
+ return(EMPTY_MAP);
+ }
+
+ public Map act( Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) throws Exception {
+ String actionMethod = parameters.getParameter(ACTION_METHOD_PARAMETER,null);
+ if (actionMethod != null) {
+ Method method = (Method) methodIndex.get(actionMethod);
+ if (method != null) {
+ getLogger().debug("calling method ["+ String.valueOf(actionMethod) + "]");
+ return((Map) method.invoke(this, new Object[]{ redirector,resolver,objectModel,source,parameters }));
+ }
+ else {
+ throw new Exception("action has no method \"" + actionMethod + "\"");
+ }
+ }
+ else {
+ Request request = ObjectModelHelper.getRequest(objectModel);
+ if (request != null && "GET".equalsIgnoreCase(request.getMethod())) {
+ // just the first view of the page
+ // call introspection
+ getLogger().debug("calling introspection");
+ return(introspection(redirector,resolver,objectModel,source,parameters ));
+ }
+ else {
+ getLogger().debug("already in flow - no introspection");
+ return(EMPTY_MAP);
+ }
+ }
+ }
+}
No revision
No revision
1.2.2.1 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/acting/Attic/SessionAction.java
Index: SessionAction.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/acting/Attic/SessionAction.java,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- SessionAction.java 22 Feb 2002 06:57:17 -0000 1.2
+++ SessionAction.java 7 Feb 2003 07:25:28 -0000 1.2.2.1
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
No revision
No revision
1.5.2.3 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/Attic/SunShine.java
Index: SunShine.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/Attic/SunShine.java,v
retrieving revision 1.5.2.2
retrieving revision 1.5.2.3
diff -u -r1.5.2.2 -r1.5.2.3
--- SunShine.java 21 Nov 2002 15:06:50 -0000 1.5.2.2
+++ SunShine.java 7 Feb 2003 07:25:28 -0000 1.5.2.3
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1.2.2.1 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/Attic/SunShineConstants.java
Index: SunShineConstants.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/Attic/SunShineConstants.java,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- SunShineConstants.java 22 Feb 2002 06:57:17 -0000 1.2
+++ SunShineConstants.java 7 Feb 2003 07:25:28 -0000 1.2.2.1
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
No revision
No revision
1.2.2.1 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunrise/selection/Attic/MediaSelector.java
Index: MediaSelector.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunrise/selection/Attic/MediaSelector.java,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- MediaSelector.java 22 Feb 2002 06:57:18 -0000 1.2
+++ MediaSelector.java 7 Feb 2003 07:25:29 -0000 1.2.2.1
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
No revision
No revision
1.2.2.1 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunrise/context/Attic/SessionContextProviderImpl.java
Index: SessionContextProviderImpl.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunrise/context/Attic/SessionContextProviderImpl.java,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- SessionContextProviderImpl.java 22 Feb 2002 06:57:18 -0000 1.2
+++ SessionContextProviderImpl.java 7 Feb 2003 07:25:29 -0000 1.2.2.1
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1.3.2.2 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunrise/context/Attic/SessionContextImpl.java
Index: SessionContextImpl.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunrise/context/Attic/SessionContextImpl.java,v
retrieving revision 1.3.2.1
retrieving revision 1.3.2.2
diff -u -r1.3.2.1 -r1.3.2.2
--- SessionContextImpl.java 7 Jun 2002 09:34:25 -0000 1.3.2.1
+++ SessionContextImpl.java 7 Feb 2003 07:25:29 -0000 1.3.2.2
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
No revision
No revision
1.11.2.1 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/treeprocessor/TreeProcessor.java
Index: TreeProcessor.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/treeprocessor/TreeProcessor.java,v
retrieving revision 1.11
retrieving revision 1.11.2.1
diff -u -r1.11 -r1.11.2.1
--- TreeProcessor.java 5 Mar 2002 08:26:24 -0000 1.11
+++ TreeProcessor.java 7 Feb 2003 07:25:29 -0000 1.11.2.1
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
No revision
No revision
1.4.2.1 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/generation/XPathDirectoryGenerator.java
Index: XPathDirectoryGenerator.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/generation/XPathDirectoryGenerator.java,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -u -r1.4 -r1.4.2.1
--- XPathDirectoryGenerator.java 22 Feb 2002 06:58:03 -0000 1.4
+++ XPathDirectoryGenerator.java 7 Feb 2003 07:25:29 -0000 1.4.2.1
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
No revision
No revision
1.2.2.1 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/storejanitor/StoreJanitorImpl.java
Index: StoreJanitorImpl.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/storejanitor/StoreJanitorImpl.java,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- StoreJanitorImpl.java 22 Feb 2002 06:58:03 -0000 1.2
+++ StoreJanitorImpl.java 7 Feb 2003 07:25:31 -0000 1.2.2.1
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
No revision
No revision
1.1.2.1 +2 -2 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/util/ResizableContainer.java
Index: ResizableContainer.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/util/ResizableContainer.java,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -r1.1 -r1.1.2.1
--- ResizableContainer.java 9 Mar 2002 06:35:57 -0000 1.1
+++ ResizableContainer.java 7 Feb 2003 07:25:31 -0000 1.1.2.1
@@ -4,7 +4,7 @@
The Apache Software License, Version 1.1
============================================================================
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
----------------------------------------------------------------------
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