[gate-cvs] SF.net SVN: gate:[17636] gate/trunk/src/test/gate/creole/TestPR.java
Revision: 17636 http://sourceforge.net/p/gate/code/17636 Author: markagreenwood Date: 2014-03-12 07:23:51 + (Wed, 12 Mar 2014) Log Message: --- it helps if I use the right annotation property otherwise the randomness of the tests remains Modified Paths: -- gate/trunk/src/test/gate/creole/TestPR.java Modified: gate/trunk/src/test/gate/creole/TestPR.java === --- gate/trunk/src/test/gate/creole/TestPR.java 2014-03-12 02:21:01 UTC (rev 17635) +++ gate/trunk/src/test/gate/creole/TestPR.java 2014-03-12 07:23:51 UTC (rev 17636) @@ -50,7 +50,7 @@ import org.junit.runners.MethodSorters; /** Test the PRs on three documents */ -@FixMethodOrder(MethodSorters.JVM) +@FixMethodOrder(MethodSorters.NAME_ASCENDING) public class TestPR extends TestCase { /** Debug flag */ 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 GATE-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gate-cvs
[gate-cvs] SF.net SVN: gate:[17637] gate/trunk/src/main/gate/email/ EmailDocumentHandler.java
Revision: 17637 http://sourceforge.net/p/gate/code/17637 Author: markagreenwood Date: 2014-03-12 09:20:08 + (Wed, 12 Mar 2014) Log Message: --- another generics change Modified Paths: -- gate/trunk/src/main/gate/email/EmailDocumentHandler.java Modified: gate/trunk/src/main/gate/email/EmailDocumentHandler.java === --- gate/trunk/src/main/gate/email/EmailDocumentHandler.java2014-03-12 07:23:51 UTC (rev 17636) +++ gate/trunk/src/main/gate/email/EmailDocumentHandler.java2014-03-12 09:20:08 UTC (rev 17637) @@ -56,7 +56,7 @@ */ public EmailDocumentHandler( gate.Document aGateDocument, Map aMarkupElementsMap, - Map anElement2StringMap + Map anElement2StringMap ) { gateDocument = aGateDocument; @@ -642,7 +642,7 @@ private Map markupElementsMap = null; // this map marks the elements after we want to insert some strings - private Map element2StringMap = null; + private Map element2StringMap = null; // listeners for status report protected List myStatusListeners = new LinkedList(); 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 GATE-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gate-cvs
[gate-cvs] SF.net SVN: gate:[17638] gate/trunk/src/main/gate
Revision: 17638 http://sourceforge.net/p/gate/code/17638 Author: markagreenwood Date: 2014-03-12 09:36:47 + (Wed, 12 Mar 2014) Log Message: --- finally figured out the type of the other map -- it was hidden in plain sight of course :) Modified Paths: -- gate/trunk/src/main/gate/DocumentFormat.java gate/trunk/src/main/gate/corpora/EmailDocumentFormat.java gate/trunk/src/main/gate/email/EmailDocumentHandler.java gate/trunk/src/main/gate/html/HtmlDocumentHandler.java gate/trunk/src/main/gate/xml/XmlDocumentHandler.java Modified: gate/trunk/src/main/gate/DocumentFormat.java === --- gate/trunk/src/main/gate/DocumentFormat.java2014-03-12 09:20:08 UTC (rev 17637) +++ gate/trunk/src/main/gate/DocumentFormat.java2014-03-12 09:36:47 UTC (rev 17638) @@ -85,7 +85,7 @@ * for annotation types. If it is non-null, only those elements specified * here will be converted. */ - protected Map markupElementsMap = null; + protected Map markupElementsMap = null; /** This map is used inside uppackMarkup() method... * When an element from the map is encounted, The corresponding string @@ -441,6 +441,7 @@ * Return the fileSuffix or null if the url doesn't have a file suffix * If the url is null then the file suffix will be null also */ + @SuppressWarnings("unused") private static String getFileSuffix(URL url){ String fileName = null; String fileSuffix = null; @@ -558,13 +559,13 @@ public FeatureMap getFeatures() { return features; } /** Get the markup elements map */ - public Map getMarkupElementsMap() { return markupElementsMap; } + public Map getMarkupElementsMap() { return markupElementsMap; } /** Get the element 2 string map */ public Map getElement2StringMap() { return element2StringMap; } /** Set the markup elements map */ - public void setMarkupElementsMap(Map markupElementsMap) { + public void setMarkupElementsMap(Map markupElementsMap) { this.markupElementsMap = markupElementsMap; } Modified: gate/trunk/src/main/gate/corpora/EmailDocumentFormat.java === --- gate/trunk/src/main/gate/corpora/EmailDocumentFormat.java 2014-03-12 09:20:08 UTC (rev 17637) +++ gate/trunk/src/main/gate/corpora/EmailDocumentFormat.java 2014-03-12 09:36:47 UTC (rev 17638) @@ -16,10 +16,10 @@ package gate.corpora; -import java.io.IOException; -import java.util.Iterator; - -import gate.*; +import gate.Annotation; +import gate.AnnotationSet; +import gate.GateConstants; +import gate.Resource; import gate.creole.ResourceInstantiationException; import gate.creole.metadata.AutoInstance; import gate.creole.metadata.CreoleResource; @@ -28,7 +28,8 @@ import gate.util.DocumentFormatException; import gate.util.InvalidOffsetException; -//import org.w3c.www.mime.*; +import java.io.IOException; +import java.util.Iterator; /** The format of Documents. Subclasses of DocumentFormat know about * particular MIME types and how to unpack the information in any Modified: gate/trunk/src/main/gate/email/EmailDocumentHandler.java === --- gate/trunk/src/main/gate/email/EmailDocumentHandler.java2014-03-12 09:20:08 UTC (rev 17637) +++ gate/trunk/src/main/gate/email/EmailDocumentHandler.java2014-03-12 09:36:47 UTC (rev 17638) @@ -55,7 +55,7 @@ * Constructor initialises some private fields */ public EmailDocumentHandler( gate.Document aGateDocument, - Map aMarkupElementsMap, + Map aMarkupElementsMap, Map anElement2StringMap ) { @@ -639,9 +639,11 @@ private gate.AnnotationSet basicAS = null; // this map marks the elements that we don't want to create annotations - private Map markupElementsMap = null; + @SuppressWarnings("unused") + private Map markupElementsMap = null; // this map marks the elements after we want to insert some strings + @SuppressWarnings("unused") private Map element2StringMap = null; // listeners for status report Modified: gate/trunk/src/main/gate/html/HtmlDocumentHandler.java === --- gate/trunk/src/main/gate/html/HtmlDocumentHandler.java 2014-03-12 09:20:08 UTC (rev 17637) +++ gate/trunk/src/main/gate/html/HtmlDocumentHandler.java 2014-03-12 09:36:47 UTC (rev 17638) @@ -55,7 +55,7 @@ * @param aMarkupElementsMap The map containing the elements that will * transform into annotations */ - public HtmlDocumentHandler(gate.Document aDocument, Map aMarkupElementsMap) { + public HtmlDocumentHandler(gate.Document aDocument, Map aMarkupElementsMap) { this(aDocument,aMarkupElementsMap,null); } @@ -67,7 +67,7
[gate-cvs] SF.net SVN: gate:[17639] gate/trunk/src/main/gate/util/RBTreeMap.java
Revision: 17639 http://sourceforge.net/p/gate/code/17639 Author: markagreenwood Date: 2014-03-12 10:48:13 + (Wed, 12 Mar 2014) Log Message: --- the RBTreeMap is now fully genericised (is that even a word) Modified Paths: -- gate/trunk/src/main/gate/util/RBTreeMap.java Modified: gate/trunk/src/main/gate/util/RBTreeMap.java === --- gate/trunk/src/main/gate/util/RBTreeMap.java2014-03-12 09:36:47 UTC (rev 17638) +++ gate/trunk/src/main/gate/util/RBTreeMap.java2014-03-12 10:48:13 UTC (rev 17639) @@ -278,10 +278,9 @@ * @return the first (lowest) key currently in this sorted map. * @throwsNoSuchElementException Map is empty. */ - @SuppressWarnings("unchecked") @Override public K firstKey() { - return (K)key(firstEntry()); + return key(firstEntry()); } /** @@ -290,10 +289,9 @@ * @return the last (highest) key currently in this sorted map. * @throwsNoSuchElementException Map is empty. */ - @SuppressWarnings("unchecked") @Override public K lastKey() { - return (K)key(lastEntry()); + return key(lastEntry()); } /** @@ -425,7 +423,7 @@ * Returns the key corresonding to the specified Entry. Throw * NoSuchElementException if the Entry is null. */ - private static Object key(Entry e) { + private static X key(Entry e) { if (e==null) throw new NoSuchElementException(); return e.key; @@ -748,7 +746,6 @@ * @throws IllegalArgumentException if fromKey is greater than *toKey. */ - @SuppressWarnings("unchecked") @Override public SortedMap subMap(Object fromKey, Object toKey) { return new SubMap(fromKey, toKey); @@ -784,7 +781,6 @@ *this map uses natural order, or its comparator does * not *tolerate null keys. */ - @SuppressWarnings("unchecked") @Override public SortedMap headMap(K toKey) { return new SubMap(toKey, true); @@ -819,14 +815,13 @@ *map uses natural ordering, or its comparator does *not tolerate null keys. */ - @SuppressWarnings("unchecked") @Override public SortedMap tailMap(K fromKey) { return new SubMap(fromKey, false); } - private class SubMap extends AbstractMap - implements SortedMap, java.io.Serializable { + private class SubMap extends AbstractMap + implements SortedMap, java.io.Serializable { // fromKey is significant only if fromStart is false. Similarly, // toKey is significant only if toStart is false. @@ -868,50 +863,49 @@ } @Override -public Object get(Object key) { +public V get(Object key) { if (!inRange(key)) return null; return RBTreeMap.this.get(key); } -@SuppressWarnings("unchecked") @Override -public Object put(Object key, Object value) { +public V put(K key, V value) { if (!inRange(key)) throw new IllegalArgumentException("key out of range"); - return RBTreeMap.this.put((K)key, (V)value); + return RBTreeMap.this.put(key, value); } @Override -public Comparator comparator() { +public Comparator comparator() { return comparator; } @Override -public Object firstKey() { +public K firstKey() { return key(fromStart ? firstEntry() : getCeilEntry(fromKey)); } @Override -public Object lastKey() { +public K lastKey() { return key(toEnd ? lastEntry() : getPrecedingEntry(toKey)); } -private transient Set entrySet = new EntrySetView(); +private transient Set> entrySet = new EntrySetView(); @Override -public Set entrySet() { +public Set> entrySet() { return entrySet; } -private class EntrySetView extends AbstractSet { +private class EntrySetView extends AbstractSet> { private transient int size = -1, sizeModCount; @Override public int size() { if (size == -1 || sizeModCount != RBTreeMap.this.modCount) { size = 0; sizeModCount = RBTreeMap.this.modCount; - java.util.Iterator i = iterator(); + java.util.Iterator> i = iterator(); while (i.hasNext()) { size++; i.next(); @@ -930,11 +924,12 @@ if (!(o instanceof Map.Entry)) return false; -Map.Entry entry = (Map.Entry)o; +@SuppressWarnings("unchecked") +Map.Entry entry = (Map.Entry)o; Object key = entry.getKey(); if (!inRange(key)) return false; -RBTreeMap.Entry node = getEntry(key); +RBTreeMap.Entry node = getEntry(key); return node != null && valEquals(node.getValue(), entry.getValue()); } // contains @@ -943,11 +938,13 @@ public boolean remove(Object o) { if (!(o instanceof
[gate-cvs] SF.net SVN: gate:[17640] gate/trunk/src/main/gate
Revision: 17640 http://sourceforge.net/p/gate/code/17640 Author: markagreenwood Date: 2014-03-12 14:13:54 + (Wed, 12 Mar 2014) Log Message: --- a few more bits of cleanup Modified Paths: -- gate/trunk/src/main/gate/creole/morph/Interpret.java gate/trunk/src/main/gate/creole/morph/ParsingFunctions.java gate/trunk/src/main/gate/creole/morph/PatternParser.java gate/trunk/src/main/gate/creole/morph/StringSet.java gate/trunk/src/main/gate/gui/ontology/OntologyEditor.java gate/trunk/src/main/gate/gui/ontology/PropertyDetailsTableModel.java gate/trunk/src/main/gate/gui/ontology/RestrictionAction.java gate/trunk/src/main/gate/gui/ontology/SearchAction.java gate/trunk/src/main/gate/gui/ontology/Utils.java gate/trunk/src/main/gate/util/HtmlLinksExtractor.java Modified: gate/trunk/src/main/gate/creole/morph/Interpret.java === --- gate/trunk/src/main/gate/creole/morph/Interpret.java2014-03-12 10:48:13 UTC (rev 17639) +++ gate/trunk/src/main/gate/creole/morph/Interpret.java2014-03-12 14:13:54 UTC (rev 17640) @@ -60,7 +60,7 @@ */ protected FSMState initialState; - protected Set lastStates; + //protected Set lastStates; /** * It starts the actual program @@ -77,12 +77,12 @@ readProgram(); initialState = new FSMState(-1); - lastStates = new HashSet(); + //lastStates = new HashSet(); interpretProgram(); variables = null; file = null; - lastStates = null; + //lastStates = null; } /** @@ -548,11 +548,12 @@ //drawFSM(); } - private Set intersect(Set a, Set b) { + @SuppressWarnings("unused") + private Set intersect(Set a, Set b) { Set result = new HashSet(); - Iterator iter = a.iterator(); + Iterator iter = a.iterator(); while (iter.hasNext()) { - FSMState st = (FSMState) iter.next(); + FSMState st = iter.next(); if (b.contains(st)) { result.add(st); } @@ -560,7 +561,8 @@ return result; } - private void drawFSM() { + @SuppressWarnings("unused") + private void drawFSM() { // we start with initialState System.out.println("Initial:"); String space = ""; @@ -644,11 +646,11 @@ // now parameters have been found, so check them with the available // methods // in the morph function - Outer: for (int i = 0; i < methods.length; i++) { + for (int i = 0; i < methods.length; i++) { if (methods[i].getName().equals(methodName)) { // yes method has found now check for the parameters // compatibility - Class[] methodParams = methods[i].getParameterTypes(); + Class[] methodParams = methods[i].getParameterTypes(); // first check for the number of parameters if (methods[i].getName().equals("null_stem")) { return true; Modified: gate/trunk/src/main/gate/creole/morph/ParsingFunctions.java === --- gate/trunk/src/main/gate/creole/morph/ParsingFunctions.java 2014-03-12 10:48:13 UTC (rev 17639) +++ gate/trunk/src/main/gate/creole/morph/ParsingFunctions.java 2014-03-12 14:13:54 UTC (rev 17640) @@ -413,7 +413,8 @@ } - private static FSMState next(char ch, Set states) { + @SuppressWarnings("unused") + private static FSMState next(char ch, Set states) { Iterator iter = states.iterator(); while(iter.hasNext()) { FSMState state = iter.next(); Modified: gate/trunk/src/main/gate/creole/morph/PatternParser.java === --- gate/trunk/src/main/gate/creole/morph/PatternParser.java2014-03-12 10:48:13 UTC (rev 17639) +++ gate/trunk/src/main/gate/creole/morph/PatternParser.java2014-03-12 14:13:54 UTC (rev 17640) @@ -45,7 +45,7 @@ String[] ruleParts = line.split("==>"); // now check if the method which has been called in this rule actually // available in the MorphFunction Class - String methodCalled = ruleParts[1].trim(); + //String methodCalled = ruleParts[1].trim(); // so RHS part is Ok // now we need to check if LHS
[gate-cvs] SF.net SVN: gate:[17641] gate/trunk/src/main/gate/persist/SerialDataStore. java
Revision: 17641 http://sourceforge.net/p/gate/code/17641 Author: markagreenwood Date: 2014-03-12 15:58:21 + (Wed, 12 Mar 2014) Log Message: --- call toString instead of casting to String as there is no guarantee that the persistance ID is a String given that the interface defines the ID as an Object -- maybe we should change the interface to String instead but this is a safe first step Modified Paths: -- gate/trunk/src/main/gate/persist/SerialDataStore.java Modified: gate/trunk/src/main/gate/persist/SerialDataStore.java === --- gate/trunk/src/main/gate/persist/SerialDataStore.java 2014-03-12 14:13:54 UTC (rev 17640) +++ gate/trunk/src/main/gate/persist/SerialDataStore.java 2014-03-12 15:58:21 UTC (rev 17641) @@ -499,7 +499,7 @@ } // create a File to representing the resource storage file -File resourceFile = new File(resourceTypeDirectory, (String)lrPersistenceId); +File resourceFile = new File(resourceTypeDirectory, lrPersistenceId.toString()); if(! resourceFile.exists() || ! resourceFile.isFile()) throw new PersistenceException("Can't find file " + resourceFile); @@ -581,11 +581,11 @@ /** Get the name of an LR from its ID. */ @Override public String getLrName(Object lrId) { -int secondSeparator = ((String) lrId).lastIndexOf("___"); -lrId = ((String) lrId).substring(0, secondSeparator); -int firstSeparator = ((String) lrId).lastIndexOf("___"); - -return ((String) lrId).substring(0, firstSeparator); +String sLRid = lrId.toString(); +int secondSeparator = sLRid.lastIndexOf("___"); +lrId = sLRid.substring(0, secondSeparator); +int firstSeparator = sLRid.lastIndexOf("___"); +return sLRid.substring(0, firstSeparator); } // getLrName /** Set method for the autosaving behaviour of the data store. 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 GATE-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gate-cvs
[gate-cvs] SF.net SVN: gate:[17642] gate/trunk/src/main/gate/persist/SerialDataStore. java
Revision: 17642 http://sourceforge.net/p/gate/code/17642 Author: markagreenwood Date: 2014-03-12 16:30:23 + (Wed, 12 Mar 2014) Log Message: --- oops, it helps if you hit save before checking in Modified Paths: -- gate/trunk/src/main/gate/persist/SerialDataStore.java Modified: gate/trunk/src/main/gate/persist/SerialDataStore.java === --- gate/trunk/src/main/gate/persist/SerialDataStore.java 2014-03-12 15:58:21 UTC (rev 17641) +++ gate/trunk/src/main/gate/persist/SerialDataStore.java 2014-03-12 16:30:23 UTC (rev 17642) @@ -583,7 +583,7 @@ public String getLrName(Object lrId) { String sLRid = lrId.toString(); int secondSeparator = sLRid.lastIndexOf("___"); -lrId = sLRid.substring(0, secondSeparator); +sLRid = sLRid.substring(0, secondSeparator); int firstSeparator = sLRid.lastIndexOf("___"); return sLRid.substring(0, firstSeparator); } // getLrName 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 GATE-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gate-cvs
[gate-cvs] SF.net SVN: gate:[17643] gate/trunk/src/main/gate/jape/parser
Revision: 17643 http://sourceforge.net/p/gate/code/17643 Author: markagreenwood Date: 2014-03-12 17:08:05 + (Wed, 12 Mar 2014) Log Message: --- generics in the rest of the jape parser Modified Paths: -- gate/trunk/src/main/gate/jape/parser/ParseCpsl.java gate/trunk/src/main/gate/jape/parser/ParseCpsl.jj Modified: gate/trunk/src/main/gate/jape/parser/ParseCpsl.java === --- gate/trunk/src/main/gate/jape/parser/ParseCpsl.java 2014-03-12 16:30:23 UTC (rev 17642) +++ gate/trunk/src/main/gate/jape/parser/ParseCpsl.java 2014-03-12 17:08:05 UTC (rev 17643) @@ -450,6 +450,9 @@ "Read error " + mue.toString()));} } +// sptURL can never be null at this point because the only way that could +// happen would be if an exception occurred above, but that would trigger +// the ParserException above if(sptURL == null){ {if (true) throw(new ParseException(errorMsgPrefix(phaseNameTok)+ "Resource not found: base = " + baseURL.toString() + @@ -471,7 +474,7 @@ // adding the resultant spt to m if(parser != null) { -List phases = parser.MultiPhaseTransducer().getPhases(); +List phases = parser.MultiPhaseTransducer().getPhases(); //s = parser.SinglePhaseTransducer(); //if(s != null) @@ -480,8 +483,8 @@ if(phases != null) { for(int i=0; i < phases.size(); i++) { m.addPhase( - ((Transducer)phases.get(i)).getName(), - (Transducer)phases.get(i) + phases.get(i).getName(), + phases.get(i) ); } } @@ -518,7 +521,7 @@ Token inputTok = null; SinglePhaseTransducer t = null; Rule newRule = null; - bindingNameSet = new HashSet(); + bindingNameSet = new HashSet(); Token optionNameTok = null; Token optionValueTok = null; jj_consume_token(phase); @@ -1119,7 +1122,6 @@ Token metaPropertyTok = null; AnnotationAccessor accessor = null; Token opTok = null; - Object attrValObj = null; Pair attrValPair = null; boolean negate = false; Constraint c = null; @@ -1218,7 +1220,6 @@ // attribute values: strings, identifers (=strings), integers, floats, // booleans final public Pair AttrVal() throws ParseException {Token attrValTok = null; - String attrValString = null; Pair val = new Pair(); switch (jj_nt.kind) { case integer: @@ -1849,18 +1850,6 @@ finally { jj_save(1, xla); } } - private boolean jj_3R_27() - { -if (jj_scan_token(pling)) return true; -return false; - } - - private boolean jj_3R_26() - { -if (jj_3R_15()) return true; -return false; - } - private boolean jj_3R_25() { Token xsp; @@ -1900,6 +1889,12 @@ return false; } + private boolean jj_3R_18() + { +if (jj_3R_20()) return true; +return false; + } + private boolean jj_3R_16() { if (jj_scan_token(colon)) return true; @@ -1908,15 +1903,16 @@ return false; } - private boolean jj_3R_18() + private boolean jj_3R_17() { -if (jj_3R_20()) return true; +if (jj_scan_token(ident)) return true; return false; } - private boolean jj_3R_17() + private boolean jj_3R_22() { -if (jj_scan_token(ident)) return true; +if (jj_scan_token(leftBrace)) return true; +if (jj_3R_25()) return true; return false; } @@ -1926,13 +1922,6 @@ return false; } - private boolean jj_3R_22() - { -if (jj_scan_token(leftBrace)) return true; -if (jj_3R_25()) return true; -return false; - } - private boolean jj_3R_15() { Token xsp; @@ -1964,6 +1953,18 @@ return false; } + private boolean jj_3R_27() + { +if (jj_scan_token(pling)) return true; +return false; + } + + private boolean jj_3R_26() + { +if (jj_3R_15()) return true; +return false; + } + /** Generated Token Manager. */ public ParseCpslTokenManager token_source; SimpleCharStream jj_input_stream; Modified: gate/trunk/src/main/gate/jape/parser/ParseCpsl.jj === --- gate/trunk/src/main/gate/jape/parser/ParseCpsl.jj 2014-03-12 16:30:23 UTC (rev 17642) +++ gate/trunk/src/main/gate/jape/parser/ParseCpsl.jj 2014-03-12 17:08:05 UTC (rev 17643) @@ -620,6 +620,9 @@ "Read error " + mue.toString())); } +// sptURL can never be null at this point because the only way that could +// happen would be if an exception occurred above, but that would trigger +// the ParserException above if(sptURL == null){ throw(new ParseException(errorMsgPrefix(phaseNameTok)+ "Resource not found: b
[gate-cvs] SF.net SVN: gate:[17644] gate/trunk/src/main/gate/creole/ir
Revision: 17644 http://sourceforge.net/p/gate/code/17644 Author: markagreenwood Date: 2014-03-12 17:25:43 + (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 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 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(); } 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 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.java2014-03-12 17:08:05 UTC (rev 17643) +++ gate/trunk/src/main/gate/creole/ir/IndexManager.java2014-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 added, List removed, List 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 Quer
[gate-cvs] SF.net SVN: gate:[17645] gate/trunk/build
Revision: 17645 http://sourceforge.net/p/gate/code/17645 Author: gate-project Date: 2014-03-13 02:22:09 + (Thu, 13 Mar 2014) Log Message: --- Build number update (build 4766) Modified Paths: -- gate/trunk/build/build.properties gate/trunk/build/build.txt Modified: gate/trunk/build/build.properties === --- gate/trunk/build/build.properties 2014-03-12 17:25:43 UTC (rev 17644) +++ gate/trunk/build/build.properties 2014-03-13 02:22:09 UTC (rev 17645) @@ -1,4 +1,4 @@ #Build Number for ANT. Do not edit! -#Wed Mar 12 02:10:22 GMT 2014 +#Thu Mar 13 02:11:10 GMT 2014 cvs.version=$Id\: build.properties 7542 2006-07-17 14\:26\:51Z ian_roberts $ -build.number=4766 +build.number=4767 Modified: gate/trunk/build/build.txt === --- gate/trunk/build/build.txt 2014-03-12 17:25:43 UTC (rev 17644) +++ gate/trunk/build/build.txt 2014-03-13 02:22:09 UTC (rev 17645) @@ -1 +1 @@ -4765 \ No newline at end of file +4766 \ No newline at end of file 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 GATE-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gate-cvs