01 /*
02 * IndexField.java
03 *
04 * Copyright (c) 1995-2010, The University of Sheffield. See the file
05 * COPYRIGHT.txt in the software or at http://gate.ac.uk/gate/COPYRIGHT.txt
06 *
07 * This file is part of GATE (see http://gate.ac.uk/), and is free
08 * software, licenced under the GNU Library General Public License,
09 * Version 2, June 1991 (in the distribution as file licence.html,
10 * and also available at http://gate.ac.uk/gate/licence.html).
11 *
12 * Rosen Marinov, 19/Apr/2002
13 *
14 */
15
16 package gate.creole.ir;
17
18 import java.io.Serializable;
19
20 public class IndexField implements Serializable{
21
22 static final long serialVersionUID = 3632609241787241616L;
23
24 /** Name of field for indexing - the name of the feature key of
25 * the document should be same. */
26 private String fieldName;
27
28 /** Reader object for this field. Can be NULL. */
29 private PropertyReader propReader;
30
31 /** If set to true then the value should not be modified by the analyzer. */
32 private boolean isPreseved;
33
34 /** Constructor of the class. */
35 public IndexField(String name, PropertyReader rdr, boolean preseved) {
36 this.fieldName = name;
37 this.propReader = rdr;
38 this.isPreseved = preseved;
39 }
40
41 /** @return String name of the field.*/
42 public String getName(){
43 return fieldName;
44 }
45
46 /** @return Reader object for this field or null */
47 public PropertyReader getReader(){
48 return propReader;
49 }
50
51 /** @return boolean preservation of value */
52 public boolean isPreseved(){
53 return isPreseved;
54 }
55
56 }
|