Added: 
incubator/sling/whiteboard/rewriter/src/main/java/org/apache/sling/rewriter/impl/RewriterResponse.java
URL: 
http://svn.apache.org/viewvc/incubator/sling/whiteboard/rewriter/src/main/java/org/apache/sling/rewriter/impl/RewriterResponse.java?rev=769036&view=auto
==============================================================================
--- 
incubator/sling/whiteboard/rewriter/src/main/java/org/apache/sling/rewriter/impl/RewriterResponse.java
 (added)
+++ 
incubator/sling/whiteboard/rewriter/src/main/java/org/apache/sling/rewriter/impl/RewriterResponse.java
 Mon Apr 27 15:59:38 2009
@@ -0,0 +1,180 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sling.rewriter.impl;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.Writer;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.sling.api.SlingHttpServletRequest;
+import org.apache.sling.api.SlingHttpServletResponse;
+import org.apache.sling.api.adapter.Adaptable;
+import org.apache.sling.api.wrappers.SlingHttpServletResponseWrapper;
+import org.apache.sling.rewriter.ProcessingContext;
+import org.apache.sling.rewriter.Processor;
+import org.apache.sling.rewriter.ProcessorConfiguration;
+import org.apache.sling.rewriter.ProcessorManager;
+import org.xml.sax.ContentHandler;
+
+/**
+ * This response is used to pass the output through the rewriter pipeline.
+ */
+class RewriterResponse
+    extends SlingHttpServletResponseWrapper
+    implements Adaptable {
+
+    /** The current request. */
+    private final SlingHttpServletRequest request;
+
+    /** The processor. */
+    private Processor processor;
+
+    /** wrapped rewriter/servlet writer */
+    private PrintWriter writer;
+
+    /** response content type */
+    private String contentType;
+
+    /** The processor manager. */
+    private final ProcessorManager processorManager;
+
+    /**
+     * Initializes a new instance.
+     * @param request The sling request.
+     * @param delegatee The SlingHttpServletResponse wrapped by this instance.
+     */
+    public RewriterResponse(SlingHttpServletRequest request,
+                            SlingHttpServletResponse delegatee,
+                            ProcessorManager processorManager) {
+        super(delegatee);
+        this.processorManager = processorManager;
+        this.request = request;
+    }
+
+    /**
+     * @see 
javax.servlet.ServletResponseWrapper#setContentType(java.lang.String)
+     */
+    public void setContentType(String type) {
+        this.contentType = type;
+        super.setContentType(type);
+    }
+
+    /**
+     * Wraps the underlying writer by a rewriter pipeline.
+     *
+     * @see javax.servlet.ServletResponseWrapper#getWriter()
+     */
+    public PrintWriter getWriter() throws IOException {
+        if ( this.processor != null && this.writer == null ) {
+            return new PrintWriter(new Writer() {
+
+                @Override
+                public void close() throws IOException {
+                    // nothing to do
+                }
+
+                @Override
+                public void flush() throws IOException {
+                    // nothing to do
+                }
+
+                @Override
+                public void write(char[] cbuf, int off, int len)
+                throws IOException {
+                    // nothing to do
+                }
+             });
+        }
+        if (writer == null) {
+            final ProcessingContext processorContext = new 
ServletProcessingContext(this.request, this, this.getSlingResponse(), 
this.contentType);
+            boolean found = false;
+            final List<ProcessorConfiguration> processorConfigs = 
this.processorManager.getProcessorConfigurations();
+            final Iterator<ProcessorConfiguration> i = 
processorConfigs.iterator();
+            while ( !found && i.hasNext() ) {
+                final ProcessorConfiguration config = i.next();
+                if ( config.match(processorContext) ) {
+                    found = true;
+
+                    this.processor = 
this.processorManager.getProcessor(config, processorContext);
+                    this.writer = this.processor.getWriter();
+                }
+            }
+            if ( this.writer == null ) {
+                this.writer = super.getWriter();
+            }
+        }
+        return writer;
+    }
+
+    /**
+     * @see javax.servlet.ServletResponseWrapper#flushBuffer()
+     */
+    public void flushBuffer() throws IOException {
+        if (writer != null) {
+            writer.flush();
+        } else {
+            super.flushBuffer();
+        }
+    }
+
+    /**
+     * Inform this response that the request processing is finished.
+     * @throws IOException
+     */
+    public void finished() throws IOException {
+        if ( this.processor != null ) {
+            this.processor.finished();
+            this.processor = null;
+        }
+    }
+
+    /**
+     * If we have a pipeline configuration for the current request,
+     * we can adapt this response to a content handler.
+     * @see org.apache.sling.api.adapter.Adaptable#adaptTo(java.lang.Class)
+     */
+    public <AdapterType> AdapterType adaptTo(Class<AdapterType> type) {
+        if ( type == ContentHandler.class ) {
+            try {
+                final ProcessingContext processorContext = new 
ServletProcessingContext(this.request, this, this.getSlingResponse(), 
this.contentType);
+                boolean found = false;
+                final List<ProcessorConfiguration> processorConfigs = 
this.processorManager.getProcessorConfigurations();
+                final Iterator<ProcessorConfiguration> i = 
processorConfigs.iterator();
+                while ( !found && i.hasNext() ) {
+                    final ProcessorConfiguration config = i.next();
+                    if ( config.match(processorContext) ) {
+                        found = true;
+
+                        this.processor = 
this.processorManager.getProcessor(config, processorContext);
+                    }
+                }
+            } catch (IOException e) {
+                // we ignore this here - this will be handled, when getWriter 
is called
+                // again
+                return null;
+            }
+            if ( this.processor != null ) {
+                @SuppressWarnings("unchecked")
+                final AdapterType object = 
(AdapterType)this.processor.getContentHandler();
+                return object;
+            }
+        }
+        return null;
+    }
+}

Propchange: 
incubator/sling/whiteboard/rewriter/src/main/java/org/apache/sling/rewriter/impl/RewriterResponse.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
incubator/sling/whiteboard/rewriter/src/main/java/org/apache/sling/rewriter/impl/RewriterResponse.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision rev url

Propchange: 
incubator/sling/whiteboard/rewriter/src/main/java/org/apache/sling/rewriter/impl/RewriterResponse.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: 
incubator/sling/whiteboard/rewriter/src/main/java/org/apache/sling/rewriter/impl/ServletProcessingContext.java
URL: 
http://svn.apache.org/viewvc/incubator/sling/whiteboard/rewriter/src/main/java/org/apache/sling/rewriter/impl/ServletProcessingContext.java?rev=769036&view=auto
==============================================================================
--- 
incubator/sling/whiteboard/rewriter/src/main/java/org/apache/sling/rewriter/impl/ServletProcessingContext.java
 (added)
+++ 
incubator/sling/whiteboard/rewriter/src/main/java/org/apache/sling/rewriter/impl/ServletProcessingContext.java
 Mon Apr 27 15:59:38 2009
@@ -0,0 +1,91 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sling.rewriter.impl;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+
+import org.apache.sling.api.SlingHttpServletRequest;
+import org.apache.sling.api.SlingHttpServletResponse;
+import org.apache.sling.rewriter.ProcessingContext;
+
+/**
+ * An implementation of a processing context for a servlet.
+ */
+public class ServletProcessingContext implements ProcessingContext {
+
+    /** The current request. */
+    private final SlingHttpServletRequest request;
+
+    /** The current response. */
+    private final SlingHttpServletResponse response;
+
+    /** The original response. */
+    private final SlingHttpServletResponse originalResponse;
+
+    /** response content type */
+    private final String contentType;
+
+    /**
+     * Initializes a new instance.
+     */
+    public ServletProcessingContext(SlingHttpServletRequest request,
+                                    SlingHttpServletResponse response,
+                                    SlingHttpServletResponse originalResponse,
+                                    String contentType) {
+        this.request = request;
+        this.response = response;
+        this.originalResponse = originalResponse;
+        this.contentType = contentType;
+    }
+
+    /**
+     * @see org.apache.sling.rewriter.ProcessingContext#getContentType()
+     */
+    public String getContentType() {
+        return this.contentType;
+    }
+
+    /**
+     * @see org.apache.sling.rewriter.ProcessingContext#getRequest()
+     */
+    public SlingHttpServletRequest getRequest() {
+        return this.request;
+    }
+
+    /**
+     * @see org.apache.sling.rewriter.ProcessingContext#getResponse()
+     */
+    public SlingHttpServletResponse getResponse() {
+        return this.response;
+    }
+
+    /**
+     * @see org.apache.sling.rewriter.ProcessingContext#getWriter()
+     */
+    public PrintWriter getWriter() throws IOException {
+        return this.originalResponse.getWriter();
+    }
+
+    /**
+     * @see org.apache.sling.rewriter.ProcessingContext#getOutputStream()
+     */
+    public OutputStream getOutputStream() throws IOException {
+        return this.originalResponse.getOutputStream();
+    }
+}

Propchange: 
incubator/sling/whiteboard/rewriter/src/main/java/org/apache/sling/rewriter/impl/ServletProcessingContext.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
incubator/sling/whiteboard/rewriter/src/main/java/org/apache/sling/rewriter/impl/ServletProcessingContext.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision rev url

Propchange: 
incubator/sling/whiteboard/rewriter/src/main/java/org/apache/sling/rewriter/impl/ServletProcessingContext.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: 
incubator/sling/whiteboard/rewriter/src/main/java/org/apache/sling/rewriter/impl/TagTokenizer.java
URL: 
http://svn.apache.org/viewvc/incubator/sling/whiteboard/rewriter/src/main/java/org/apache/sling/rewriter/impl/TagTokenizer.java?rev=769036&view=auto
==============================================================================
--- 
incubator/sling/whiteboard/rewriter/src/main/java/org/apache/sling/rewriter/impl/TagTokenizer.java
 (added)
+++ 
incubator/sling/whiteboard/rewriter/src/main/java/org/apache/sling/rewriter/impl/TagTokenizer.java
 Mon Apr 27 15:59:38 2009
@@ -0,0 +1,485 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sling.rewriter.impl;
+
+import java.io.CharArrayWriter;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.LinkedHashSet;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * Tokenizes a snippet of characters into a structured tag/attribute name list.
+ */
+class TagTokenizer {
+    /** Tag name buffer */
+    private final CharArrayWriter tagName = new CharArrayWriter(30);
+
+    /** Attribute name buffer */
+    private final CharArrayWriter attName = new CharArrayWriter(30);
+
+    /** Attribute value buffer */
+    private final CharArrayWriter attValue = new CharArrayWriter(30);
+
+    /** Internal property list */
+    private final AttributeListImpl attributes = new AttributeListImpl();
+
+    /** Parse state constant */
+    private final static int START = 0;
+
+    /** Parse state constant */
+    private final static int TAG = START + 1;
+
+    /** Parse state constant */
+    private final static int NAME = TAG + 1;
+
+    /** Parse state constant */
+    private final static int INSIDE = NAME + 1;
+
+    /** Parse state constant */
+    private final static int ATTNAME = INSIDE + 1;
+
+    /** Parse state constant */
+    private final static int EQUAL = ATTNAME + 1;
+
+    /** Parse state constant */
+    private final static int ATTVALUE = EQUAL + 1;
+
+    /** Parse state constant */
+    private final static int STRING = ATTVALUE + 1;
+
+    /** Parse state constant */
+    private final static int ENDSLASH = STRING + 1;
+
+    /** Parse state constant */
+    private final static int END = ENDSLASH + 1;
+
+    /** Quote character */
+    private char quoteChar = '"';
+
+    /** Flag indicating whether the tag scanned is an end tag */
+    private boolean endTag;
+
+    /** Flag indicating whether an ending slash was parsed */
+    private boolean endSlash;
+
+    /** temporary flag indicating if attribute has a value */
+    private boolean hasAttributeValue;
+
+    /**
+     * Scan characters passed to this parser
+     */
+    public void tokenize(char[] buf, int off, int len) {
+        reset();
+
+        int parseState = START;
+
+        for (int i = 0; i < len; i++) {
+            char c = buf[off + i];
+
+            switch (parseState) {
+                case START:
+                    if (c == '<') {
+                        parseState = TAG;
+                    }
+                    break;
+                case TAG:
+                    if (c == '/') {
+                        endTag = true;
+                        parseState = NAME;
+                    } else if (c == '"' || c == '\'') {
+                        quoteChar = c;
+                        parseState = STRING;
+                    } else if (Character.isWhitespace(c)) {
+                        parseState = INSIDE;
+                    } else {
+                        tagName.write(c);
+                        parseState = NAME;
+                    }
+                    break;
+                case NAME:
+                    if (Character.isWhitespace(c)) {
+                        parseState = INSIDE;
+                    } else if (c == '"' || c == '\'') {
+                        quoteChar = c;
+                        parseState = STRING;
+                    } else if (c == '>') {
+                        parseState = END;
+                    } else if (c == '/') {
+                        parseState = ENDSLASH;
+                    } else {
+                        tagName.write(c);
+                    }
+                    break;
+                case INSIDE:
+                    if (c == '>') {
+                        attributeEnded();
+                        parseState = END;
+                    } else if (c == '/') {
+                        attributeEnded();
+                        parseState = ENDSLASH;
+                    } else if (c == '"' || c == '\'') {
+                        attributeValueStarted();
+                        quoteChar = c;
+                        parseState = STRING;
+                    } else if (c == '=') {
+                        parseState = EQUAL;
+                    } else if (!Character.isWhitespace(c)) {
+                        attName.write(c);
+                        parseState = ATTNAME;
+                    }
+                    break;
+                case ATTNAME:
+                    if (c == '>') {
+                        attributeEnded();
+                        parseState = END;
+                    } else if (c == '/') {
+                        attributeEnded();
+                        parseState = ENDSLASH;
+                    } else if (c == '=') {
+                        parseState = EQUAL;
+                    } else if (c == '"' || c == '\'') {
+                        quoteChar = c;
+                        parseState = STRING;
+                    } else if (Character.isWhitespace(c)) {
+                        parseState = INSIDE;
+                    } else {
+                        attName.write(c);
+                    }
+                    break;
+                case EQUAL:
+                    if (c == '>') {
+                        attributeEnded();
+                        parseState = END;
+                    } else if (c == '"' || c == '\'') {
+                        attributeValueStarted();
+                        quoteChar = c;
+                        parseState = STRING;
+                    } else if (!Character.isWhitespace(c)) {
+                        attributeValueStarted();
+                        attValue.write(c);
+                        parseState = ATTVALUE;
+                    }
+                    break;
+                case ATTVALUE:
+                    if (Character.isWhitespace(c)) {
+                        attributeEnded();
+                        parseState = INSIDE;
+                    } else if (c == '"' || c == '\'') {
+                        attributeEnded();
+                        quoteChar = c;
+                        parseState = STRING;
+                    } else if (c == '>') {
+                        attributeEnded();
+                        parseState = END;
+                    } else {
+                        attValue.write(c);
+                    }
+                    break;
+                case STRING:
+                    if (c == quoteChar) {
+                        attributeEnded();
+                        parseState = INSIDE;
+                    } else {
+                        attValue.write(c);
+                    }
+                    break;
+                case ENDSLASH:
+                    if (c == '>') {
+                        endSlash = true;
+                        parseState = END;
+                    } else if (c == '"' || c == '\'') {
+                        quoteChar = c;
+                        parseState = STRING;
+                    } else if (c != '/' && !Character.isWhitespace(c)) {
+                        attName.write(c);
+                        parseState = ATTNAME;
+                    } else {
+                        parseState = INSIDE;
+                    }
+                    break;
+                case END:
+                    break;
+
+            }
+        }
+    }
+
+    /**
+     * Return a flag indicating whether the tag scanned was an end tag
+     * @return <code>true</code> if it was an end tag, otherwise
+     *         <code>false</code>
+     */
+    public boolean endTag() {
+        return endTag;
+    }
+
+    /**
+     * Return a flag indicating whether an ending slash was scanned
+     * @return <code>true</code> if an ending slash was scanned, otherwise
+     *         <code>false</code>
+     */
+    public boolean endSlash() {
+        return endSlash;
+    }
+
+    /**
+     * Return the tagname scanned
+     * @return tag name
+     */
+    public String tagName() {
+        return tagName.toString();
+    }
+
+    /**
+     * Return the list of attributes scanned
+     * @return list of attributes
+     */
+    public AttributeList attributes() {
+        return attributes;
+    }
+
+    /**
+     * Reset the internal state of the tokenizer
+     */
+    private void reset() {
+        tagName.reset();
+        attributes.reset();
+        endTag = false;
+        endSlash = false;
+    }
+
+    /**
+     * Invoked when an attribute ends
+     */
+    private void attributeEnded() {
+        if (attName.size() > 0) {
+            if (hasAttributeValue) {
+                attributes.addAttribute(attName.toString().toLowerCase(), 
attValue.toString(),
+                        quoteChar);
+            } else {
+                attributes.addAttribute(attName.toString().toLowerCase(), 
quoteChar);
+
+            }
+            attName.reset();
+            attValue.reset();
+            hasAttributeValue = false;
+        }
+    }
+
+    /**
+     * Invoked when an attribute value starts
+     */
+    private void attributeValueStarted() {
+        hasAttributeValue = true;
+    }
+
+    /**
+     * Retransfers the tokenized tag data into html again
+     * @return the reassembled html string
+     */
+    public String toHtmlString() {
+        StringBuffer sb = new StringBuffer();
+        sb.append("<" + tagName());
+        Iterator<String> attNames = attributes().attributeNames();
+        while (attNames.hasNext()) {
+            String attName = attNames.next();
+            String attValue = attributes().getQuotedValue(attName);
+
+            sb.append(" ");
+            sb.append(attName);
+            if (attValue != null) {
+                sb.append('=');
+                sb.append(attValue);
+            }
+        }
+        if (endSlash) {
+            sb.append(" /");
+        }
+        sb.append(">");
+        return sb.toString();
+    }
+}
+
+/**
+ * Internal implementation of an <code>AttributeList</code>
+ */
+class AttributeListImpl implements AttributeList {
+
+    /**
+     * Internal Value class
+     */
+    static class Value {
+
+        /**
+         * Create a new <code>Value</code> instance
+         */
+        public Value(char quoteChar, String value) {
+            this.quoteChar = quoteChar;
+            this.value = value;
+        }
+
+        /** Quote character */
+        public final char quoteChar;
+
+        /** Value itself */
+        public final String value;
+
+        /** String representation */
+        private String stringRep;
+
+        /**
+         * @see Object#toString()
+         */
+        public String toString() {
+            if (stringRep == null) {
+                stringRep = quoteChar + value + quoteChar;
+            }
+            return stringRep;
+        }
+    }
+
+    /** Attribute/Value pair map with case insensitives names */
+    private final Map<String, Value> attributes = new LinkedHashMap<String, 
Value>();
+
+    /** Attribute names, case sensitive */
+    private final Set<String> attributeNames = new LinkedHashSet<String>();
+
+    /** Flag indicating whether this object was modified */
+    private boolean modified;
+
+    /**
+     * Add an attribute/value pair to this attribute list
+     */
+    public void addAttribute(String name, String value, char quoteChar) {
+        attributes.put(name.toUpperCase(), new Value(quoteChar, value));
+        attributeNames.add(name);
+    }
+
+    /**
+     * Add an attribute/value pair to this attribute list
+     */
+    public void addAttribute(String name, char quoteChar) {
+        attributes.put(name.toUpperCase(), null);
+        attributeNames.add(name);
+    }
+
+    /**
+     * Empty this attribute list
+     */
+    public void reset() {
+        attributes.clear();
+        attributeNames.clear();
+        modified = false;
+    }
+
+    /**
+     * @see AttributeList#attributeCount
+     */
+    public int attributeCount() {
+        return attributes.size();
+    }
+
+    /**
+     * @see AttributeList#attributeNames
+     */
+    public Iterator<String> attributeNames() {
+        return attributeNames.iterator();
+    }
+
+    /**
+     * @see AttributeList#containsAttribute(String)
+     */
+    public boolean containsAttribute(String name) {
+        return attributes.containsKey(name.toUpperCase());
+    }
+
+    /**
+     * @see AttributeList#getValue(String)
+     */
+    public String getValue(String name) {
+        Value value = getValueEx(name);
+        if (value != null) {
+            return value.value;
+        }
+        return null;
+    }
+
+    /**
+     * @see 
org.apache.sling.rewriter.impl.AttributeList#getQuoteChar(java.lang.String)
+     */
+    public char getQuoteChar(String name) {
+        Value value = getValueEx(name);
+        if (value != null) {
+            return value.quoteChar;
+        }
+        return 0;
+    }
+
+    /**
+     * @see AttributeList#getQuotedValue(String)
+     */
+    public String getQuotedValue(String name) {
+        Value value = getValueEx(name);
+        if (value != null) {
+            return value.toString();
+        }
+        return null;
+    }
+
+    /**
+     * @see AttributeList#setValue(String, String)
+     */
+    public void setValue(String name, String value) {
+        if (value == null) {
+            removeValue(name);
+        } else {
+            Value old = getValueEx(name);
+            if (old == null) {
+                addAttribute(name, value, '"');
+                modified = true;
+            } else if (!old.value.equals(value)) {
+                addAttribute(name, value, old.quoteChar);
+                modified = true;
+            }
+        }
+    }
+
+    /**
+     * @see AttributeList#removeValue(String)
+     */
+    public void removeValue(String name) {
+        attributeNames.remove(name);
+        attributes.remove(name.toUpperCase());
+        modified = true;
+    }
+
+    /**
+     * @see AttributeList#isModified
+     */
+    public boolean isModified() {
+        return modified;
+    }
+
+    /**
+     * Return internal value structure
+     */
+    protected Value getValueEx(String name) {
+        return attributes.get(name.toUpperCase());
+    }
+}

Propchange: 
incubator/sling/whiteboard/rewriter/src/main/java/org/apache/sling/rewriter/impl/TagTokenizer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
incubator/sling/whiteboard/rewriter/src/main/java/org/apache/sling/rewriter/impl/TagTokenizer.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision rev url

Propchange: 
incubator/sling/whiteboard/rewriter/src/main/java/org/apache/sling/rewriter/impl/TagTokenizer.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: 
incubator/sling/whiteboard/rewriter/src/main/resources/META-INF/DISCLAIMER
URL: 
http://svn.apache.org/viewvc/incubator/sling/whiteboard/rewriter/src/main/resources/META-INF/DISCLAIMER?rev=769036&view=auto
==============================================================================
--- incubator/sling/whiteboard/rewriter/src/main/resources/META-INF/DISCLAIMER 
(added)
+++ incubator/sling/whiteboard/rewriter/src/main/resources/META-INF/DISCLAIMER 
Mon Apr 27 15:59:38 2009
@@ -0,0 +1,7 @@
+Apache Sling is an effort undergoing incubation at The Apache Software 
Foundation (ASF),
+sponsored by the Apache Jackrabbit PMC. Incubation is required of all newly 
accepted
+projects until a further review indicates that the infrastructure, 
communications,
+and decision making process have stabilized in a manner consistent with other
+successful ASF projects. While incubation status is not necessarily a 
reflection of
+the completeness or stability of the code, it does indicate that the project 
has yet
+to be fully endorsed by the ASF.
\ No newline at end of file

Added: incubator/sling/whiteboard/rewriter/src/main/resources/META-INF/LICENSE
URL: 
http://svn.apache.org/viewvc/incubator/sling/whiteboard/rewriter/src/main/resources/META-INF/LICENSE?rev=769036&view=auto
==============================================================================
--- incubator/sling/whiteboard/rewriter/src/main/resources/META-INF/LICENSE 
(added)
+++ incubator/sling/whiteboard/rewriter/src/main/resources/META-INF/LICENSE Mon 
Apr 27 15:59:38 2009
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

Propchange: 
incubator/sling/whiteboard/rewriter/src/main/resources/META-INF/LICENSE
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/sling/whiteboard/rewriter/src/main/resources/META-INF/NOTICE
URL: 
http://svn.apache.org/viewvc/incubator/sling/whiteboard/rewriter/src/main/resources/META-INF/NOTICE?rev=769036&view=auto
==============================================================================
--- incubator/sling/whiteboard/rewriter/src/main/resources/META-INF/NOTICE 
(added)
+++ incubator/sling/whiteboard/rewriter/src/main/resources/META-INF/NOTICE Mon 
Apr 27 15:59:38 2009
@@ -0,0 +1,10 @@
+Apache Sling Rewriter
+Copyright 2009 The Apache Software Foundation
+
+Apache Sling is based on source code originally developed 
+by Day Software (http://www.day.com/).
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+

Propchange: 
incubator/sling/whiteboard/rewriter/src/main/resources/META-INF/NOTICE
------------------------------------------------------------------------------
    svn:eol-style = native


Reply via email to