ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tm...@apache.org
Subject svn commit: r1587981 - /ctakes/trunk/ctakes-core/src/main/java/org/apache/ctakes/core/ae/CDASegmentAnnotator.java
Date Wed, 16 Apr 2014 17:00:46 GMT
Author: tmill
Date: Wed Apr 16 17:00:45 2014
New Revision: 1587981

URL: http://svn.apache.org/r1587981
Log:
CTAKES-197: Updates for java 7 to remove warnings.

Modified:
    ctakes/trunk/ctakes-core/src/main/java/org/apache/ctakes/core/ae/CDASegmentAnnotator.java

Modified: ctakes/trunk/ctakes-core/src/main/java/org/apache/ctakes/core/ae/CDASegmentAnnotator.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-core/src/main/java/org/apache/ctakes/core/ae/CDASegmentAnnotator.java?rev=1587981&r1=1587980&r2=1587981&view=diff
==============================================================================
--- ctakes/trunk/ctakes-core/src/main/java/org/apache/ctakes/core/ae/CDASegmentAnnotator.java
(original)
+++ ctakes/trunk/ctakes-core/src/main/java/org/apache/ctakes/core/ae/CDASegmentAnnotator.java
Wed Apr 16 17:00:45 2014
@@ -49,8 +49,8 @@ import org.uimafit.descriptor.Configurat
 public class CDASegmentAnnotator extends JCasAnnotator_ImplBase {
 
 	Logger logger = Logger.getLogger(this.getClass());
-	protected static HashMap<String, Pattern> patterns = new HashMap<String, Pattern>();
-	protected static HashMap<String, String> section_names = new HashMap<String, String>();
+	protected static HashMap<String, Pattern> patterns = new HashMap<>();
+	protected static HashMap<String, String> section_names = new HashMap<>();
 	protected static final String DEFAULT_SECTION_FILE_NAME = "org/apache/ctakes/core/sections/ccda_sections.txt";
 	public static final String PARAM_FIELD_SEPERATOR = ",";
 	public static final String PARAM_COMMENT = "#";
@@ -64,7 +64,8 @@ public class CDASegmentAnnotator extends
 	 * Init and load the sections mapping file and precompile the regex matches
 	 * into a hashmap
 	 */
-	public void initialize(UimaContext aContext)
+	@Override
+  public void initialize(UimaContext aContext)
 			throws ResourceInitializationException {
 		super.initialize(aContext);
 		String sectionFile = null;
@@ -132,13 +133,14 @@ public class CDASegmentAnnotator extends
 		return p;
 	}
 
-	public void process(JCas jCas) throws AnalysisEngineProcessException {
+	@Override
+  public void process(JCas jCas) throws AnalysisEngineProcessException {
 		String text = jCas.getDocumentText();
 		if (text == null) {
 			String docId = DocumentIDAnnotationUtil.getDocumentID(jCas);
 			logger.info("text is null for docId=" + docId);
 		} else {
-			ArrayList<Segment> sorted_segments = new ArrayList<Segment>();
+			ArrayList<Segment> sorted_segments = new ArrayList<>();
 			for (String id : patterns.keySet()) {
 				Pattern p = patterns.get(id);
 				// System.out.println("Pattern" + p);



Mime
View raw message