Revision: 17430
http://sourceforge.net/p/gate/code/17430
Author: markagreenwood
Date: 2014-02-26 13:58:26 +0000 (Wed, 26 Feb 2014)
Log Message:
-----------
removed the handler for the gate:// protocol which hasn't been used since
version 3
Modified Paths:
--------------
gate/trunk/src/main/gate/creole/gazetteer/GazetteerList.java
gate/trunk/src/main/gate/creole/gazetteer/LinearDefinition.java
Removed Paths:
-------------
gate/trunk/src/main/gate/util/protocols/gate/
Modified: gate/trunk/src/main/gate/creole/gazetteer/GazetteerList.java
===================================================================
--- gate/trunk/src/main/gate/creole/gazetteer/GazetteerList.java
2014-02-26 13:49:48 UTC (rev 17429)
+++ gate/trunk/src/main/gate/creole/gazetteer/GazetteerList.java
2014-02-26 13:58:26 UTC (rev 17430)
@@ -174,16 +174,9 @@
if (null == url) {
throw new ResourceInstantiationException("URL not specified (null)");
}
+
+ File fileo = Files.fileFromURL(url);
- URL tempUrl = url;
- if (-1 != url.getProtocol().indexOf("gate")) {
- tempUrl = gate.util.protocols.gate.Handler.class.getResource(
- gate.util.Files.getResourcePath() + url.getPath()
- );
- } // if gate:path url
-
- File fileo = Files.fileFromURL(tempUrl);
-
fileo.delete();
OutputStreamWriter listWriter = new OutputStreamWriter(
new FileOutputStream(fileo), encoding);
Modified: gate/trunk/src/main/gate/creole/gazetteer/LinearDefinition.java
===================================================================
--- gate/trunk/src/main/gate/creole/gazetteer/LinearDefinition.java
2014-02-26 13:49:48 UTC (rev 17429)
+++ gate/trunk/src/main/gate/creole/gazetteer/LinearDefinition.java
2014-02-26 13:58:26 UTC (rev 17430)
@@ -15,6 +15,11 @@
*/
package gate.creole.gazetteer;
+import gate.creole.ResourceInstantiationException;
+import gate.util.BomStrippingInputStreamReader;
+import gate.util.Files;
+import gate.util.GateRuntimeException;
+
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
@@ -32,12 +37,7 @@
import java.util.Map;
import java.util.Set;
-import gate.creole.ResourceInstantiationException;
-import gate.util.BomStrippingInputStreamReader;
-import gate.util.Files;
-import gate.util.GateRuntimeException;
-
/** Represents a Linear Definition [lists.def] file <br>
* The normal usage of the class will be
* * construct it
@@ -151,20 +151,13 @@
GazetteerList list = new GazetteerList();
list.setSeparator(separator);
try {
- URL turl = url;
- if (-1 != url.getProtocol().indexOf("gate")) {
- turl = gate.util.protocols.gate.Handler.class.getResource(
- gate.util.Files.getResourcePath() + url.getPath()
- );
- } // if gate:path url
-
-
+
try {
URL lurl = new URL(url,listName);
list.setURL(lurl);
list.load(isOrdered);
} catch (Exception x) {
- String path = turl.getPath();
+ String path = url.getPath();
int slash = path.lastIndexOf("/");
if (-1 != slash ) {
path = path.substring(0,slash+1);
@@ -272,14 +265,9 @@
throw new ResourceInstantiationException("URL not set.(null)");
}
try {
- URL tempUrl = url;
- if (-1 != url.getProtocol().indexOf("gate")) {
- tempUrl = gate.util.protocols.gate.Handler.class.getResource(
- gate.util.Files.getResourcePath() + url.getPath()
- );
- } // if gate:path url
+
- File fileo = Files.fileFromURL(tempUrl);
+ File fileo = Files.fileFromURL(url);
fileo.delete();
BufferedWriter defWriter = new BufferedWriter(new FileWriter(fileo));
Iterator inodes = nodes.iterator();
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs