Revision: 17644
http://sourceforge.net/p/gate/code/17644
Author: markagreenwood
Date: 2014-03-12 17:25:43 +0000 (Wed, 12 Mar 2014)
Log Message:
-----------
some generics stuff
Modified Paths:
--------------
gate/trunk/src/main/gate/creole/ir/DefaultIndexDefinition.java
gate/trunk/src/main/gate/creole/ir/IndexDefinition.java
gate/trunk/src/main/gate/creole/ir/IndexException.java
gate/trunk/src/main/gate/creole/ir/IndexManager.java
gate/trunk/src/main/gate/creole/ir/Search.java
gate/trunk/src/main/gate/creole/ir/SearchException.java
gate/trunk/src/main/gate/creole/ir/SearchPR.java
Modified: gate/trunk/src/main/gate/creole/ir/DefaultIndexDefinition.java
===================================================================
--- gate/trunk/src/main/gate/creole/ir/DefaultIndexDefinition.java
2014-03-12 17:08:05 UTC (rev 17643)
+++ gate/trunk/src/main/gate/creole/ir/DefaultIndexDefinition.java
2014-03-12 17:25:43 UTC (rev 17644)
@@ -15,19 +15,21 @@
package gate.creole.ir;
-import java.util.*;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Vector;
public class DefaultIndexDefinition implements IndexDefinition{
/** List of IndexField - objects for indexing */
- private List fields;
+ private List<IndexField> fields;
/** Location (path) of the index store directory */
private String location;
/* Niraj */
// Annic Specific Changes
- private ArrayList featuresToExclude;
+ private List featuresToExclude;
private String annotationSet;
private String baseTokenAnnotationType;
/* End */
@@ -51,11 +53,11 @@
/* Niraj */
// Annic specific changes
- public void setFeaturesToExclude(ArrayList featuresToExclude) {
+ public void setFeaturesToExclude(List featuresToExclude) {
this.featuresToExclude = featuresToExclude;
}
- public ArrayList getFeaturesToExclude() {
+ public List getFeaturesToExclude() {
return featuresToExclude;
}
@@ -91,14 +93,14 @@
/** @return Iterator of IndexFields, fileds for indexing. */
@Override
- public Iterator getIndexFields(){
+ public Iterator<IndexField> getIndexFields(){
return fields.iterator();
}
/** Add new IndexField object to fields list.*/
public void addIndexField(IndexField fld){
if (fields==null){
- fields = new Vector();
+ fields = new Vector<IndexField>();
}
fields.add(fld);
}
Modified: gate/trunk/src/main/gate/creole/ir/IndexDefinition.java
===================================================================
--- gate/trunk/src/main/gate/creole/ir/IndexDefinition.java 2014-03-12
17:08:05 UTC (rev 17643)
+++ gate/trunk/src/main/gate/creole/ir/IndexDefinition.java 2014-03-12
17:25:43 UTC (rev 17644)
@@ -26,7 +26,7 @@
public String getIndexLocation();
/** @return Iterator of IndexFields, fileds for indexing. */
- public Iterator getIndexFields();
+ public Iterator<IndexField> getIndexFields();
// /** @return int index type*/
// public int getIndexType();
Modified: gate/trunk/src/main/gate/creole/ir/IndexException.java
===================================================================
--- gate/trunk/src/main/gate/creole/ir/IndexException.java 2014-03-12
17:08:05 UTC (rev 17643)
+++ gate/trunk/src/main/gate/creole/ir/IndexException.java 2014-03-12
17:25:43 UTC (rev 17644)
@@ -17,9 +17,10 @@
public class IndexException extends Exception{
+ private static final long serialVersionUID = -4883967531032963135L;
+
/** Consructor of the class.*/
public IndexException(String msg){
super(msg);
}
-
}
\ No newline at end of file
Modified: gate/trunk/src/main/gate/creole/ir/IndexManager.java
===================================================================
--- gate/trunk/src/main/gate/creole/ir/IndexManager.java 2014-03-12
17:08:05 UTC (rev 17643)
+++ gate/trunk/src/main/gate/creole/ir/IndexManager.java 2014-03-12
17:25:43 UTC (rev 17644)
@@ -15,10 +15,11 @@
package gate.creole.ir;
+import gate.Corpus;
+import gate.Document;
+
import java.util.List;
-import gate.Corpus;
-
public interface IndexManager{
/**
@@ -58,7 +59,7 @@
/** Reindexing changed documents, removing removed documents and
* add to the index new corpus documents. */
- public void sync(List added, List removed, List changed) throws
IndexException;
+ public void sync(List<Document> added, List<String> removed, List<Document>
changed) throws IndexException;
}
\ No newline at end of file
Modified: gate/trunk/src/main/gate/creole/ir/Search.java
===================================================================
--- gate/trunk/src/main/gate/creole/ir/Search.java 2014-03-12 17:08:05 UTC
(rev 17643)
+++ gate/trunk/src/main/gate/creole/ir/Search.java 2014-03-12 17:25:43 UTC
(rev 17644)
@@ -32,13 +32,13 @@
throws IndexException, SearchException;
/** Search in corpus with this query.
- * In each QueryResult will be added values of theise fields.
+ * In each QueryResult will be added values of these fields.
* Result length is unlimited. */
public QueryResultList search(String query, List fieldNames)
throws IndexException, SearchException;
/** Search in corpus with this query.
- * In each QueryResult will be added values of theise fields.
+ * In each QueryResult will be added values of these fields.
* Result length is limited. */
public QueryResultList search(String query, int limit, List fieldNames)
throws IndexException, SearchException;
Modified: gate/trunk/src/main/gate/creole/ir/SearchException.java
===================================================================
--- gate/trunk/src/main/gate/creole/ir/SearchException.java 2014-03-12
17:08:05 UTC (rev 17643)
+++ gate/trunk/src/main/gate/creole/ir/SearchException.java 2014-03-12
17:25:43 UTC (rev 17644)
@@ -17,6 +17,8 @@
public class SearchException extends Exception{
+ private static final long serialVersionUID = 238378794456612672L;
+
public SearchException(String msg){
super(msg);
}
Modified: gate/trunk/src/main/gate/creole/ir/SearchPR.java
===================================================================
--- gate/trunk/src/main/gate/creole/ir/SearchPR.java 2014-03-12 17:08:05 UTC
(rev 17643)
+++ gate/trunk/src/main/gate/creole/ir/SearchPR.java 2014-03-12 17:25:43 UTC
(rev 17644)
@@ -29,6 +29,8 @@
public class SearchPR extends AbstractProcessingResource
implements ProcessingResource{
+ private static final long serialVersionUID = 1316224997021873795L;
+
private IndexedCorpus corpus = null;
private String query = null;
private String searcherClassName = null;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs