Revision: 17653
http://sourceforge.net/p/gate/code/17653
Author: markagreenwood
Date: 2014-03-13 19:40:20 +0000 (Thu, 13 Mar 2014)
Log Message:
-----------
finished cleaning up the gate.xml handling code, by removing the rest of the DB
stuff left over from the last major code cleanup I did around 5 years ago
Modified Paths:
--------------
gate/trunk/build/gate.xml
gate/trunk/src/main/gate/DataStoreRegister.java
gate/trunk/src/main/gate/Gate.java
gate/trunk/src/main/gate/config/ConfigXmlHandler.java
gate/trunk/src/main/gate/corpora/DocumentImpl.java
Modified: gate/trunk/build/gate.xml
===================================================================
--- gate/trunk/build/gate.xml 2014-03-13 18:47:31 UTC (rev 17652)
+++ gate/trunk/build/gate.xml 2014-03-13 19:40:20 UTC (rev 17653)
@@ -1,29 +1,6 @@
<?xml version="1.0"?>
<!-- gate.xml -->
<!-- $Id$ -->
-
-<!-- Sheffield GATE configuration file -->
-
-<!-- MAKE CHANGES TO THE ONE IN gate/doc/internal, THEN COPY TO
- y:\gate.xml and /share/nlp/projects/gate/gate.xml -->
-
<GATE>
-<DBCONFIG
- url="jdbc:oracle:thin:GATEUSER/[email protected]:1521:gate02"
-
url-test="jdbc:postgresql://redmires.dcs.shef.ac.uk:5432/gatetest?user=gateuser&password=gateuser"
-/>
-<!--
-
url-test="jdbc:postgresql://mamtor.dcs.shef.ac.uk:5432/gate01?user=gateuser&password=gate"
- url-test1="jdbc:oracle:thin:GATEUSER/[email protected]:1521:gate101"
- url="jdbc:oracle:thin:GATEUSER/[email protected]:1521:gatedb2"
- url1="jdbc:oracle:thin:GATEUSER/[email protected]:1521:gate101"
- url2="jdbc:oracle:oci8:GATEUSER/[email protected]"
- url3="jdbc:oracle:oci8:GATEUSER/[email protected]"
- url4="jdbc:oracle:oci8:GATEUSER/[email protected]"
--->
-
-<!--DBCONFIG url="jdbc:oracle:oci8:GATEUSER/[email protected]"/-->
-<!--DBCONFIG
url="jdbc:oracle:oci8:GATEUSER/[email protected]:1521:GateDB2"/-->
-
</GATE>
Modified: gate/trunk/src/main/gate/DataStoreRegister.java
===================================================================
--- gate/trunk/src/main/gate/DataStoreRegister.java 2014-03-13 18:47:31 UTC
(rev 17652)
+++ gate/trunk/src/main/gate/DataStoreRegister.java 2014-03-13 19:40:20 UTC
(rev 17653)
@@ -98,23 +98,6 @@
} // while
} // clear()
- /** Configuration data such as driver names. */
- private static Map<Object,Object> configData = new HashMap<Object,Object>();
-
- /** Get the configuration data map. */
- public static Map<Object,Object> getConfigData() {
- return configData;
- }
-
- /**
- * Adds configuration data (e.g. from <TT>gate.xml</TT> files) to the
- * register. New key/value pairs are added to the existing set (this will
- * overwrite existing pairs whose keys match new ones).
- */
- public static void addConfig(Map<Object,Object> configData) {
- DataStoreRegister.configData.putAll(configData);
- } // addConfig
-
/** A hashmap from datastore to security data (current user and group) */
private static Map<DataStore, Map<Object,Object>> securityData = new
HashMap<DataStore, Map<Object,Object>>();
Modified: gate/trunk/src/main/gate/Gate.java
===================================================================
--- gate/trunk/src/main/gate/Gate.java 2014-03-13 18:47:31 UTC (rev 17652)
+++ gate/trunk/src/main/gate/Gate.java 2014-03-13 19:40:20 UTC (rev 17653)
@@ -549,9 +549,6 @@
// remember the init-time config options
originalUserConfig.putAll(userConfig);
-
- log.debug("user config loaded; DBCONFIG="
- + DataStoreRegister.getConfigData());
} // initConfigData()
/**
Modified: gate/trunk/src/main/gate/config/ConfigXmlHandler.java
===================================================================
--- gate/trunk/src/main/gate/config/ConfigXmlHandler.java 2014-03-13
18:47:31 UTC (rev 17652)
+++ gate/trunk/src/main/gate/config/ConfigXmlHandler.java 2014-03-13
19:40:20 UTC (rev 17653)
@@ -17,7 +17,6 @@
package gate.config;
import gate.CreoleRegister;
-import gate.DataStoreRegister;
import gate.Factory;
import gate.FeatureMap;
import gate.Gate;
@@ -139,9 +138,7 @@
currentAttributes = atts;
currentAttributeMap = attributeListToParameterList();
- if(elementName.toUpperCase().equals("DBCONFIG")) {
- DataStoreRegister.addConfig(currentAttributeMap);
- } else if(elementName.toUpperCase().equals(Gate.getUserConfigElement())) {
+ if(elementName.toUpperCase().equals(Gate.getUserConfigElement())) {
Gate.getUserConfig().putAll(currentAttributeMap);
}
@@ -177,14 +174,10 @@
}
//////////////////////////////////////////////////////////////////
- } else if(elementName.toUpperCase().equals("DBCONFIG")) {
+ } else if(elementName.toUpperCase().equals("GATECONFIG")) {
// these are empty elements with attributes; nothing to do here
//////////////////////////////////////////////////////////////////
- }else if(elementName.toUpperCase().equals("GATECONFIG")) {
- // these are empty elements with attributes; nothing to do here
-
- //////////////////////////////////////////////////////////////////
} else {
throw new GateSaxException(
"Unknown config data element: " + elementName +
Modified: gate/trunk/src/main/gate/corpora/DocumentImpl.java
===================================================================
--- gate/trunk/src/main/gate/corpora/DocumentImpl.java 2014-03-13 18:47:31 UTC
(rev 17652)
+++ gate/trunk/src/main/gate/corpora/DocumentImpl.java 2014-03-13 19:40:20 UTC
(rev 17653)
@@ -731,6 +731,7 @@
* markup + dumped annotations form the aSourceAnnotationSet
*/
@Override
+ @SuppressWarnings("unused")
public String toXml(Set<Annotation> aSourceAnnotationSet, boolean
includeFeatures) {
if(hasOriginalContentFeatures()) { return saveAnnotationSetAsXmlInOrig(
aSourceAnnotationSet, includeFeatures); } // if
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