Revision: 17066
          http://sourceforge.net/p/gate/code/17066
Author:   markagreenwood
Date:     2013-11-08 10:38:28 +0000 (Fri, 08 Nov 2013)
Log Message:
-----------
started to fix the tests to load the resources from the new location

Modified Paths:
--------------
    gate/branches/sawdust/src/test/gate/annotation/TestAnnotation.java
    gate/branches/sawdust/src/test/gate/config/TestConfig.java
    gate/branches/sawdust/src/test/gate/corpora/TestDocument.java
    gate/branches/sawdust/src/test/gate/corpora/TestTikaFormats.java
    gate/branches/sawdust/src/test/gate/creole/TestControllers.java
    gate/branches/sawdust/src/test/gate/creole/TestCreole.java
    gate/branches/sawdust/src/test/gate/creole/TestCreoleAnnotationHandler.java
    gate/branches/sawdust/src/test/gate/creole/TestPR.java
    gate/branches/sawdust/src/test/gate/creole/TestXSchema.java
    gate/branches/sawdust/src/test/gate/email/TestEmail.java
    gate/branches/sawdust/src/test/gate/html/TestHtml.java
    gate/branches/sawdust/src/test/gate/sgml/TestSgml.java
    gate/branches/sawdust/src/test/gate/util/TestAnnotationMerging.java
    gate/branches/sawdust/src/test/gate/xml/TestXml.java

Modified: gate/branches/sawdust/src/test/gate/annotation/TestAnnotation.java
===================================================================
--- gate/branches/sawdust/src/test/gate/annotation/TestAnnotation.java  
2013-11-08 08:57:52 UTC (rev 17065)
+++ gate/branches/sawdust/src/test/gate/annotation/TestAnnotation.java  
2013-11-08 10:38:28 UTC (rev 17066)
@@ -16,11 +16,13 @@
 
 package gate.annotation;
 
+import java.net.URL;
 import java.util.*;
 
 import junit.framework.*;
 
 import gate.*;
+import gate.corpora.TestDocument;
 import gate.util.*;
 
 /** Tests for the Annotation classes
@@ -49,7 +51,7 @@
          if (Gate.getGateHome() == null)
            Gate.init();
     FeatureMap params = Factory.newFeatureMap();
-    params.put(Document.DOCUMENT_URL_PARAMETER_NAME, 
Gate.getUrl("tests/doc0.html"));
+    params.put(Document.DOCUMENT_URL_PARAMETER_NAME, new 
URL(TestDocument.getTestServerName()+"tests/doc0.html"));
     params.put(Document.DOCUMENT_MARKUP_AWARE_PARAMETER_NAME, "false");
     doc1 = (Document)Factory.createResource("gate.corpora.DocumentImpl",
                                                     params);
@@ -308,7 +310,7 @@
   /** Test type index */
   public void testTypeIndex() throws Exception {
     FeatureMap params = Factory.newFeatureMap();
-    params.put(Document.DOCUMENT_URL_PARAMETER_NAME, 
Gate.getUrl("tests/doc0.html"));
+    params.put(Document.DOCUMENT_URL_PARAMETER_NAME, new 
URL(TestDocument.getTestServerName()+"tests/doc0.html"));
     params.put(Document.DOCUMENT_MARKUP_AWARE_PARAMETER_NAME, "false");
     Document doc = 
(Document)Factory.createResource("gate.corpora.DocumentImpl",
                                                     params);
@@ -377,7 +379,7 @@
   /** Test the annotations set add method that uses existing nodes */
   public void testAddWithNodes() throws Exception {
     FeatureMap params = Factory.newFeatureMap();
-    params.put(Document.DOCUMENT_URL_PARAMETER_NAME, 
Gate.getUrl("tests/doc0.html"));
+    params.put(Document.DOCUMENT_URL_PARAMETER_NAME, new 
URL(TestDocument.getTestServerName()+"tests/doc0.html"));
     params.put(Document.DOCUMENT_MARKUP_AWARE_PARAMETER_NAME, "false");
     Document doc = 
(Document)Factory.createResource("gate.corpora.DocumentImpl",
                                                     params);
@@ -683,7 +685,7 @@
   public void testAnnotationSet() throws Exception {
     // constuct an empty AS
     FeatureMap params = Factory.newFeatureMap();
-    params.put(Document.DOCUMENT_URL_PARAMETER_NAME, 
Gate.getUrl("tests/doc0.html"));
+    params.put(Document.DOCUMENT_URL_PARAMETER_NAME, new 
URL(TestDocument.getTestServerName()+"tests/doc0.html"));
     params.put(Document.DOCUMENT_MARKUP_AWARE_PARAMETER_NAME, "false");
     Document doc = 
(Document)Factory.createResource("gate.corpora.DocumentImpl",
                                                     params);
@@ -1157,7 +1159,7 @@
   /** Test inDocumentOrder() and getStartingAt(long) */
   public void testDocumentOrder() throws Exception {
     FeatureMap params = Factory.newFeatureMap();
-    params.put(Document.DOCUMENT_URL_PARAMETER_NAME, 
Gate.getUrl("tests/doc0.html"));
+    params.put(Document.DOCUMENT_URL_PARAMETER_NAME, new 
URL(TestDocument.getTestServerName()+"tests/doc0.html"));
     params.put(Document.DOCUMENT_MARKUP_AWARE_PARAMETER_NAME, "true");
     Document doc = 
(Document)Factory.createResource("gate.corpora.DocumentImpl",
                                                     params);

Modified: gate/branches/sawdust/src/test/gate/config/TestConfig.java
===================================================================
--- gate/branches/sawdust/src/test/gate/config/TestConfig.java  2013-11-08 
08:57:52 UTC (rev 17065)
+++ gate/branches/sawdust/src/test/gate/config/TestConfig.java  2013-11-08 
10:38:28 UTC (rev 17066)
@@ -24,6 +24,7 @@
 import junit.framework.*;
 
 import gate.*;
+import gate.corpora.TestDocument;
 import gate.util.*;
 
 /** CREOLE test class
@@ -39,7 +40,7 @@
   /** Fixture set up */
   public void setUp() throws Exception {
     CreoleRegister register = Gate.getCreoleRegister();
-    register.registerDirectories(Gate.getUrl("tests"));
+    register.registerDirectories(new 
URL(TestDocument.getTestServerName()+"tests"));
   } // setUp
 
   /** Put things back as they should be after running tests
@@ -75,8 +76,8 @@
 
   /** Test config loading */
   public void testConfigReading() throws Exception {
-    System.out.println("Reading GATE config from : " + 
Gate.getUrl("tests/gate.xml"));
-    readConfig(Gate.getUrl("tests/gate.xml"));
+    System.out.println("Reading GATE config from : " + new 
URL(TestDocument.getTestServerName()+"tests/gate.xml"));
+    readConfig(new URL(TestDocument.getTestServerName()+"tests/gate.xml"));
 
     // check that we got the CREOLE dir entry; then remove it
     // so it doesn't get accessed in other tests

Modified: gate/branches/sawdust/src/test/gate/corpora/TestDocument.java
===================================================================
--- gate/branches/sawdust/src/test/gate/corpora/TestDocument.java       
2013-11-08 08:57:52 UTC (rev 17065)
+++ gate/branches/sawdust/src/test/gate/corpora/TestDocument.java       
2013-11-08 10:38:28 UTC (rev 17066)
@@ -49,12 +49,13 @@
   /** Fixture set up */
   public void setUp() {
 
-    try{
+    //try{
 //      Gate.init();
-      testServer = Gate.getUrl().toExternalForm();
-    } catch (GateException e){
-      e.printStackTrace(Err.getPrintWriter());
-    }
+      //testServer = Gate.getUrl().toExternalForm();
+      testServer = getTestServerName();
+    //} catch (GateException e){
+    //  e.printStackTrace(Err.getPrintWriter());
+    //}
 
     testDocument1 = "tests/html/test2.htm";
   } // setUp
@@ -63,7 +64,12 @@
   public static String getTestServerName() {
     if(testServer != null) return testServer;
     else{
-      try { testServer = Gate.getUrl().toExternalForm(); }
+      try { 
+        URL url = 
Gate.getClassLoader().getResource("gate/resources/gate.ac.uk/");
+        
+        testServer = url.toExternalForm();//Gate.getUrl().toExternalForm(); }
+      
+      System.out.println("*** "+testServer);}
       catch(Exception e) { }
       return testServer;
     }

Modified: gate/branches/sawdust/src/test/gate/corpora/TestTikaFormats.java
===================================================================
--- gate/branches/sawdust/src/test/gate/corpora/TestTikaFormats.java    
2013-11-08 08:57:52 UTC (rev 17065)
+++ gate/branches/sawdust/src/test/gate/corpora/TestTikaFormats.java    
2013-11-08 10:38:28 UTC (rev 17066)
@@ -37,7 +37,7 @@
   }
 
   private void doTest(String ext) throws Exception {
-    String base = Gate.getUrl().toExternalForm();
+    String base = TestDocument.getTestServerName();
 
     URL url = new URL(base + "tests/tika/tika-test." + ext);
 

Modified: gate/branches/sawdust/src/test/gate/creole/TestControllers.java
===================================================================
--- gate/branches/sawdust/src/test/gate/creole/TestControllers.java     
2013-11-08 08:57:52 UTC (rev 17065)
+++ gate/branches/sawdust/src/test/gate/creole/TestControllers.java     
2013-11-08 10:38:28 UTC (rev 17066)
@@ -16,9 +16,12 @@
 
 package gate.creole;
 
+import java.net.URL;
+
 import junit.framework.*;
 
 import gate.*;
+import gate.corpora.TestDocument;
 import gate.creole.gazetteer.DefaultGazetteer;
 import gate.creole.tokeniser.DefaultTokeniser;
 import gate.util.GateException;
@@ -64,7 +67,7 @@
     
     //get a document
     FeatureMap params = Factory.newFeatureMap();
-    params.put(Document.DOCUMENT_URL_PARAMETER_NAME, 
Gate.getUrl("tests/doc0.html"));
+    params.put(Document.DOCUMENT_URL_PARAMETER_NAME, new 
URL(TestDocument.getTestServerName()+"tests/doc0.html"));
     params.put(Document.DOCUMENT_MARKUP_AWARE_PARAMETER_NAME, "false");
     Document doc = 
(Document)Factory.createResource("gate.corpora.DocumentImpl",
                                                     params);

Modified: gate/branches/sawdust/src/test/gate/creole/TestCreole.java
===================================================================
--- gate/branches/sawdust/src/test/gate/creole/TestCreole.java  2013-11-08 
08:57:52 UTC (rev 17065)
+++ gate/branches/sawdust/src/test/gate/creole/TestCreole.java  2013-11-08 
10:38:28 UTC (rev 17066)
@@ -24,6 +24,7 @@
 import junit.framework.*;
 
 import gate.*;
+import gate.corpora.TestDocument;
 import gate.util.GateException;
 import gate.util.Out;
 
@@ -50,7 +51,7 @@
     reg.clear();
 
     // find a URL for finding test files and add to the directory set
-    URL testUrl = Gate.getUrl("tests/");
+    URL testUrl = new URL(TestDocument.getTestServerName()+"tests/");
 //    reg.registerDirectories(testUrl);
     reg.addDirectory(testUrl);
     reg.registerDirectories();
@@ -99,8 +100,7 @@
     // Create an LR
     FeatureMap params = Factory.newFeatureMap();
     params.put("features", Factory.newFeatureMap());
-    params.put(Document.DOCUMENT_URL_PARAMETER_NAME, 
Gate.getUrl("tests/doc0.html")
-    );
+    params.put(Document.DOCUMENT_URL_PARAMETER_NAME, new 
URL(TestDocument.getTestServerName()+"tests/doc0.html"));
     res = Factory.createResource("gate.corpora.DocumentImpl", params);
 
     // lr instances list should be one longer now
@@ -110,8 +110,7 @@
     // Create another LR
     params = Factory.newFeatureMap();
     params.put("features", Factory.newFeatureMap());
-    params.put(Document.DOCUMENT_URL_PARAMETER_NAME, 
Gate.getUrl("tests/doc0.html")
-    );
+    params.put(Document.DOCUMENT_URL_PARAMETER_NAME, new 
URL(TestDocument.getTestServerName()+"tests/doc0.html"));
     res = Factory.createResource("gate.corpora.DocumentImpl", params);
 
     // lr instances list should be two longer now
@@ -433,7 +432,7 @@
     assertNotNull("Couldn't find testpkg.POT res data", rd);
 
     // create a document, so that the parameter default will pick it up
-    Factory.newDocument(Gate.getUrl("tests/doc0.html"));
+    Factory.newDocument(new 
URL(TestDocument.getTestServerName()+"tests/doc0.html"));
 
     ParameterList paramList = rd.getParameterList();
     if(DEBUG) Out.prln(rd);
@@ -645,8 +644,7 @@
   public void testFactory() throws Exception {
     FeatureMap params = Factory.newFeatureMap();
     params.put("features", Factory.newFeatureMap());
-    params.put(Document.DOCUMENT_URL_PARAMETER_NAME, 
Gate.getUrl("tests/doc0.html")
-    );
+    params.put(Document.DOCUMENT_URL_PARAMETER_NAME, new 
URL(TestDocument.getTestServerName()+"tests/doc0.html"));
     Resource res =
       Factory.createResource("gate.corpora.DocumentImpl", params);
   } // testFactory

Modified: 
gate/branches/sawdust/src/test/gate/creole/TestCreoleAnnotationHandler.java
===================================================================
--- gate/branches/sawdust/src/test/gate/creole/TestCreoleAnnotationHandler.java 
2013-11-08 08:57:52 UTC (rev 17065)
+++ gate/branches/sawdust/src/test/gate/creole/TestCreoleAnnotationHandler.java 
2013-11-08 10:38:28 UTC (rev 17066)
@@ -17,6 +17,7 @@
 
 import java.net.URL;
 import gate.Gate;
+import gate.corpora.TestDocument;
 import gate.util.GateException;
 
 import junit.framework.*;
@@ -62,13 +63,13 @@
    * mentions and compare the resulting XML to the expected result.
    */
   public void testCreoleAnnotationHandler() throws Exception {
-    URL originalUrl = 
Gate.getUrl("tests/creole-annotation-handler/initial-creole.xml");
+    URL originalUrl = new 
URL(TestDocument.getTestServerName()+"tests/creole-annotation-handler/initial-creole.xml");
     org.jdom.Document creoleXml =
       jdomBuilder.build(originalUrl.openStream());
     CreoleAnnotationHandler processor = new 
CreoleAnnotationHandler(originalUrl);
     processor.processAnnotations(creoleXml);
 
-    URL expectedURL = 
Gate.getUrl("tests/creole-annotation-handler/expected-creole.xml");
+    URL expectedURL = new 
URL(TestDocument.getTestServerName()+"tests/creole-annotation-handler/expected-creole.xml");
 
     // XMLUnit requires the expected and actual results as W3C DOM rather than
     // JDOM

Modified: gate/branches/sawdust/src/test/gate/creole/TestPR.java
===================================================================
--- gate/branches/sawdust/src/test/gate/creole/TestPR.java      2013-11-08 
08:57:52 UTC (rev 17065)
+++ gate/branches/sawdust/src/test/gate/creole/TestPR.java      2013-11-08 
10:38:28 UTC (rev 17066)
@@ -488,26 +488,9 @@
 
     // verify if the saved data store is the same with the just processed file
     // first document
-    String urlBaseName = Gate.locateGateFiles();
-//    RE re1 = new RE("build/gate.jar!");
-//    RE re2 = new RE("jar:");
-//    urlBaseName = re1.substituteAll( urlBaseName,"classes");
-//    urlBaseName = re2.substituteAll( urlBaseName,"");
 
-    if (urlBaseName.endsWith("/bin/gate.jar!/")) {
-      StringBuffer buff = new StringBuffer(
-                            urlBaseName.substring(
-                              0,
-                              urlBaseName.lastIndexOf("bin/gate.jar!/"))
-                            );
-      buff.append("classes/");
-      buff.delete(0, "jar:file:".length());
-      buff.insert(0, "file://");
-      urlBaseName = buff.toString();
-    }
+    URL urlBase = new URL(TestDocument.getTestServerName());
 
-    URL urlBase = new URL(urlBaseName + "gate/resources/gate.ac.uk/");
-
     URL storageDir = null;
     storageDir = new URL(urlBase, "tests/ft");
 

Modified: gate/branches/sawdust/src/test/gate/creole/TestXSchema.java
===================================================================
--- gate/branches/sawdust/src/test/gate/creole/TestXSchema.java 2013-11-08 
08:57:52 UTC (rev 17065)
+++ gate/branches/sawdust/src/test/gate/creole/TestXSchema.java 2013-11-08 
10:38:28 UTC (rev 17066)
@@ -16,13 +16,19 @@
 
 package gate.creole;
 
+import gate.Factory;
+import gate.FeatureMap;
+import gate.Gate;
+import gate.corpora.TestDocument;
+import gate.util.Out;
+
 import java.io.ByteArrayInputStream;
+import java.net.URL;
 
-import junit.framework.*;
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
 
-import gate.*;
-import gate.util.Out;
-
 /** Annotation schemas test class.
   */
 public class TestXSchema extends TestCase
@@ -45,7 +51,7 @@
 
     FeatureMap parameters = Factory.newFeatureMap();
     parameters.put(
-      AnnotationSchema.FILE_URL_PARAM_NAME, 
Gate.getUrl("tests/xml/POSSchema.xml"));
+      AnnotationSchema.FILE_URL_PARAM_NAME, new 
URL(TestDocument.getTestServerName()+"tests/xml/POSSchema.xml"));
 
     AnnotationSchema annotSchema = (AnnotationSchema)
       Factory.createResource("gate.creole.AnnotationSchema", parameters);
@@ -66,7 +72,7 @@
 
     FeatureMap parameters = Factory.newFeatureMap();
     parameters.put(
-      AnnotationSchema.FILE_URL_PARAM_NAME, 
Gate.getUrl("tests/xml/POSSchema.xml"));
+      AnnotationSchema.FILE_URL_PARAM_NAME, new 
URL(TestDocument.getTestServerName()+"tests/xml/POSSchema.xml"));
 
     AnnotationSchema schema = (AnnotationSchema)
       Factory.createResource("gate.creole.AnnotationSchema", parameters);

Modified: gate/branches/sawdust/src/test/gate/email/TestEmail.java
===================================================================
--- gate/branches/sawdust/src/test/gate/email/TestEmail.java    2013-11-08 
08:57:52 UTC (rev 17065)
+++ gate/branches/sawdust/src/test/gate/email/TestEmail.java    2013-11-08 
10:38:28 UTC (rev 17066)
@@ -16,12 +16,14 @@
 
 package gate.email;
 
+import java.net.URL;
 import java.util.Map;
 
 import junit.framework.*;
 
 import gate.Gate;
 //import org.w3c.www.mime.*;
+import gate.corpora.TestDocument;
 
 
 /**
@@ -45,7 +47,7 @@
     Map markupElementsMap = null;
     gate.Document doc = null;
 //    Gate.init();
-    doc = gate.Factory.newDocument(Gate.getUrl("tests/email/test.eml"), 
"ISO-8859-1");
+    doc = gate.Factory.newDocument(new 
URL(TestDocument.getTestServerName()+"tests/email/test.eml"), "ISO-8859-1");
 
     // get a document format that deals with e-mails
     gate.DocumentFormat docFormat = gate.DocumentFormat.getDocumentFormat(

Modified: gate/branches/sawdust/src/test/gate/html/TestHtml.java
===================================================================
--- gate/branches/sawdust/src/test/gate/html/TestHtml.java      2013-11-08 
08:57:52 UTC (rev 17065)
+++ gate/branches/sawdust/src/test/gate/html/TestHtml.java      2013-11-08 
10:38:28 UTC (rev 17066)
@@ -18,7 +18,9 @@
 
 import gate.Gate;
 import gate.corpora.MimeType;
+import gate.corpora.TestDocument;
 
+import java.net.URL;
 import java.util.Map;
 
 import junit.framework.Test;
@@ -54,7 +56,7 @@
     markupElementsMap.put ("A","link");
     markupElementsMap.put ("a","link");
     */
-  doc = gate.Factory.newDocument(Gate.getUrl("tests/html/test1.htm"));
+  doc = gate.Factory.newDocument(new 
URL(TestDocument.getTestServerName()+"tests/html/test1.htm"));
 // doc = gate.Factory.newDocument(new URL("http://www";));
 
    // get the docFormat that deals with it.

Modified: gate/branches/sawdust/src/test/gate/sgml/TestSgml.java
===================================================================
--- gate/branches/sawdust/src/test/gate/sgml/TestSgml.java      2013-11-08 
08:57:52 UTC (rev 17065)
+++ gate/branches/sawdust/src/test/gate/sgml/TestSgml.java      2013-11-08 
10:38:28 UTC (rev 17066)
@@ -16,12 +16,20 @@
 
 package gate.sgml;
 
+import gate.AnnotationSet;
+import gate.Document;
+import gate.Factory;
+import gate.FeatureMap;
+import gate.GateConstants;
+import gate.corpora.TestDocument;
+
+import java.net.URL;
 import java.util.Map;
 
-import junit.framework.*;
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
 
-import gate.*;
-
 /** Test class for SGML facilities
   */
 public class TestSgml extends TestCase
@@ -52,7 +60,7 @@
     */
 
     FeatureMap params = Factory.newFeatureMap();
-    params.put(Document.DOCUMENT_URL_PARAMETER_NAME, 
Gate.getUrl("tests/sgml/Hds.sgm"));
+    params.put(Document.DOCUMENT_URL_PARAMETER_NAME, new 
URL(TestDocument.getTestServerName()+"tests/sgml/Hds.sgm"));
     params.put(Document.DOCUMENT_MARKUP_AWARE_PARAMETER_NAME, "false");
     doc = (Document)Factory.createResource("gate.corpora.DocumentImpl",
                                                     params);

Modified: gate/branches/sawdust/src/test/gate/util/TestAnnotationMerging.java
===================================================================
--- gate/branches/sawdust/src/test/gate/util/TestAnnotationMerging.java 
2013-11-08 08:57:52 UTC (rev 17065)
+++ gate/branches/sawdust/src/test/gate/util/TestAnnotationMerging.java 
2013-11-08 10:38:28 UTC (rev 17066)
@@ -7,8 +7,11 @@
 import gate.Factory;
 import gate.Gate;
 import gate.GateConstants;
-import java.io.File;
+import gate.corpora.TestDocument;
+
+import java.net.URL;
 import java.util.HashMap;
+
 import junit.framework.Test;
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
@@ -38,7 +41,7 @@
   } // suite
 
   private Document loadDocument(String path, String name) throws Exception {
-    Document doc = Factory.newDocument(Gate.getUrl(path), "UTF-8");
+    Document doc = Factory.newDocument(new 
URL(TestDocument.getTestServerName()+path), "UTF-8");
     doc.setName(name);
     return doc;
   }

Modified: gate/branches/sawdust/src/test/gate/xml/TestXml.java
===================================================================
--- gate/branches/sawdust/src/test/gate/xml/TestXml.java        2013-11-08 
08:57:52 UTC (rev 17065)
+++ gate/branches/sawdust/src/test/gate/xml/TestXml.java        2013-11-08 
10:38:28 UTC (rev 17066)
@@ -28,6 +28,7 @@
 
 import gate.*;
 import gate.corpora.DocumentImpl;
+import gate.corpora.TestDocument;
 import gate.creole.SerialAnalyserController;
 import gate.util.Files;
 import gate.util.Err;
@@ -61,23 +62,23 @@
     List urlDescription = new LinkedList();
     URL url = null;
 
-    url = Gate.getUrl("tests/xml/xces.xml");
+    url = new URL(TestDocument.getTestServerName()+"tests/xml/xces.xml");
     assertTrue("Coudn't create a URL object for tests/xml/xces.xml ", url != 
null);
     urlList.add(url);
     urlDescription.add(" an XML document ");
 
-    url = Gate.getUrl("tests/xml/Sentence.xml");
+    url = new URL(TestDocument.getTestServerName()+"tests/xml/Sentence.xml");
     assertTrue("Coudn't create a URL object for tests/xml/Sentence.xml",
                                                          url != null);
     urlList.add(url);
     urlDescription.add(" an XML document ");
 
-    url = Gate.getUrl("tests/html/test1.htm");
+    url = new URL(TestDocument.getTestServerName()+"tests/html/test1.htm");
     assertTrue("Coudn't create a URL object for tests/html/test.htm",url != 
null);
     urlList.add(url);
     urlDescription.add(" an HTML document ");
 
-    url = Gate.getUrl("tests/email/test2.eml");
+    url = new URL(TestDocument.getTestServerName()+"tests/email/test2.eml");
     assertTrue("Coudn't create a URL object for defg ",url != null);
     urlList.add(url);
     urlDescription.add(" an EMAIL document ");
@@ -193,7 +194,7 @@
     anElement2StringMap.put("S","\n");
     anElement2StringMap.put("s","\n");
 
-    doc = gate.Factory.newDocument(Gate.getUrl("tests/xml/xces.xml"), 
workingEncoding);
+    doc = gate.Factory.newDocument(new 
URL(TestDocument.getTestServerName()+"tests/xml/xces.xml"), workingEncoding);
 
     AnnotationSet annotSet = doc.getAnnotations(
                         GateConstants.ORIGINAL_MARKUPS_ANNOT_SET_NAME);

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to