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