jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r351746 - in /incubator/jackrabbit/trunk/contrib/textfilters: ./ src/java/org/apache/jackrabbit/core/query/ src/test/org/apache/jackrabbit/core/query/test/
Date Fri, 02 Dec 2005 15:07:59 GMT
Author: mreutegg
Date: Fri Dec  2 07:07:45 2005
New Revision: 351746

URL: http://svn.apache.org/viewcvs?rev=351746&view=rev
Log:
JCR-281: textfilters module patch: Support for text extraction for HTML,XML and RTF files

Added:
    incubator/jackrabbit/trunk/contrib/textfilters/src/java/org/apache/jackrabbit/core/query/HTMLParser.java
  (with props)
    incubator/jackrabbit/trunk/contrib/textfilters/src/java/org/apache/jackrabbit/core/query/HTMLTextFilter.java
  (with props)
    incubator/jackrabbit/trunk/contrib/textfilters/src/java/org/apache/jackrabbit/core/query/RTFTextFilter.java
  (with props)
    incubator/jackrabbit/trunk/contrib/textfilters/src/java/org/apache/jackrabbit/core/query/XMLTextFilter.java
  (with props)
    incubator/jackrabbit/trunk/contrib/textfilters/src/test/org/apache/jackrabbit/core/query/test/HTMLTest.java
  (with props)
    incubator/jackrabbit/trunk/contrib/textfilters/src/test/org/apache/jackrabbit/core/query/test/RTFTest.java
  (with props)
    incubator/jackrabbit/trunk/contrib/textfilters/src/test/org/apache/jackrabbit/core/query/test/XMLTest.java
  (with props)
Modified:
    incubator/jackrabbit/trunk/contrib/textfilters/README.txt
    incubator/jackrabbit/trunk/contrib/textfilters/project.xml

Modified: incubator/jackrabbit/trunk/contrib/textfilters/README.txt
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/textfilters/README.txt?rev=351746&r1=351745&r2=351746&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/textfilters/README.txt (original)
+++ incubator/jackrabbit/trunk/contrib/textfilters/README.txt Fri Dec  2 07:07:45 2005
@@ -20,7 +20,7 @@
 ...
   <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
     <param name="path" value="${wsp.home}/index" />
-    <param name="textFilterClasses" value="org.apache.jackrabbit.core.query.MsExcelTextFilter,org.apache.jackrabbit.core.query.MsPowerPointTextFilter,org.apache.jackrabbit.core.query.MsWordTextFilter,org.apache.jackrabbit.core.query.PdfTextFilter"
/>
+    <param name="textFilterClasses" value="org.apache.jackrabbit.core.query.MsExcelTextFilter,org.apache.jackrabbit.core.query.MsPowerPointTextFilter,org.apache.jackrabbit.core.query.MsWordTextFilter,org.apache.jackrabbit.core.query.PdfTextFilter,org.apache.jackrabbit.core.query.HTMLTextFilter,org.apache.jackrabbit.core.query.XMLTextFilter,org.apache.jackrabbit.core.query..RTFTextFilter"
/>
   </SearchIndex>
 ...
 

Modified: incubator/jackrabbit/trunk/contrib/textfilters/project.xml
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/textfilters/project.xml?rev=351746&r1=351745&r2=351746&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/textfilters/project.xml (original)
+++ incubator/jackrabbit/trunk/contrib/textfilters/project.xml Fri Dec  2 07:07:45 2005
@@ -225,6 +225,18 @@
       <type>jar</type>
       <url>http://www.day.com/maven/jsr170/jars/jcr-1.0.jar</url>
     </dependency>
+    <dependency>
+      <groupId>nekohtml</groupId>
+      <artifactId>nekohtml</artifactId>
+      <version>0.9.4</version>
+      <type>jar</type>
+    </dependency>
+    <dependency>
+      <groupId>xerces</groupId>
+      <artifactId>xerces</artifactId>
+      <version>2.4.0</version>
+      <type>jar</type>
+    </dependency>
   </dependencies>
   <build>
     <sourceDirectory>src/java</sourceDirectory>

Added: incubator/jackrabbit/trunk/contrib/textfilters/src/java/org/apache/jackrabbit/core/query/HTMLParser.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/textfilters/src/java/org/apache/jackrabbit/core/query/HTMLParser.java?rev=351746&view=auto
==============================================================================
--- incubator/jackrabbit/trunk/contrib/textfilters/src/java/org/apache/jackrabbit/core/query/HTMLParser.java
(added)
+++ incubator/jackrabbit/trunk/contrib/textfilters/src/java/org/apache/jackrabbit/core/query/HTMLParser.java
Fri Dec  2 07:07:45 2005
@@ -0,0 +1,98 @@
+/*
+ * Copyright 2004-2005 The Apache Software Foundation or its licensors,
+ *                     as applicable.
+ *
+ * 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.
+ */
+package org.apache.jackrabbit.core.query;
+
+import org.apache.xerces.parsers.AbstractSAXParser;
+import org.apache.xerces.xni.Augmentations;
+import org.apache.xerces.xni.NamespaceContext;
+import org.apache.xerces.xni.XMLLocator;
+import org.apache.xerces.xni.XMLString;
+import org.apache.xerces.xni.XNIException;
+import org.cyberneko.html.HTMLConfiguration;
+
+/**
+ * Helper class for HTML parsing
+ */
+public class HTMLParser extends AbstractSAXParser {
+
+    private StringBuffer buffer;
+
+    public HTMLParser() {
+
+        super(new HTMLConfiguration());
+    }
+
+    public void startDocument(XMLLocator arg0,
+                              String arg1,
+                              NamespaceContext arg2,
+                              Augmentations arg3) throws XNIException {
+
+        super.startDocument(arg0, arg1, arg2, arg3);
+
+        buffer = new StringBuffer();
+    }
+
+    public void characters(XMLString xmlString, Augmentations augmentations)
+            throws XNIException {
+
+        super.characters(xmlString, augmentations);
+
+        buffer.append(xmlString.toString());
+    }
+
+    private String filterAndJoin(String text) {
+
+        boolean space = false;
+        StringBuffer buffer = new StringBuffer();
+        for (int i = 0; i < text.length(); i++) {
+            char c = text.charAt(i);
+
+            if ((c == '\n') || (c == ' ') || Character.isWhitespace(c)) {
+                if (space) {
+                    continue;
+                } else {
+                    space = true;
+                    buffer.append(' ');
+                    continue;
+                }
+            } else {
+                if (!Character.isLetter(c)) {
+                    if (!space) {
+                        space = true;
+                        buffer.append(' ');
+                        continue;
+                    }
+                    continue;
+                }
+            }
+            space = false;
+            buffer.append(c);
+        }
+        return buffer.toString();
+    }
+
+    /**
+     * Returns parsed content
+     *
+     * @return String Parsed content
+     */
+    public String getContents() {
+
+        String text = filterAndJoin(buffer.toString());
+        return text;
+    }
+}

Propchange: incubator/jackrabbit/trunk/contrib/textfilters/src/java/org/apache/jackrabbit/core/query/HTMLParser.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/jackrabbit/trunk/contrib/textfilters/src/java/org/apache/jackrabbit/core/query/HTMLTextFilter.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/textfilters/src/java/org/apache/jackrabbit/core/query/HTMLTextFilter.java?rev=351746&view=auto
==============================================================================
--- incubator/jackrabbit/trunk/contrib/textfilters/src/java/org/apache/jackrabbit/core/query/HTMLTextFilter.java
(added)
+++ incubator/jackrabbit/trunk/contrib/textfilters/src/java/org/apache/jackrabbit/core/query/HTMLTextFilter.java
Fri Dec  2 07:07:45 2005
@@ -0,0 +1,123 @@
+/*
+ * Copyright 2004-2005 The Apache Software Foundation or its licensors,
+ *                     as applicable.
+ *
+ * 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.
+ */
+package org.apache.jackrabbit.core.query;
+
+import java.io.StringReader;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.jcr.RepositoryException;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.TransformerFactoryConfigurationError;
+import javax.xml.transform.sax.SAXResult;
+import javax.xml.transform.sax.SAXSource;
+
+import org.apache.jackrabbit.core.query.lucene.FieldNames;
+import org.apache.jackrabbit.core.state.PropertyState;
+import org.apache.jackrabbit.core.value.BLOBFileValue;
+import org.apache.jackrabbit.core.value.InternalValue;
+import org.xml.sax.InputSource;
+import org.xml.sax.helpers.DefaultHandler;
+
+/**
+ * Extracts texts from HTML documents. It uses nekohtml library.
+ */
+public class HTMLTextFilter implements TextFilter {
+
+    private HTMLParser parser;
+    private SAXResult result;
+    private Transformer transformer;
+
+    /**
+     * @return <code>true</code> for <code>text/xml</code>, <code>false</code>
+     *         otherwise.
+     */
+    public boolean canFilter(String mimeType) {
+        return "text/html".equalsIgnoreCase(mimeType);
+    }
+
+    /**
+     * Returns a map with a single entry for field {@link FieldNames#FULLTEXT}.
+     *
+     * @param data     object containing RTF document data
+     * @param encoding text encoding is not used, since it is specified in the
+     *                 data.
+     * @return a map with a single Reader value for field {@link
+     *         FieldNames#FULLTEXT}.
+     * @throws RepositoryException if data is a multi-value property or if the
+     *                             content can't be extracted
+     */
+    public Map doFilter(PropertyState data, String encoding)
+            throws RepositoryException {
+
+        if (parser == null) {
+            initParser();
+        }
+
+        InternalValue[] values = data.getValues();
+        if (values.length > 0) {
+            try {
+                try {
+                    BLOBFileValue blob =
+                            (BLOBFileValue) values[0].internalValue();
+
+                    SAXSource source =
+                            new SAXSource(parser,
+                                    new InputSource(blob.getStream()));
+                    transformer.transform(source, result);
+
+                    String text = parser.getContents();
+
+                    Map result = new HashMap();
+                    result.put(FieldNames.FULLTEXT, new StringReader(text));
+                    return result;
+                } catch (TransformerException te) {
+                    throw new RepositoryException(te);
+                }
+
+            } catch (IllegalStateException e) {
+                throw new RepositoryException(e);
+            }
+        } else {
+            // multi value not supported
+            throw new RepositoryException("Multi-valued binary properties not supported.");
+        }
+    }
+
+    /**
+     * Inits the parser engine
+     *
+     * @throws javax.jcr.RepositoryException If some error happens
+     */
+    private void initParser() throws javax.jcr.RepositoryException {
+
+
+        try {
+            TransformerFactory factory = TransformerFactory.newInstance();
+            transformer = factory.newTransformer();
+            parser = new HTMLParser();
+            result = new SAXResult(new DefaultHandler());
+        } catch (TransformerConfigurationException e) {
+            throw new RepositoryException(e);
+        } catch (TransformerFactoryConfigurationError e) {
+            throw new RepositoryException(e);
+        }
+    }
+}

Propchange: incubator/jackrabbit/trunk/contrib/textfilters/src/java/org/apache/jackrabbit/core/query/HTMLTextFilter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/jackrabbit/trunk/contrib/textfilters/src/java/org/apache/jackrabbit/core/query/RTFTextFilter.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/textfilters/src/java/org/apache/jackrabbit/core/query/RTFTextFilter.java?rev=351746&view=auto
==============================================================================
--- incubator/jackrabbit/trunk/contrib/textfilters/src/java/org/apache/jackrabbit/core/query/RTFTextFilter.java
(added)
+++ incubator/jackrabbit/trunk/contrib/textfilters/src/java/org/apache/jackrabbit/core/query/RTFTextFilter.java
Fri Dec  2 07:07:45 2005
@@ -0,0 +1,88 @@
+/*
+ * Copyright 2004-2005 The Apache Software Foundation or its licensors,
+ *                     as applicable.
+ *
+ * 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.
+ */
+package org.apache.jackrabbit.core.query;
+
+import java.io.IOException;
+import java.io.StringReader;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.jcr.RepositoryException;
+import javax.swing.text.BadLocationException;
+import javax.swing.text.DefaultStyledDocument;
+import javax.swing.text.rtf.RTFEditorKit;
+
+import org.apache.jackrabbit.core.query.lucene.FieldNames;
+import org.apache.jackrabbit.core.state.PropertyState;
+import org.apache.jackrabbit.core.value.BLOBFileValue;
+import org.apache.jackrabbit.core.value.InternalValue;
+
+/**
+ * Extracts texts from RTF documents.
+ */
+public class RTFTextFilter implements TextFilter {
+
+    private RTFEditorKit rek = new RTFEditorKit();
+    private DefaultStyledDocument doc = new DefaultStyledDocument();
+
+    /**
+     * @return <code>true</code> for <code>application/rtf</code>,
+     *         <code>false</code> otherwise.
+     */
+    public boolean canFilter(String mimeType) {
+        return "application/rtf".equalsIgnoreCase(mimeType);
+    }
+
+    /**
+     * Returns a map with a single entry for field {@link FieldNames#FULLTEXT}.
+     *
+     * @param data     object containing RTF document data
+     * @param encoding text encoding is not used, since it is specified in the
+     *                 data.
+     * @return a map with a single Reader value for field {@link
+     *         FieldNames#FULLTEXT}.
+     * @throws RepositoryException if data is a multi-value property or if the
+     *                             content can't be extracted
+     */
+    public Map doFilter(PropertyState data, String encoding)
+            throws RepositoryException {
+
+        InternalValue[] values = data.getValues();
+        if (values.length > 0) {
+            try {
+                BLOBFileValue blob = (BLOBFileValue) values[0].internalValue();
+
+                doc.remove(0, doc.getLength());
+                rek.read(blob.getStream(), doc, 0);
+                String text = doc.getText(0, doc.getLength());
+
+                Map result = new HashMap();
+                result.put(FieldNames.FULLTEXT, new StringReader(text));
+                return result;
+            } catch (BadLocationException ble) {
+                throw new RepositoryException(ble);
+            } catch (IOException ioe) {
+                throw new RepositoryException(ioe);
+            } catch (IllegalStateException e) {
+                throw new RepositoryException(e);
+            }
+        } else {
+            // multi value not supported
+            throw new RepositoryException("Multi-valued binary properties not supported.");
+        }
+    }
+}

Propchange: incubator/jackrabbit/trunk/contrib/textfilters/src/java/org/apache/jackrabbit/core/query/RTFTextFilter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/jackrabbit/trunk/contrib/textfilters/src/java/org/apache/jackrabbit/core/query/XMLTextFilter.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/textfilters/src/java/org/apache/jackrabbit/core/query/XMLTextFilter.java?rev=351746&view=auto
==============================================================================
--- incubator/jackrabbit/trunk/contrib/textfilters/src/java/org/apache/jackrabbit/core/query/XMLTextFilter.java
(added)
+++ incubator/jackrabbit/trunk/contrib/textfilters/src/java/org/apache/jackrabbit/core/query/XMLTextFilter.java
Fri Dec  2 07:07:45 2005
@@ -0,0 +1,227 @@
+/*
+ * Copyright 2004-2005 The Apache Software Foundation or its licensors,
+ *                     as applicable.
+ *
+ * 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.
+ */
+package org.apache.jackrabbit.core.query;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.StringReader;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.jcr.RepositoryException;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+
+import org.apache.jackrabbit.core.query.lucene.FieldNames;
+import org.apache.jackrabbit.core.state.PropertyState;
+import org.apache.jackrabbit.core.value.BLOBFileValue;
+import org.apache.jackrabbit.core.value.InternalValue;
+import org.xml.sax.Attributes;
+import org.xml.sax.ErrorHandler;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
+import org.xml.sax.XMLReader;
+import org.xml.sax.helpers.DefaultHandler;
+
+/**
+ * Extracts texts from XML documents.
+ */
+public class XMLTextFilter implements TextFilter {
+
+    private org.apache.jackrabbit.core.query.XMLTextFilter.XMLParser parser;
+
+    /**
+     * @return <code>true</code> for <code>text/xml</code>, <code>false</code>
+     *         otherwise.
+     */
+    public boolean canFilter(String mimeType) {
+        return "text/xml".equalsIgnoreCase(mimeType);
+    }
+
+    /**
+     * Returns a map with a single entry for field {@link FieldNames#FULLTEXT}.
+     *
+     * @param data     object containing RTF document data
+     * @param encoding text encoding is not used, since it is specified in the
+     *                 data.
+     * @return a map with a single Reader value for field {@link
+     *         FieldNames#FULLTEXT}.
+     * @throws RepositoryException if data is a multi-value property or if the
+     *                             content can't be extracted
+     */
+    public Map doFilter(PropertyState data, String encoding)
+            throws RepositoryException {
+
+        if (parser == null) {
+            initParser();
+        }
+
+        InternalValue[] values = data.getValues();
+        if (values.length > 0) {
+            try {
+                try {
+                    BLOBFileValue blob = (BLOBFileValue) values[0].internalValue();
+                    parser.parse(blob.getStream());
+                    String text = parser.getContents();
+
+                    Map result = new HashMap();
+                    result.put(FieldNames.FULLTEXT, new StringReader(text));
+                    return result;
+                } catch (IOException ioe) {
+                    throw new RepositoryException(ioe);
+                }
+
+            } catch (IllegalStateException e) {
+                throw new RepositoryException(e);
+            }
+        } else {
+            // multi value not supported
+            throw new RepositoryException("Multi-valued binary properties not supported.");
+        }
+    }
+
+    /**
+     * Inits the parser engine
+     *
+     * @throws javax.jcr.RepositoryException If some error happens
+     */
+    private void initParser() throws javax.jcr.RepositoryException {
+
+        try {
+            SAXParserFactory saxParserFactory = SAXParserFactory.newInstance();
+            saxParserFactory.setValidating(false);
+            SAXParser saxParser = saxParserFactory.newSAXParser();
+            XMLReader xmlReader = saxParser.getXMLReader();
+            parser = new XMLParser(xmlReader);
+        } catch (ParserConfigurationException e) {
+            throw new javax.jcr.RepositoryException();
+        } catch (SAXException e) {
+            throw new javax.jcr.RepositoryException();
+        }
+    }
+
+    /**
+     * Private helper XML parser. It only processes text elements. Feel free to
+     * change for adding support for attributes or tags text extraction.
+     */
+    private class XMLParser extends DefaultHandler implements ErrorHandler {
+
+        private XMLReader xmlReader;
+        private StringBuffer buffer;
+
+        public XMLParser(XMLReader xmlReader) {
+
+            try {
+
+                this.xmlReader = xmlReader;
+                this.xmlReader.setContentHandler(this);
+                this.xmlReader.setErrorHandler(this);
+
+            } catch (Exception ex) {
+
+            }
+        }
+
+        public void startDocument() throws SAXException {
+
+            buffer = new StringBuffer();
+        }
+
+        public void startElement(String namespaceURI, String localName,
+                                 String rawName, Attributes atts)
+                throws SAXException {
+        }
+
+        public void characters(char[] ch,
+                               int start,
+                               int length) throws SAXException {
+
+
+            buffer.append(ch, start, length);
+        }
+
+        public void endElement(java.lang.String namespaceURI,
+                               java.lang.String localName,
+                               java.lang.String qName)
+                throws SAXException {
+        }
+
+
+        public void warning(SAXParseException spe) throws SAXException {
+
+
+        }
+
+        public void error(SAXParseException spe) throws SAXException {
+
+        }
+
+        public void fatalError(SAXParseException spe) throws SAXException {
+
+        }
+
+        public void parse(InputStream is) throws IOException {
+
+            try {
+                InputSource source = new InputSource(is);
+                xmlReader.parse(source);
+            } catch (SAXException se) {
+                // ignore errors
+            }
+        }
+
+        private String filterAndJoin(String text) {
+
+            boolean space = false;
+            StringBuffer buffer = new StringBuffer();
+            for (int i = 0; i < text.length(); i++) {
+                char c = text.charAt(i);
+
+                if ((c == '\n') || (c == ' ') || Character.isWhitespace(c)) {
+                    if (space) {
+                        continue;
+                    } else {
+                        space = true;
+                        buffer.append(' ');
+                        continue;
+                    }
+                } else {
+                    if (!Character.isLetter(c)) {
+                        if (!space) {
+                            space = true;
+                            buffer.append(' ');
+                            continue;
+                        }
+                        continue;
+                    }
+                }
+                space = false;
+                buffer.append(c);
+            }
+            return buffer.toString();
+        }
+
+        public String getContents() {
+
+            String text = filterAndJoin(buffer.toString());
+            return text;
+        }
+
+    }
+}

Propchange: incubator/jackrabbit/trunk/contrib/textfilters/src/java/org/apache/jackrabbit/core/query/XMLTextFilter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/jackrabbit/trunk/contrib/textfilters/src/test/org/apache/jackrabbit/core/query/test/HTMLTest.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/textfilters/src/test/org/apache/jackrabbit/core/query/test/HTMLTest.java?rev=351746&view=auto
==============================================================================
--- incubator/jackrabbit/trunk/contrib/textfilters/src/test/org/apache/jackrabbit/core/query/test/HTMLTest.java
(added)
+++ incubator/jackrabbit/trunk/contrib/textfilters/src/test/org/apache/jackrabbit/core/query/test/HTMLTest.java
Fri Dec  2 07:07:45 2005
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2004-2005 The Apache Software Foundation or its licensors,
+ *                     as applicable.
+ *
+ * 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.
+ */
+package org.apache.jackrabbit.core.query.test;
+
+import java.io.File;
+
+import org.apache.jackrabbit.core.query.HTMLTextFilter;
+
+
+public class HTMLTest extends AbstractTextFilterTest {
+
+	public static void main(String[] args) throws Exception {
+		HTMLTest test = new HTMLTest();
+		File file = new File(args[0]);
+		test.showResult(file, new HTMLTextFilter());
+	}
+}

Propchange: incubator/jackrabbit/trunk/contrib/textfilters/src/test/org/apache/jackrabbit/core/query/test/HTMLTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/jackrabbit/trunk/contrib/textfilters/src/test/org/apache/jackrabbit/core/query/test/RTFTest.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/textfilters/src/test/org/apache/jackrabbit/core/query/test/RTFTest.java?rev=351746&view=auto
==============================================================================
--- incubator/jackrabbit/trunk/contrib/textfilters/src/test/org/apache/jackrabbit/core/query/test/RTFTest.java
(added)
+++ incubator/jackrabbit/trunk/contrib/textfilters/src/test/org/apache/jackrabbit/core/query/test/RTFTest.java
Fri Dec  2 07:07:45 2005
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2004-2005 The Apache Software Foundation or its licensors,
+ *                     as applicable.
+ *
+ * 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.
+ */
+package org.apache.jackrabbit.core.query.test;
+
+import java.io.File;
+
+import org.apache.jackrabbit.core.query.RTFTextFilter;
+
+
+public class RTFTest extends AbstractTextFilterTest {
+
+	public static void main(String[] args) throws Exception {
+		RTFTest test = new RTFTest();
+		File file = new File(args[0]);
+		test.showResult(file, new RTFTextFilter());
+	}
+}

Propchange: incubator/jackrabbit/trunk/contrib/textfilters/src/test/org/apache/jackrabbit/core/query/test/RTFTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/jackrabbit/trunk/contrib/textfilters/src/test/org/apache/jackrabbit/core/query/test/XMLTest.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/textfilters/src/test/org/apache/jackrabbit/core/query/test/XMLTest.java?rev=351746&view=auto
==============================================================================
--- incubator/jackrabbit/trunk/contrib/textfilters/src/test/org/apache/jackrabbit/core/query/test/XMLTest.java
(added)
+++ incubator/jackrabbit/trunk/contrib/textfilters/src/test/org/apache/jackrabbit/core/query/test/XMLTest.java
Fri Dec  2 07:07:45 2005
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2004-2005 The Apache Software Foundation or its licensors,
+ *                     as applicable.
+ *
+ * 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.
+ */
+package org.apache.jackrabbit.core.query.test;
+
+import java.io.File;
+
+import org.apache.jackrabbit.core.query.XMLTextFilter;
+
+
+public class XMLTest extends AbstractTextFilterTest {
+
+	public static void main(String[] args) throws Exception {
+		XMLTest test = new XMLTest();
+		File file = new File(args[0]);
+		test.showResult(file, new XMLTextFilter());
+	}
+}

Propchange: incubator/jackrabbit/trunk/contrib/textfilters/src/test/org/apache/jackrabbit/core/query/test/XMLTest.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message