Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 26 for ResultData (0.07 sec)

  1. fess-crawler/src/main/java/org/codelibs/fess/crawler/entity/ResultData.java

    package org.codelibs.fess.crawler.entity;
    
    import java.io.Serializable;
    import java.util.Collection;
    import java.util.LinkedHashSet;
    import java.util.Set;
    
    /**
     * @author shinsuke
     *
     */
    public class ResultData implements Serializable {
        private static final long serialVersionUID = 1L;
    
        private String transformerName;
    
        private byte[] data;
    
        private String encoding;
    
    Registered: Sun Nov 10 03:50:12 UTC 2024
    - Last Modified: Thu Feb 22 01:36:27 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  2. fess-crawler/src/main/java/org/codelibs/fess/crawler/processor/impl/DefaultResponseProcessor.java

                final UrlQueue<?> urlQueue = CrawlingParameterUtil.getUrlQueue();
                final ResultData resultData = new ResultData();
                resultData.setData(new byte[0]);
                resultData.setEncoding(Constants.UTF_8);
                resultData.setTransformerName(Constants.NO_TRANSFORMER);
                processResult(urlQueue, responseData, resultData);
            } else if (isSuccessful(responseData)) {
                if (transformer == null) {
    Registered: Sun Nov 10 03:50:12 UTC 2024
    - Last Modified: Thu Feb 22 01:47:32 UTC 2024
    - 9K bytes
    - Viewed (0)
  3. src/main/java/org/codelibs/fess/crawler/processor/FessResponseProcessor.java

            return super.createAccessResult(responseData, ingest(responseData, resultData));
        }
    
        private ResultData ingest(final ResponseData responseData, final ResultData resultData) {
            if (ingestFactory == null) {
                return resultData;
            }
            ResultData target = resultData;
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Thu Feb 22 01:53:18 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  4. fess-crawler/src/main/java/org/codelibs/fess/crawler/transformer/impl/TextTransformer.java

            } catch (final Exception e) {
                throw new CrawlingAccessException("Could not extract data.", e);
            }
    
            final ResultData resultData = new ResultData();
            resultData.setTransformerName(getName());
            try {
                resultData.setData(content.getBytes(charsetName));
            } catch (final UnsupportedEncodingException e) {
                if (logger.isInfoEnabled()) {
    Registered: Sun Nov 10 03:50:12 UTC 2024
    - Last Modified: Thu Feb 22 01:47:32 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  5. fess-crawler/src/test/java/org/codelibs/fess/crawler/transformer/impl/FileTransformerTest.java

            responseData.setCharSet("UTF-8");
            setBaseDir();
            final ResultData resultData = fileTransformer.transform(responseData);
            assertEquals("http_CLN_/www.example.com/submit_QUEST_a=1_AMP_b=2", new String(resultData.getData(), "UTF-8"));
            final File file = new File(fileTransformer.baseDir, new String(resultData.getData(), "UTF-8"));
            assertEquals("xyz", new String(FileUtil.readBytes(file)));
        }
    
    Registered: Sun Nov 10 03:50:12 UTC 2024
    - Last Modified: Thu Feb 22 01:36:27 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  6. fess-crawler/src/test/java/org/codelibs/fess/crawler/transformer/impl/XmlTransformerTest.java

            responseData.setResponseBody(ResourceUtil.getResourceAsFile("extractor/test.xml"), false);
            responseData.setCharSet(Constants.UTF_8);
            final ResultData resultData = xmlTransformer.transform(responseData);
            assertEquals(result, new String(resultData.getData(), Constants.UTF_8));
        }
    
        public void test_transformNs() throws Exception {
            final String result = "<?xml version=\"1.0\"?>\n"//
    Registered: Sun Nov 10 03:50:12 UTC 2024
    - Last Modified: Thu Feb 22 01:36:27 UTC 2024
    - 13.5K bytes
    - Viewed (0)
  7. fess-crawler/src/test/java/org/codelibs/fess/crawler/transformer/impl/HtmlTransformerTest.java

            responseData.setCharSet("ISO-8859-1");
            responseData.setMimeType("text/html");
            final ResultData resultData = htmlTransformer.transform(responseData);
            assertEquals(content, new String(resultData.getData()));
            assertEquals(1, resultData.getChildUrlSet().size());
            assertEquals("http://hoge/test2.html", resultData.getChildUrlSet().iterator().next().getUrl());
        }
    
        public void test_transform_urllink() {
    Registered: Sun Nov 10 03:50:12 UTC 2024
    - Last Modified: Thu Feb 22 01:36:27 UTC 2024
    - 13.8K bytes
    - Viewed (0)
  8. fess-crawler/src/main/java/org/codelibs/fess/crawler/transformer/impl/BinaryTransformer.java

         * .AccessResultData)
         */
        @Override
        public ResultData transform(final ResponseData responseData) {
            if (responseData == null || !responseData.hasResponseBody()) {
                throw new CrawlingAccessException("No response body.");
            }
    
            final ResultData resultData = new ResultData();
            resultData.setTransformerName(getName());
    
    Registered: Sun Nov 10 03:50:12 UTC 2024
    - Last Modified: Thu Feb 22 01:36:27 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  9. fess-crawler/src/test/java/org/codelibs/fess/crawler/transformer/impl/TextTransformerTest.java

            responseData.setCharSet(Constants.UTF_8);
            responseData.setResponseBody(data);
            responseData.setMimeType("text/plain");
            final ResultData resultData = textTransformer.transform(responseData);
            assertEquals("xyz", new String(resultData.getData(), resultData.getEncoding()));
        }
    
        public void test_transform_html() throws Exception {
    Registered: Sun Nov 10 03:50:12 UTC 2024
    - Last Modified: Thu Feb 22 01:36:27 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  10. fess-crawler/src/main/java/org/codelibs/fess/crawler/transformer/impl/HtmlTransformer.java

        @Override
        public ResultData transform(final ResponseData responseData) {
            if (responseData == null || !responseData.hasResponseBody()) {
                throw new CrawlingAccessException("No response body.");
            }
    
            // encoding
            updateCharset(responseData);
    
            final ResultData resultData = new ResultData();
            resultData.setTransformerName(getName());
    
            try {
    Registered: Sun Nov 10 03:50:12 UTC 2024
    - Last Modified: Thu Oct 24 12:16:00 UTC 2024
    - 19.4K bytes
    - Viewed (0)
Back to top