@@ -0,0 +1,2750 @@
+/*%0A * Licensed to the Apache Software Foundation (ASF) under one%0A * or more contributor license agreements.  See the NOTICE file%0A * distributed with this work for additional information%0A * regarding copyright ownership.  The ASF licenses this file%0A * to you under the Apache License, Version 2.0 (the%0A * %22License%22); you may not use this file except in compliance%0A * with the License.  You may obtain a copy of the License at%0A * %0A *   http://www.apache.org/licenses/LICENSE-2.0%0A * %0A * Unless required by applicable law or agreed to in writing,%0A * software distributed under the License is distributed on an%0A * %22AS IS%22 BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY%0A * KIND, either express or implied.  See the License for the%0A * specific language governing permissions and limitations%0A * under the License.%0A */%0A%0Apackage fr.univnantes.lina.uima.common;%0A%0A%0Aimport org.apache.uima.analysis_component.JCasAnnotator_ImplBase;%0Aimport org.apache.uima.analysis_engine.AnalysisEngineProcessException;%0Aimport org.apache.uima.jcas.JCas;%0Aimport fr.univnantes.lina.java.util.JavaUtilities;%0A%0A/**%0A * Do nothing%0A */%0Apublic class NullProcessAE extends JCasAnnotator_ImplBase %7B%0A%0A%09/*%0A%09 * PARAMETERS NAMES%0A%09 */%0A%0A%09/**%0A%09 * Name of the Parameter%0A%09 */%0A%09//public static final String PARAM_STRING_ARRAY = %22StringArrayParameterName%22;%0A%0A%09/*%0A%09 * DEFAULT VALUES%0A%09 */%0A%09/**%0A%09 * Name of the default value%0A%09 */%0A%09// public static final String DEFAULT_ = %22%22%0A%0A%09/*%0A%09 * LOCAL VARIABLES%0A%09 */%0A%09private String%5B%5D aStringArray;%0A%0A%0A%0A%09/*%0A%09 * ACCESSORS%0A%09 */%0A%0A%0A%09/*%0A%09 * METHODS %0A%09 */%0A%0A%0A%09/**%0A%09 * Parameter settings and checking%0A%09 * %0A%09 */%0A%09//public void initialize(UimaContext context) throws ResourceInitializationException %7B%0A%09%09//aStringArray = (String%5B%5D) aContext.getConfigParameterValue(PARAM_STRING_ARRAY);%0A%0A%09%09//if (aStringArray == null) %7B%0A%09%09//String errmsg = %22The parameter %22+ PARAM_STRING_ARRAY+%22 cannot be empty, please enter a valid value%22;%0A%09%09//throw new ResourceInitializationException(errmsg, new Object%5B%5D %7B%7D);%0A%09%09//%7D%0A%09//%7D%0A%0A%09/**%0A%09 * Main processing method%0A%09 * %0A%09 */%0A%09public void process(JCas aJCas) throws AnalysisEngineProcessException %7B%0A%0A%09%09System.err.println(%22INFO: %22+this.getClass().getName()+%22 starts and ends at %22 + JavaUtilities.now());%0A%09%09%0A//%09%09try %7B%0A//%09%09%09csvData = (new CSVParser(new StringReader(JCasSofaViewUtils.getSofaDataString(inputViewJCas)), %0A//%09%09%09%09%09new CSVStrategy(separatorCharacter,valueEncapsulatorCharacter,commentStartingCharacter))).getAllValues();%0A//%09%09%7D catch (IOException e) %7B%0A//%09%09%09String errmsg = %22Problem to CSV parse the JCAS. Check the sofaDataString of the jcas view %22+ inputViewJCas.getViewName() +%22 ; %22 +%0A//%09%09%09%22%3C and the commentStartingCharacter %3E%22+commentStartingCharacter+%22%3C%22 ;%0A//%09%09%09throw new AnalysisEngineProcessException(errmsg, new Object%5B%5D %7B%7D);%0A//%09%09%7D%0A%09%7D%0A%0A%0A%0A%7D%0A

move from uima-connectors to uima-common