Revision: 17604
http://sourceforge.net/p/gate/code/17604
Author: markagreenwood
Date: 2014-03-09 10:08:13 +0000 (Sun, 09 Mar 2014)
Log Message:
-----------
a few more warnings cleared up
Modified Paths:
--------------
gate/trunk/src/main/gate/corpora/CorpusImpl.java
gate/trunk/src/main/gate/corpora/DocumentContentImpl.java
gate/trunk/src/main/gate/corpora/SgmlDocumentFormat.java
gate/trunk/src/main/gate/corpora/SynchronisationException.java
gate/trunk/src/main/gate/corpora/UimaDocumentFormat.java
gate/trunk/src/main/gate/creole/ANNIETransducer.java
gate/trunk/src/main/gate/creole/AbstractLanguageAnalyser.java
gate/trunk/src/main/gate/creole/AbstractVisualResource.java
gate/trunk/src/main/gate/creole/FeatureSchema.java
Modified: gate/trunk/src/main/gate/corpora/CorpusImpl.java
===================================================================
--- gate/trunk/src/main/gate/corpora/CorpusImpl.java 2014-03-09 02:20:21 UTC
(rev 17603)
+++ gate/trunk/src/main/gate/corpora/CorpusImpl.java 2014-03-09 10:08:13 UTC
(rev 17604)
@@ -65,9 +65,6 @@
CreoleListener,
CustomDuplication {
- /** Debug flag */
- private static final boolean DEBUG = false;
-
public CorpusImpl() {
supportList = Collections.synchronizedList(new VerboseList());
Gate.getCreoleRegister().addCreoleListener(this);
Modified: gate/trunk/src/main/gate/corpora/DocumentContentImpl.java
===================================================================
--- gate/trunk/src/main/gate/corpora/DocumentContentImpl.java 2014-03-09
02:20:21 UTC (rev 17603)
+++ gate/trunk/src/main/gate/corpora/DocumentContentImpl.java 2014-03-09
10:08:13 UTC (rev 17604)
@@ -33,9 +33,6 @@
*/
public class DocumentContentImpl implements DocumentContent
{
- /** Debug flag */
- private static final boolean DEBUG = false;
-
/** Buffer size for reading
* 16k is 4 times the block size on most filesystems
* so it should be efficient for most cases
Modified: gate/trunk/src/main/gate/corpora/SgmlDocumentFormat.java
===================================================================
--- gate/trunk/src/main/gate/corpora/SgmlDocumentFormat.java 2014-03-09
02:20:21 UTC (rev 17603)
+++ gate/trunk/src/main/gate/corpora/SgmlDocumentFormat.java 2014-03-09
10:08:13 UTC (rev 17604)
@@ -131,13 +131,6 @@
}// unpackMarkup
- /** This method converts the document's content from SGML 2 XML.*/
- private String sgml2Xml(Document doc) {
- String xmlUri = doc.getSourceUrl().toString ();
-
- return xmlUri;
- }// sgml2Xml()
-
/** Initialise this resource, and return it. */
@Override
public Resource init() throws ResourceInstantiationException{
Modified: gate/trunk/src/main/gate/corpora/SynchronisationException.java
===================================================================
--- gate/trunk/src/main/gate/corpora/SynchronisationException.java
2014-03-09 02:20:21 UTC (rev 17603)
+++ gate/trunk/src/main/gate/corpora/SynchronisationException.java
2014-03-09 10:08:13 UTC (rev 17604)
@@ -21,6 +21,8 @@
public class SynchronisationException extends GateRuntimeException {
+ private static final long serialVersionUID = -2741385209392213036L;
+
/** Default construction */
public SynchronisationException() { super(); }
Modified: gate/trunk/src/main/gate/corpora/UimaDocumentFormat.java
===================================================================
--- gate/trunk/src/main/gate/corpora/UimaDocumentFormat.java 2014-03-09
02:20:21 UTC (rev 17603)
+++ gate/trunk/src/main/gate/corpora/UimaDocumentFormat.java 2014-03-09
10:08:13 UTC (rev 17604)
@@ -16,7 +16,12 @@
package gate.corpora;
-import gate.*;
+import gate.Annotation;
+import gate.AnnotationSet;
+import gate.Document;
+import gate.Factory;
+import gate.FeatureMap;
+import gate.Resource;
import gate.creole.ResourceInstantiationException;
import gate.creole.metadata.AutoInstance;
import gate.creole.metadata.CreoleResource;
@@ -24,7 +29,13 @@
import gate.util.InvalidOffsetException;
import gate.util.Out;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
/**
* UIMA XCAS and XMICAS document formats.
@@ -32,9 +43,9 @@
@CreoleResource(name = "UIMA Document Format", isPrivate = true,
autoinstances = {@AutoInstance(hidden = true)})
public class UimaDocumentFormat extends XmlDocumentFormat {
- /** Debug flag */
- private static final boolean DEBUG = false;
+ private static final long serialVersionUID = -3804187336078120808L;
+
@Override
public void unpackMarkup(Document doc, RepositioningInfo repInfo,
RepositioningInfo ampCodingInfo) throws DocumentFormatException {
Modified: gate/trunk/src/main/gate/creole/ANNIETransducer.java
===================================================================
--- gate/trunk/src/main/gate/creole/ANNIETransducer.java 2014-03-09
02:20:21 UTC (rev 17603)
+++ gate/trunk/src/main/gate/creole/ANNIETransducer.java 2014-03-09
10:08:13 UTC (rev 17604)
@@ -30,6 +30,8 @@
)
public class ANNIETransducer extends Transducer {
+ private static final long serialVersionUID = 7443615855994597034L;
+
/**
* The ontology parameter is not used for this PR and therefore hidden.
*
Modified: gate/trunk/src/main/gate/creole/AbstractLanguageAnalyser.java
===================================================================
--- gate/trunk/src/main/gate/creole/AbstractLanguageAnalyser.java
2014-03-09 02:20:21 UTC (rev 17603)
+++ gate/trunk/src/main/gate/creole/AbstractLanguageAnalyser.java
2014-03-09 10:08:13 UTC (rev 17604)
@@ -16,7 +16,9 @@
package gate.creole;
-import gate.*;
+import gate.Corpus;
+import gate.Document;
+import gate.LanguageAnalyser;
/**
* A parent implementation of language analysers with some default code.
@@ -25,6 +27,9 @@
extends AbstractProcessingResource
implements LanguageAnalyser
{
+
+ private static final long serialVersionUID = -3921596570474645540L;
+
/** Set the document property for this analyser. */
@Override
public void setDocument(Document document) {
Modified: gate/trunk/src/main/gate/creole/AbstractVisualResource.java
===================================================================
--- gate/trunk/src/main/gate/creole/AbstractVisualResource.java 2014-03-09
02:20:21 UTC (rev 17603)
+++ gate/trunk/src/main/gate/creole/AbstractVisualResource.java 2014-03-09
10:08:13 UTC (rev 17604)
@@ -29,6 +29,8 @@
public abstract class AbstractVisualResource extends JPanel
implements VisualResource{
+ private static final long serialVersionUID = -3561399635284613196L;
+
/**
* Package access constructor to stop normal initialisation.
* This kind of resources should only be created by the Factory class
Modified: gate/trunk/src/main/gate/creole/FeatureSchema.java
===================================================================
--- gate/trunk/src/main/gate/creole/FeatureSchema.java 2014-03-09 02:20:21 UTC
(rev 17603)
+++ gate/trunk/src/main/gate/creole/FeatureSchema.java 2014-03-09 10:08:13 UTC
(rev 17604)
@@ -48,21 +48,22 @@
/** The default or fixed value for that feature */
/** Permisible value set, if appropriate. */
- Set featurePermissibleValuesSet = null;
+ Set<Object> featurePermissibleValuesSet = null;
/**
* Construction given a name of an feature and a feature value class
* name
*/
+ @SuppressWarnings("unchecked")
public FeatureSchema(String aFeatureName, Class<?> aFeatureValueClass,
String aFeatureValue, String aFeatureUse,
- Set aFeaturePermissibleValuesSet) {
+ Set<? extends Object> aFeaturePermissibleValuesSet) {
featureName = aFeatureName;
featureValueClass = aFeatureValueClass;
featureValue = aFeatureValue;
featureUse = aFeatureUse;
- featurePermissibleValuesSet = aFeaturePermissibleValuesSet;
+ featurePermissibleValuesSet = (Set<Object>)aFeaturePermissibleValuesSet;
}
/** Tests whether the values are an enumeration or not. */
@@ -83,7 +84,7 @@
}
/** Returns the permissible values as a Set */
- public Set getPermittedValues() {
+ public Set<Object> getPermittedValues() {
return featurePermissibleValuesSet;
}// getPermissibleValues()
@@ -93,7 +94,7 @@
* the feature value is the same as the the elements of the given set.
* Returns true if the set has been assigned.
*/
- public boolean setPermissibleValues(Set aPermisibleValuesSet) {
+ public boolean setPermissibleValues(Set<? extends Object>
aPermisibleValuesSet) {
featurePermissibleValuesSet.clear();
return featurePermissibleValuesSet.addAll(aPermisibleValuesSet);
}// setPermissibleValues()
@@ -110,7 +111,7 @@
if(obj == null) return false;
if(!obj.getClass().getName().equals(featureValueClass.getName())) return
false;
if(featurePermissibleValuesSet == null)
- featurePermissibleValuesSet = new HashSet();
+ featurePermissibleValuesSet = new HashSet<Object>();
return featurePermissibleValuesSet.add(obj);
}// addPermissibleValue()
@@ -122,7 +123,7 @@
* in XSchema
* @return a String containing the XSchema representation
*/
- public String toXSchema(Map aJava2XSchemaMap) {
+ public String toXSchema(Map<Class<?>,String> aJava2XSchemaMap) {
StringBuffer schemaString = new StringBuffer();
schemaString.append(" <attribute name=\"" + featureName + "\" ");
@@ -132,17 +133,17 @@
// be specified as an attribute for the attribute element
if(!isEnumeration())
schemaString.append(" type=\""
- + (String)aJava2XSchemaMap.get(featureValueClass) + "\"/>\n");
+ + aJava2XSchemaMap.get(featureValueClass) + "\"/>\n");
else {
schemaString.append(">\n <simpleType>\n");
schemaString.append(" <restriction base=\""
- + (String)aJava2XSchemaMap.get(featureValueClass) + "\">\n");
- Iterator featurePermissibleValuesSetIterator =
featurePermissibleValuesSet
+ + aJava2XSchemaMap.get(featureValueClass) + "\">\n");
+ Iterator<Object> featurePermissibleValuesSetIterator =
featurePermissibleValuesSet
.iterator();
while(featurePermissibleValuesSetIterator.hasNext()) {
- String featurePermissibleValue =
(String)featurePermissibleValuesSetIterator
- .next();
+ String featurePermissibleValue = featurePermissibleValuesSetIterator
+ .next().toString();
schemaString.append(" <enumeration value=\""
+ featurePermissibleValue + "\"/>\n");
}// end while
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works.
Faster operations. Version large binaries. Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs