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.util.Date;
21 import java.util.Properties;
23 import org.apache.lucene.document.DateTools;
25 /** Output of parsing (e.g. HTML parsing) of an input document. */
26 public class DocData {
33 private Properties props;
44 public String getBody() {
49 * @return the date. If the ctor with Date was called, then the String
50 * returned is the output of
51 * {@link DateTools#dateToString(Date, org.apache.lucene.document.DateTools.Resolution)}
52 * . Otherwise it's the String passed to the other ctor.
54 public String getDate() {
58 public String getName() {
66 public Properties getProps() {
70 public String getTitle() {
74 public void setBody(String body) {
78 public void setDate(Date date) {
80 setDate(DateTools.dateToString(date, DateTools.Resolution.SECOND));
86 public void setDate(String date) {
90 public void setName(String name) {
94 public void setID(int id) {
98 public void setProps(Properties props) {
102 public void setTitle(String title) {