Revision: 14922
http://gate.svn.sourceforge.net/gate/?rev=14922&view=rev
Author: valyt
Date: 2012-01-07 17:17:56 +0000 (Sat, 07 Jan 2012)
Log Message:
-----------
Dear Mr. Jenkins...
Modified Paths:
--------------
gate/trunk/src/gate/creole/CreoleAnnotationHandler.java
gate/trunk/src/gate/creole/TestCreoleAnnotationHandler.java
Modified: gate/trunk/src/gate/creole/CreoleAnnotationHandler.java
===================================================================
--- gate/trunk/src/gate/creole/CreoleAnnotationHandler.java 2012-01-07
02:28:42 UTC (rev 14921)
+++ gate/trunk/src/gate/creole/CreoleAnnotationHandler.java 2012-01-07
17:17:56 UTC (rev 14922)
@@ -16,6 +16,7 @@
package gate.creole;
+import gate.Corpus;
import gate.Gate;
import gate.Gate.DirectoryInfo;
import gate.Gate.ResourceInfo;
@@ -414,8 +415,12 @@
if(paramElt.getTextTrim().length() == 0) {
// need to determine the type
paramElt.setText(method.getParameterTypes()[0].getName());
- if(Collection.class
- .isAssignableFrom(method.getParameterTypes()[0])) {
+ // for collections (but nor GATE Corpora) we also try to
determine
+ // the item type.
+ if((!Corpus.class.isAssignableFrom(
+ method.getParameterTypes()[0])) &&
+ Collection.class.isAssignableFrom(
+ method.getParameterTypes()[0])) {
determineCollectionElementType(method, paramElt);
}
}
Modified: gate/trunk/src/gate/creole/TestCreoleAnnotationHandler.java
===================================================================
--- gate/trunk/src/gate/creole/TestCreoleAnnotationHandler.java 2012-01-07
02:28:42 UTC (rev 14921)
+++ gate/trunk/src/gate/creole/TestCreoleAnnotationHandler.java 2012-01-07
17:17:56 UTC (rev 14922)
@@ -64,7 +64,6 @@
URL originalUrl =
Gate.getUrl("tests/creole-annotation-handler/initial-creole.xml");
org.jdom.Document creoleXml =
jdomBuilder.build(originalUrl.openStream());
-
CreoleAnnotationHandler processor = new
CreoleAnnotationHandler(originalUrl);
processor.processAnnotations(creoleXml);
@@ -122,7 +121,7 @@
}
assertTrue("XML produced by annotation handler does not match expected: "
- + diff, match);
+ + diff.toString() , match);
}
/** Test suite routine for the test runner */
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs