1 package org.apache.lucene.benchmark.byTask.feeds;
4 * Licensed to the Apache Software Foundation (ASF) under one or more
5 * contributor license agreements. See the NOTICE file distributed with
6 * this work for additional information regarding copyright ownership.
7 * The ASF licenses this file to You under the Apache License, Version 2.0
8 * (the "License"); you may not use this file except in compliance with
9 * the License. You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
20 import java.io.IOException;
21 import java.io.Reader;
22 import java.text.DateFormat;
23 import java.util.Date;
26 * HTML Parsing Interface for test purposes
28 public interface HTMLParser {
31 * Parse the input Reader and return DocData.
32 * The provided name,title,date are used for the result, unless when they're null,
33 * in which case an attempt is made to set them from the parsed data.
34 * @param docData result reused
35 * @param name name of the result doc data.
36 * @param date date of the result doc data. If null, attempt to set by parsed data.
37 * @param title title of the result doc data. If null, attempt to set by parsed data.
38 * @param reader reader of html text to parse.
39 * @param dateFormat date formatter to use for extracting the date.
40 * @return Parsed doc data.
42 * @throws InterruptedException
44 public DocData parse(DocData docData, String name, Date date, String title, Reader reader, DateFormat dateFormat) throws IOException, InterruptedException;