You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by re...@apache.org on 2020/09/15 21:07:45 UTC
[uima-uimaj] 01/01: [UIMA-3484] Fix JavaDoc issues
This is an automated email from the ASF dual-hosted git repository.
rec pushed a commit to branch UIMA-3484-Fix-JavaDoc
in repository https://gitbox.apache.org/repos/asf/uima-uimaj.git
commit bbec5c48ebdae4f69ac386fa0d88aa2653bb0a17
Author: Richard Eckart de Castilho <re...@apache.org>
AuthorDate: Tue Sep 15 23:07:41 2020 +0200
[UIMA-3484] Fix JavaDoc issues
- First bunch of JavaDoc warnings fixed
- Adds the "public abstract FloatArray getFloatArray0L();" method to the JCas interface which was previously not present due to a missing JavaDoc closing marker
---
.../org/apache/vinci/transport/BaseClient.java | 4 +-
.../org/apache/vinci/transport/VinciServer.java | 1 -
.../vinci/VinciAnalysisEngineServiceStub.java | 27 ++++---
.../vinci/VinciAnalysisEngineService_impl.java | 11 ++-
.../src/main/java/org/apache/uima/cas/FSIndex.java | 3 +-
.../src/main/java/org/apache/uima/jcas/JCas.java | 4 +
.../collection/impl/cpm/engine/ProcessingUnit.java | 7 +-
.../collection/impl/cpm/utils/ChunkMetadata.java | 3 -
.../collection/impl/cpm/vinci/DATACasUtils.java | 67 ----------------
.../uima/collection/impl/cpm/vinci/Vinci.java | 13 ++--
.../impl/metadata/cpe/CasProcessorCpeObject.java | 52 ++++++++++---
.../impl/metadata/cpe/CpeCasProcessorsImpl.java | 23 ++++++
.../impl/metadata/cpe/CpeCheckpointImpl.java | 28 ++++---
.../cpe/CpeCollectionReaderCasInitializerImpl.java | 17 ++---
.../uima/caseditor/ide/CasEditorIdePlugin.java | 11 +--
.../uima/taeconfigurator/editors/ui/Utility.java | 88 ++++++++++++----------
.../apache/uima/ep_launcher/LauncherPlugin.java | 19 +++--
.../uima/pear/insd/edit/INSDComponentPage.java | 61 +++++++++------
.../edit/vars/AbstractVarValViewerHandler.java | 33 ++++----
.../uima/pear/insd/edit/vars/VarValList.java | 42 +++++------
.../org/apache/uima/examples/cpe/SimpleRunCPE.java | 21 ++++--
.../uima/examples/xmi/Ecore2UimaTypeSystem.java | 16 ++--
.../apache/uima/tools/AnnotationViewerMain.java | 20 +++--
.../src/main/java/org/apache/uima/tools/RunAE.java | 22 ++++--
.../java/org/apache/uima/tools/cvd/MainFrame.java | 10 ++-
.../uima/tools/cvd/MultiAnnotViewerFrame.java | 14 ----
.../uima/tools/cvd/control/IndexPopupListener.java | 5 +-
.../tools/cvd/control/ShowTypesystemHandler.java | 4 +-
.../uima/tools/cvd/tsview/FeatureTableModel.java | 13 +---
.../apache/uima/tools/cvd/tsview/MainFrame.java | 18 +----
.../uima/tools/docanalyzer/DocumentAnalyzer.java | 73 ++++++++++++------
.../apache/uima/tools/stylemap/StyleMapEditor.java | 66 ++++++++++------
.../uima/tools/util/gui/SpringUtilities.java | 1 +
33 files changed, 431 insertions(+), 366 deletions(-)
diff --git a/jVinci/src/main/java/org/apache/vinci/transport/BaseClient.java b/jVinci/src/main/java/org/apache/vinci/transport/BaseClient.java
index 591cb5f..0a078e7 100644
--- a/jVinci/src/main/java/org/apache/vinci/transport/BaseClient.java
+++ b/jVinci/src/main/java/org/apache/vinci/transport/BaseClient.java
@@ -415,12 +415,10 @@ public class BaseClient {
* case where return result is known to be VinciFrame (eliminates the need for casting in the
* typical usage case).
*
- * @return A VinciFrame representing the service result.
- *
* @pre query != null
* @pre getHost() != null
* @param query -
- * @return -
+ * @return A VinciFrame representing the service result.
* @throws IOException -
* @throws ServiceException -
*/
diff --git a/jVinci/src/main/java/org/apache/vinci/transport/VinciServer.java b/jVinci/src/main/java/org/apache/vinci/transport/VinciServer.java
index 2f36272..10c3c78 100644
--- a/jVinci/src/main/java/org/apache/vinci/transport/VinciServer.java
+++ b/jVinci/src/main/java/org/apache/vinci/transport/VinciServer.java
@@ -268,7 +268,6 @@ public class VinciServer extends BaseServer {
* @param shutdown_message
* Should be used to pass a message explaining the shutdown, or in the future it may also
* include authentication information for password-protected shutdown.
- * @param shutdown_message -
* @return -
*/
public static Transportable createShutdownCommand(String shutdown_message) {
diff --git a/uimaj-adapter-vinci/src/main/java/org/apache/uima/adapter/vinci/VinciAnalysisEngineServiceStub.java b/uimaj-adapter-vinci/src/main/java/org/apache/uima/adapter/vinci/VinciAnalysisEngineServiceStub.java
index ac2c91a..20c49d5 100644
--- a/uimaj-adapter-vinci/src/main/java/org/apache/uima/adapter/vinci/VinciAnalysisEngineServiceStub.java
+++ b/uimaj-adapter-vinci/src/main/java/org/apache/uima/adapter/vinci/VinciAnalysisEngineServiceStub.java
@@ -98,13 +98,15 @@ public class VinciAnalysisEngineServiceStub implements AnalysisEngineServiceStub
}
if (vnsHost == null) {
vnsHost = System.getProperty("VNS_HOST");
- if (vnsHost == null)
- vnsHost = Constants.DEFAULT_VNS_HOST;
+ if (vnsHost == null) {
+ vnsHost = Constants.DEFAULT_VNS_HOST;
+ }
}
if (vnsPort == null) {
vnsPort = System.getProperty("VNS_PORT");
- if (vnsPort == null)
- vnsPort = "9000";
+ if (vnsPort == null) {
+ vnsPort = "9000";
+ }
}
vctx.setVNSHost(vnsHost);
vctx.setVNSPort(Integer.parseInt(vnsPort));
@@ -145,7 +147,8 @@ public class VinciAnalysisEngineServiceStub implements AnalysisEngineServiceStub
* @see ResourceServiceStub#callGetMetaData()
* @return -
*/
- public ResourceMetaData callGetMetaData() throws ResourceServiceException {
+ @Override
+public ResourceMetaData callGetMetaData() throws ResourceServiceException {
try {
// create Vinci Frame
VinciFrame queryFrame = new VinciFrame();
@@ -197,11 +200,13 @@ public class VinciAnalysisEngineServiceStub implements AnalysisEngineServiceStub
* @param aCAS theCAS
* @throws ResourceServiceException the resource service exception
*/
- public void callProcess(CAS aCAS) throws ResourceServiceException {
+ @Override
+public void callProcess(CAS aCAS) throws ResourceServiceException {
doProcess(aCAS);
}
/**
+ * @param aCAS -
* @see CasObjectProcessor#processCas(CAS)
* @throws ResourceServiceException -
*/
@@ -221,6 +226,7 @@ public class VinciAnalysisEngineServiceStub implements AnalysisEngineServiceStub
query.setCommand("Annotate");
mVinciClient.sendAndReceive(query, new TransportableFactory() {
+ @Override
public Transportable makeTransportable() {
// query.ignoreResponse = true; // TESTING
return query;
@@ -243,14 +249,16 @@ public class VinciAnalysisEngineServiceStub implements AnalysisEngineServiceStub
/**
* @see ResourceServiceStub#destroy()
*/
- public void destroy() {
+ @Override
+public void destroy() {
mVinciClient.close();
}
/**
* @see CasObjectProcessor#batchProcessComplete(org.apache.uima.util.ProcessTrace)
*/
- public void callBatchProcessComplete() throws ResourceServiceException {
+ @Override
+public void callBatchProcessComplete() throws ResourceServiceException {
try {
// create Vinci Frame ( Data Cargo)
AFrame queryFrame = new AFrame();
@@ -266,7 +274,8 @@ public class VinciAnalysisEngineServiceStub implements AnalysisEngineServiceStub
/**
* @see CasObjectProcessor#collectionProcessComplete(org.apache.uima.util.ProcessTrace)
*/
- public void callCollectionProcessComplete() throws ResourceServiceException {
+ @Override
+public void callCollectionProcessComplete() throws ResourceServiceException {
try {
// create Vinci Frame ( Data Cargo)
AFrame queryFrame = new AFrame();
diff --git a/uimaj-adapter-vinci/src/main/java/org/apache/uima/adapter/vinci/VinciAnalysisEngineService_impl.java b/uimaj-adapter-vinci/src/main/java/org/apache/uima/adapter/vinci/VinciAnalysisEngineService_impl.java
index 2a197a7..fb81e09 100644
--- a/uimaj-adapter-vinci/src/main/java/org/apache/uima/adapter/vinci/VinciAnalysisEngineService_impl.java
+++ b/uimaj-adapter-vinci/src/main/java/org/apache/uima/adapter/vinci/VinciAnalysisEngineService_impl.java
@@ -132,6 +132,7 @@ public class VinciAnalysisEngineService_impl extends VinciServableAdapter {
* Instantiate Analysis Engine service from a given descriptor.
*
* @param serviceConfigPath descriptor location
+ * @throws Exception -
*/
public VinciAnalysisEngineService_impl(String serviceConfigPath) throws Exception {
this(serviceConfigPath, false);
@@ -141,8 +142,7 @@ public class VinciAnalysisEngineService_impl extends VinciServableAdapter {
* Extracts AE metadata
*
* @return Frame containing extracted meta data
- * @exception when
- * there is a failure processing
+ * @throws Exception when there is a failure processing
*/
private Frame getMetaData() throws Exception {
UIMAFramework.getLogger().log(Level.FINEST, "VinciAnalysisEngineService.getMetaData()");
@@ -216,7 +216,8 @@ public class VinciAnalysisEngineService_impl extends VinciServableAdapter {
* performing the service
*/
- public Transportable eval(Transportable doc) throws ServiceException {
+ @Override
+public Transportable eval(Transportable doc) throws ServiceException {
try {
CASTransportable ct = (CASTransportable) doc;
String op = ct.getCommand();
@@ -396,6 +397,7 @@ public class VinciAnalysisEngineService_impl extends VinciServableAdapter {
server = instance;
}
+ @Override
public void run() {
server.stop();
}
@@ -404,7 +406,8 @@ public class VinciAnalysisEngineService_impl extends VinciServableAdapter {
/**
* @see org.apache.vinci.transport.TransportableFactory#makeTransportable()
*/
- public synchronized Transportable makeTransportable() {
+ @Override
+public synchronized Transportable makeTransportable() {
return new CASTransportable(mCasPool, new OutOfTypeSystemData(), null, false);
}
diff --git a/uimaj-core/src/main/java/org/apache/uima/cas/FSIndex.java b/uimaj-core/src/main/java/org/apache/uima/cas/FSIndex.java
index cae79a2..4838f1d 100644
--- a/uimaj-core/src/main/java/org/apache/uima/cas/FSIndex.java
+++ b/uimaj-core/src/main/java/org/apache/uima/cas/FSIndex.java
@@ -62,8 +62,7 @@ package org.apache.uima.cas;
* Indexes have a top-most type, either the top of the type hierarchy, or some subtype of that.
* The top-most type in an index is represented by the generic T.
*
- * @param T the topmost type in this Index
- *
+ * @param <T> the topmost type in this Index
*/
public interface FSIndex<T extends FeatureStructure> extends Iterable<T> {
diff --git a/uimaj-core/src/main/java/org/apache/uima/jcas/JCas.java b/uimaj-core/src/main/java/org/apache/uima/jcas/JCas.java
index eef350c..050e524 100644
--- a/uimaj-core/src/main/java/org/apache/uima/jcas/JCas.java
+++ b/uimaj-core/src/main/java/org/apache/uima/jcas/JCas.java
@@ -46,6 +46,7 @@ import org.apache.uima.cas.impl.LowLevelCAS;
import org.apache.uima.cas.impl.LowLevelIndexRepository;
import org.apache.uima.cas.text.AnnotationIndex;
import org.apache.uima.jcas.cas.FSArray;
+import org.apache.uima.jcas.cas.FloatArray;
import org.apache.uima.jcas.cas.IntegerArray;
import org.apache.uima.jcas.cas.Sofa;
import org.apache.uima.jcas.cas.StringArray;
@@ -250,6 +251,7 @@ public interface JCas extends AbstractCas {
* avoid creating multiple copies of it. All uses can use the same value because it is not
* updatable (it has no subfields). This is initialized lazily on first reference, and reset when
* the CAS is reset.
+ *
* @return 0-length instance of an IntegerArray
*/
public abstract IntegerArray getIntegerArray0L();
@@ -260,6 +262,7 @@ public interface JCas extends AbstractCas {
* updatable (it has no subfields). This is initialized lazily on first reference, and reset when
* the CAS is reset.
* @return 0-length instance of a FloatArray
+ */
public abstract FloatArray getFloatArray0L();
/**
@@ -267,6 +270,7 @@ public interface JCas extends AbstractCas {
* avoid creating multiple copies of it. All uses can use the same value because it is not
* updatable (it has no subfields). This is initialized lazily on first reference, and reset when
* the CAS is reset.
+ *
* @return 0-length instance of a FSArray
*/
public abstract FSArray getFSArray0L();
diff --git a/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/cpm/engine/ProcessingUnit.java b/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/cpm/engine/ProcessingUnit.java
index 465385b..2a86345 100644
--- a/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/cpm/engine/ProcessingUnit.java
+++ b/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/cpm/engine/ProcessingUnit.java
@@ -477,7 +477,8 @@ public class ProcessingUnit extends Thread {
* configured Work Queue. Once the CAS arrives, it is removed from the queue and sent through the
* analysis pipeline.
*/
- public void run() {
+ @Override
+public void run() {
if (!cpm.isRunning()) {
UIMAFramework.getLogger(this.getClass()).logrb(Level.WARNING, this.getClass().getName(),
@@ -1782,6 +1783,7 @@ public class ProcessingUnit extends Thread {
}
/**
+ * @param aStatus -
* @return true if the CASProcessor status is available for processing
*/
protected boolean isProcessorReady(int aStatus) {
@@ -1795,8 +1797,7 @@ public class ProcessingUnit extends Thread {
/**
* Returns the size of the CAS object. Currently only CASData is supported.
*
- * @param aCas -
- * Cas to get the size for
+ * @param aCas CAS to get the size for
*
* @return the size of the CAS object. Currently only CASData is supported.
*/
diff --git a/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/cpm/utils/ChunkMetadata.java b/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/cpm/utils/ChunkMetadata.java
index d7a4c51..30dc714 100644
--- a/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/cpm/utils/ChunkMetadata.java
+++ b/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/cpm/utils/ChunkMetadata.java
@@ -84,9 +84,6 @@ public class ChunkMetadata {
return timedOut;
}
- /**
- * @param b
- */
public void setTimedOut(boolean b) {
timedOut = b;
}
diff --git a/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/cpm/vinci/DATACasUtils.java b/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/cpm/vinci/DATACasUtils.java
index b2e4ad6..3dc6f88 100644
--- a/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/cpm/vinci/DATACasUtils.java
+++ b/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/cpm/vinci/DATACasUtils.java
@@ -57,13 +57,6 @@ public class DATACasUtils {
return new String(baos.toByteArray());
}
- /**
- *
- * @param dataCas -
- * @param featureType -
- * @param featureName -
- * @param featureValue -
- */
public static void addFeatureStructure(CasData dataCas, String featureType, String featureName,
String featureValue) {
FeatureStructure vfs = new FeatureStructureImpl();
@@ -86,13 +79,6 @@ public class DATACasUtils {
return false;
}
- /**
- *
- * @param dataCas -
- * @param featureType -
- * @param featureName -
- * @param featureValue -
- */
public static void addFeature(CasData dataCas, String featureType, String featureName,
String featureValue) {
Iterator it = dataCas.getFeatureStructures();
@@ -199,12 +185,6 @@ public class DATACasUtils {
return false;
}
- /**
- *
- * @param aKey -
- * @param typeList -
- * @return true if tbd
- */
public static boolean isValidType(String aKey, String[] typeList) {
if (aKey.indexOf(org.apache.uima.collection.impl.cpm.Constants.SHORT_DASH_TERM) > -1) {
@@ -226,12 +206,6 @@ public class DATACasUtils {
return false;
}
- /**
- *
- * @param aCAS -
- * @param featureName -
- * @return true if
- */
public static boolean hasFeature(CasData aCAS, String featureName) {
Iterator it = aCAS.getFeatureStructures();
while (it.hasNext()) {
@@ -247,12 +221,6 @@ public class DATACasUtils {
return false;
}
- /**
- *
- * @param aCAS -
- * @param aName -
- * @return true if tbd
- */
public static boolean hasFeatureStructure(CasData aCAS, String aName) {
Iterator it = aCAS.getFeatureStructures();
while (it.hasNext()) {
@@ -269,10 +237,6 @@ public class DATACasUtils {
return false;
}
- /**
- *
- * @param aCAS -
- */
public static void dumpFeatures(CasData aCAS) {
Iterator it = aCAS.getFeatureStructures();
while (it.hasNext()) {
@@ -308,12 +272,6 @@ public class DATACasUtils {
}
- /**
- *
- * @param aCAS -
- * @param featureName -
- * @return true if tbd
- */
public static String getFeatureValueByType(CasData aCAS, String featureName) {
Iterator it = aCAS.getFeatureStructures();
String featureValue = null;
@@ -364,13 +322,6 @@ public class DATACasUtils {
return featureValue;
}
- /**
- *
- * @param aCAS
- * @param featureStructureName
- * @param featureName
- * @return tbd
- */
public static String[] getFeatureStructureValues(CasData aCAS, String featureStructureName,
String featureName) {
Iterator it = aCAS.getFeatureStructures();
@@ -400,13 +351,6 @@ public class DATACasUtils {
return features;
}
- /**
- *
- * @param aCAS
- * @param aFeatureStructure
- * @param featureName
- * @return tbd
- */
public static String getFeatureValueByType(CasData aCAS, String aFeatureStructure,
String featureName) {
Iterator it = aCAS.getFeatureStructures();
@@ -429,11 +373,6 @@ public class DATACasUtils {
return featureValue;
}
- /**
- *
- * @param aDataCas
- * @param aFeatureMap
- */
public static void remapFeatureTypes(CasData aDataCas, FeatureMap aFeatureMap) {
ConfigurableFeature cf = null;
@@ -459,12 +398,6 @@ public class DATACasUtils {
}
}
- /**
- *
- * @param aCasData
- * @param aFeatureStructureName
- * @return tbd
- */
public static NameValuePair[] getCasDataFeatures(CasData aCasData, String aFeatureStructureName) {
NameValuePair[] valuePairSet = null;
Iterator it = aCasData.getFeatureStructures();
diff --git a/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/cpm/vinci/Vinci.java b/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/cpm/vinci/Vinci.java
index ab60967..9580852 100644
--- a/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/cpm/vinci/Vinci.java
+++ b/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/cpm/vinci/Vinci.java
@@ -39,6 +39,7 @@ public class Vinci {
public static final String VNS_PORT = "VNS_PORT";
public static class AFFactory implements TransportableFactory {
+ @Override
public Transportable makeTransportable() {
return new AFrame();
}
@@ -88,9 +89,10 @@ public class Vinci {
*
* @param conn the connection
* @param requestFrame {@link org.apache.vinci.transport.VinciFrame}
- * containing result of thsi service operation
+ * containing result of this service operation
*
* @return {@link org.apache.vinci.transport.VinciFrame} VinciData frame.
+ * @throws Exception -
*/
public static AFrame replyWithAnalysis(VinciClient conn, VinciFrame requestFrame)
throws Exception {
@@ -114,8 +116,9 @@ public class Vinci {
public static String extractKEYSAsString(AFrame frame) {
String keys = "";
- if (frame == null)
- return keys;
+ if (frame == null) {
+ return keys;
+ }
String frameAsString = frame.toXML();
if (frameAsString.indexOf("KEYS") > -1 && frameAsString.indexOf("</KEYS>") > -1) {
@@ -156,8 +159,8 @@ public class Vinci {
}
/**
- * Returns a content from a given VinciFrame.
- *
+ * @param aFrame -
+ * @return a content from a given VinciFrame.
*/
public static String stripVinciFrame(VinciFrame aFrame) {
String contentFrame = aFrame.toXML();
diff --git a/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/metadata/cpe/CasProcessorCpeObject.java b/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/metadata/cpe/CasProcessorCpeObject.java
index c7ac970..4fc4585 100644
--- a/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/metadata/cpe/CasProcessorCpeObject.java
+++ b/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/metadata/cpe/CasProcessorCpeObject.java
@@ -121,6 +121,7 @@ public class CasProcessorCpeObject extends MetaDataObject_impl implements CpeCas
*
* @return String - deployment type
*/
+ @Override
public String getDeployment() {
return deployment;
}
@@ -132,6 +133,7 @@ public class CasProcessorCpeObject extends MetaDataObject_impl implements CpeCas
* path to the descriptor
* @throws CpeDescriptorException tbd
*/
+ @Override
public void setDescriptor(String aDescriptorPath) throws CpeDescriptorException {
if (descriptor == null) {
CpeComponentDescriptor comp_desc = CpeDescriptorFactory
@@ -149,6 +151,7 @@ public class CasProcessorCpeObject extends MetaDataObject_impl implements CpeCas
* @deprecated Doesn't support the new import syntax. Use getCpeComponentDescriptor().findAbsoluteUrl() instead.
*/
+ @Override
@Deprecated
public String getDescriptor() {
if (descriptor != null && descriptor.getInclude() != null) {
@@ -163,6 +166,7 @@ public String getDescriptor() {
*
* @return {@link CpeComponentDescriptor} instance
*/
+ @Override
public CpeComponentDescriptor getCpeComponentDescriptor() {
return descriptor;
}
@@ -174,6 +178,7 @@ public String getDescriptor() {
* @param aFilterExpression -
* String containing a filter
*/
+ @Override
public void setCasProcessorFilter(String aFilterExpression) {
if (filter == null) {
filter = CpeDescriptorFactory.produceCasProcessorFilter("");
@@ -186,6 +191,7 @@ public String getDescriptor() {
*
* @return String - a filter string
*/
+ @Override
public String getCasProcessorFilter() {
if (getFilter() == null || getFilter().getFilterString() == null) {
@@ -250,6 +256,7 @@ public String getDescriptor() {
* @param aBatchSize -
* batch size of this CasProcessor
*/
+ @Override
public void setBatchSize(int aBatchSize) {
checkpoint.setBatchSize(aBatchSize);
}
@@ -259,6 +266,7 @@ public String getDescriptor() {
*
* @return - batch size as int, 0 if not defined.
*/
+ @Override
public int getBatchSize() {
return checkpoint.getBatchSize();
}
@@ -297,6 +305,7 @@ public String getDescriptor() {
*
* @throws CpeDescriptorException tbd
*/
+ @Override
public void addDeployParam(String aParamName, String aParamValue) throws CpeDescriptorException {
boolean found = false;
@@ -314,11 +323,6 @@ public String getDescriptor() {
}
}
- /**
- *
- * @param aParams
- * @throws CpeDescriptorException tbd
- */
protected void setDeploymentParams(CasProcessorDeploymentParams aParams)
throws CpeDescriptorException {
deploymentParameters = aParams;
@@ -330,6 +334,7 @@ public String getDescriptor() {
* @return the deployment parameters
* @see org.apache.uima.collection.metadata.CasProcessorDeploymentParams instance
*/
+ @Override
public CasProcessorDeploymentParams getDeploymentParams() {
return deploymentParameters;
}
@@ -342,6 +347,7 @@ public String getDescriptor() {
*
* @throws CpeDescriptorException tbd
*/
+ @Override
public void setName(String aName) throws CpeDescriptorException {
if (aName == null || aName.trim().length() == 0) {
@@ -358,15 +364,12 @@ public String getDescriptor() {
* @return - CasProcessor name as string, null if name undefined
*
*/
+ @Override
public String getName() {
return name;
}
- /**
- * @deprecated
- * @param aSoFa
- * @throws CpeDescriptorException tbd
- */
+ @Override
@Deprecated
public void setSOFA(String aSoFa) throws CpeDescriptorException {
// if (casProcessor != null )
@@ -379,6 +382,7 @@ public void setSOFA(String aSoFa) throws CpeDescriptorException {
* @deprecated (non-Javadoc)
* @see org.apache.uima.collection.metadata.CpeCasProcessor#getSOFA()
*/
+ @Override
@Deprecated
public String getSOFA() {
@@ -394,6 +398,7 @@ public String getSOFA() {
*
* @see org.apache.uima.collection.metadata.CpeCasProcessor#setDescriptorPath(java.lang.String)
*/
+ @Override
public void setCpeComponentDescriptor(CpeComponentDescriptor aDescriptor)
throws CpeDescriptorException {
descriptor = aDescriptor;
@@ -418,6 +423,7 @@ public String getSOFA() {
*
* @see org.apache.uima.collection.metadata.CpeCasProcessor#getErrorHandling()
*/
+ @Override
public CasProcessorErrorHandling getErrorHandling() {
return errorHandling;
}
@@ -431,6 +437,7 @@ public String getSOFA() {
* @param aErrorCount -
* max error tolerance
*/
+ @Override
public void setMaxErrorCount(int aErrorCount) {
CasProcessorErrorHandling eh = getErrorHandling();
if (eh != null && eh.getErrorRateThreshold() != null) {
@@ -446,6 +453,7 @@ public String getSOFA() {
*
* @return max error tolerance
*/
+ @Override
public int getMaxErrorCount() {
CasProcessorErrorHandling eh = getErrorHandling();
@@ -465,6 +473,7 @@ public String getSOFA() {
* @param aErrorSampleSize -
* max error tolerance
*/
+ @Override
public void setMaxErrorSampleSize(int aErrorSampleSize) {
CasProcessorErrorHandling eh = getErrorHandling();
@@ -481,6 +490,7 @@ public String getSOFA() {
*
* @return - the sample size
*/
+ @Override
public int getMaxErrorSampleSize() {
CasProcessorErrorHandling eh = getErrorHandling();
if (eh != null && eh.getErrorRateThreshold() != null) {
@@ -514,6 +524,7 @@ public String getSOFA() {
* @param aAction -
* action string
*/
+ @Override
public void setActionOnMaxError(String aAction) {
CasProcessorErrorHandling eh = getErrorHandling();
if (eh != null && eh.getErrorRateThreshold() != null) {
@@ -526,6 +537,7 @@ public String getSOFA() {
*
* @return - action as string ( terminate, continue, disable), null when not defined
*/
+ @Override
public String getActionOnMaxError() {
CasProcessorErrorHandling eh = getErrorHandling();
if (eh != null && eh.getErrorRateThreshold() != null) {
@@ -541,6 +553,7 @@ public String getSOFA() {
* @param aAction -
* action string
*/
+ @Override
public void setActionOnMaxRestart(String aAction) {
CasProcessorErrorHandling eh = getErrorHandling();
if (eh != null && eh.getMaxConsecutiveRestarts() != null) {
@@ -553,6 +566,7 @@ public String getSOFA() {
*
* @return - action as string ( terminate, continue, disable), null when not defined
*/
+ @Override
public String getActionOnMaxRestart() {
CasProcessorErrorHandling eh = getErrorHandling();
if (eh != null && eh.getMaxConsecutiveRestarts() != null) {
@@ -567,6 +581,7 @@ public String getSOFA() {
* @param aRestartCount -
* max number of restarts
*/
+ @Override
public void setMaxRestartCount(int aRestartCount) {
CasProcessorErrorHandling eh = getErrorHandling();
if (eh != null && eh.getMaxConsecutiveRestarts() != null) {
@@ -579,6 +594,7 @@ public String getSOFA() {
*
* @return - restart count as int, 0 if not defined
*/
+ @Override
public int getMaxRestartCount() {
CasProcessorErrorHandling eh = getErrorHandling();
if (eh != null && eh.getMaxConsecutiveRestarts() != null) {
@@ -594,6 +610,7 @@ public String getSOFA() {
* @param aTimeoutValue -
* millis to wait for response
*/
+ @Override
public void setTimeout(int aTimeoutValue) {
CasProcessorErrorHandling eh = getErrorHandling();
if (eh != null && eh.getTimeout() != null) {
@@ -606,6 +623,7 @@ public String getSOFA() {
*
* @return - millis, 0 if not defined
*/
+ @Override
public int getTimeout() {
CasProcessorErrorHandling eh = getErrorHandling();
if (eh != null && eh.getTimeout() != null) {
@@ -620,6 +638,7 @@ public String getSOFA() {
* @param settings -
* @throws CpeDescriptorException -
*/
+ @Override
public void setConfigurationParameterSettings(CasProcessorConfigurationParameterSettings settings)
throws CpeDescriptorException {
configurationParameterSettings = settings;
@@ -643,6 +662,7 @@ public String getSOFA() {
/**
* Returns configuration parameter settings for this CasProcessor.
*/
+ @Override
public CasProcessorConfigurationParameterSettings getConfigurationParameterSettings() {
return configurationParameterSettings;
}
@@ -671,8 +691,9 @@ public String getSOFA() {
for (int i = 0; nvp != null && i < nvp.length; i++) {
local.setParameterValue(nvp[i].getName(), nvp[i].getValue());
}
- } else
+ } else {
local = parameterSettings;
+ }
return local;
@@ -716,6 +737,7 @@ public String getSOFA() {
/**
* @return container with configuration info for running CasProcessor in separate process
*/
+ @Override
public CasProcessorRunInSeperateProcess getRunInSeparateProcess() {
return runInSeparateProcess;
}
@@ -747,6 +769,7 @@ public String getSOFA() {
* @see org.apache.uima.resource.metadata.impl.MetaDataObject_impl#buildFromXMLElement(org.w3c.dom.Element,
* org.apache.uima.util.XMLParser, org.apache.uima.util.XMLParser.ParsingOptions)
*/
+ @Override
public void buildFromXMLElement(Element aElement, XMLParser aParser, ParsingOptions aOptions)
throws InvalidXMLException {
super.buildFromXMLElement(aElement, aParser, aOptions);
@@ -768,6 +791,7 @@ public String getSOFA() {
*
* @see org.apache.uima.resource.metadata.impl.MetaDataObject_impl#getXMLAttributes()
*/
+ @Override
protected AttributesImpl getXMLAttributes() {
// TODO Auto-generated method stub
AttributesImpl attrs = super.getXMLAttributes();
@@ -777,6 +801,7 @@ public String getSOFA() {
return attrs;
}
+ @Override
protected XmlizationInfo getXmlizationInfo() {
return XMLIZATION_INFO;
}
@@ -793,6 +818,7 @@ public String getSOFA() {
/**
* @return configuration for a checkpoint
*/
+ @Override
public CpeCheckpoint getCheckpoint() {
return checkpoint;
}
@@ -800,6 +826,7 @@ public String getSOFA() {
/**
* @return sofa name mappings
*/
+ @Override
public CpeSofaMappings getSofaNameMappings() {
return sofaNameMappings;
}
@@ -807,14 +834,17 @@ public String getSOFA() {
/**
* @param mappings sofa name mappings
*/
+ @Override
public void setSofaNameMappings(CpeSofaMappings mappings) {
sofaNameMappings = mappings;
}
+ @Override
public void setIsParallelizable(boolean isP) {
isParallelizable = isP;
}
+ @Override
public boolean getIsParallelizable() {
return isParallelizable;
}
diff --git a/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/metadata/cpe/CpeCasProcessorsImpl.java b/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/metadata/cpe/CpeCasProcessorsImpl.java
index 399324f..c4244a2 100644
--- a/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/metadata/cpe/CpeCasProcessorsImpl.java
+++ b/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/metadata/cpe/CpeCasProcessorsImpl.java
@@ -66,6 +66,7 @@ public class CpeCasProcessorsImpl extends MetaDataObject_impl implements CpeCasP
*
* @see org.apache.uima.collection.metadata.CpeCasProcessors#setOutputQueueSize(int)
*/
+ @Override
public void setOutputQueueSize(int aOutputQueueSize) throws CpeDescriptorException {
outputQueueSize = aOutputQueueSize;
}
@@ -75,6 +76,7 @@ public class CpeCasProcessorsImpl extends MetaDataObject_impl implements CpeCasP
*
* @see org.apache.uima.collection.metadata.CpeCasProcessors#getOutputQueueSize()
*/
+ @Override
public int getOutputQueueSize() {
return outputQueueSize;
}
@@ -84,6 +86,7 @@ public class CpeCasProcessorsImpl extends MetaDataObject_impl implements CpeCasP
*
* @see org.apache.uima.collection.metadata.CpeCasProcessors#setInputQueueSize(int)
*/
+ @Override
public void setInputQueueSize(int aInputQueueSize) throws CpeDescriptorException {
inputQueueSize = aInputQueueSize;
}
@@ -93,6 +96,7 @@ public class CpeCasProcessorsImpl extends MetaDataObject_impl implements CpeCasP
*
* @see org.apache.uima.collection.metadata.CpeCasProcessors#getInputQueueSize()
*/
+ @Override
public int getInputQueueSize() {
return inputQueueSize;
}
@@ -102,6 +106,7 @@ public class CpeCasProcessorsImpl extends MetaDataObject_impl implements CpeCasP
*
* @see org.apache.uima.collection.metadata.CpeCasProcessors#setConcurrentPUCount(int)
*/
+ @Override
public void setConcurrentPUCount(int aConcurrentPUCount) throws CpeDescriptorException {
processingUnitThreadCount = aConcurrentPUCount;
}
@@ -111,6 +116,7 @@ public class CpeCasProcessorsImpl extends MetaDataObject_impl implements CpeCasP
*
* @see org.apache.uima.collection.metadata.CpeCasProcessors#getConcurrentPUCount()
*/
+ @Override
public int getConcurrentPUCount() {
return processingUnitThreadCount;
}
@@ -121,6 +127,7 @@ public class CpeCasProcessorsImpl extends MetaDataObject_impl implements CpeCasP
* @see org.apache.uima.collection.metadata.CpeCasProcessors#addCpeCasProcessor(org.apache.uima.collection.metadata.CpeCasProcessor,
* int)
*/
+ @Override
public void addCpeCasProcessor(CpeCasProcessor aCasProcessor, int aInsertPosition)
throws CpeDescriptorException {
casProcessors.add(aInsertPosition, aCasProcessor);
@@ -132,6 +139,7 @@ public class CpeCasProcessorsImpl extends MetaDataObject_impl implements CpeCasP
* @see org.apache.uima.collection.metadata.CpeCasProcessors#addCpeCasProcessor(org.apache.uima.collection.metadata.CpeCasProcessor,
* int)
*/
+ @Override
public void addCpeCasProcessor(CpeCasProcessor aCasProcessor) throws CpeDescriptorException {
casProcessors.add(aCasProcessor);
}
@@ -141,6 +149,7 @@ public class CpeCasProcessorsImpl extends MetaDataObject_impl implements CpeCasP
*
* @see org.apache.uima.collection.metadata.CpeCasProcessors#getCpeCasProcessor(int)
*/
+ @Override
public CpeCasProcessor getCpeCasProcessor(int aPosition) throws CpeDescriptorException {
if (aPosition <= casProcessors.size()) {
return (CpeCasProcessor) casProcessors.get(aPosition);
@@ -156,6 +165,7 @@ public class CpeCasProcessorsImpl extends MetaDataObject_impl implements CpeCasP
*
* @see org.apache.uima.collection.metadata.CpeCasProcessors#getAllCpeCasProcessors()
*/
+ @Override
public CpeCasProcessor[] getAllCpeCasProcessors() throws CpeDescriptorException {
CpeCasProcessor[] processors = new CpeCasProcessor[casProcessors.size()];
casProcessors.toArray(processors);
@@ -180,6 +190,7 @@ public class CpeCasProcessorsImpl extends MetaDataObject_impl implements CpeCasP
*
* @see org.apache.uima.collection.metadata.CpeCasProcessors#removeCpeCasProcessor(int)
*/
+ @Override
public void removeCpeCasProcessor(int aPosition) throws CpeDescriptorException {
if (aPosition <= casProcessors.size()) {
casProcessors.remove(aPosition);
@@ -193,6 +204,10 @@ public class CpeCasProcessorsImpl extends MetaDataObject_impl implements CpeCasP
/**
* New API 01/06/2006
+ * @param aPosition -
+ * @param flag -
+ * @return -
+ * @throws CpeDescriptorException -
*/
public CpeCasProcessor[] removeCpeCasProcessor(int aPosition, boolean flag)
throws CpeDescriptorException {
@@ -212,6 +227,7 @@ public class CpeCasProcessorsImpl extends MetaDataObject_impl implements CpeCasP
*
* @see org.apache.uima.collection.metadata.CpeCasProcessors#removeAllCpeCasProcessors()
*/
+ @Override
public void removeAllCpeCasProcessors() throws CpeDescriptorException {
casProcessors.clear();
}
@@ -221,6 +237,7 @@ public class CpeCasProcessorsImpl extends MetaDataObject_impl implements CpeCasP
*
* @see org.apache.uima.collection.metadata.CpeCasProcessors#setOutputQueueSize(int)
*/
+ @Override
public void setPoolSize(int aPoolSize) throws CpeDescriptorException {
casPoolSize = aPoolSize;
}
@@ -248,6 +265,7 @@ public class CpeCasProcessorsImpl extends MetaDataObject_impl implements CpeCasP
*
* @see org.apache.uima.collection.metadata.CpeCasProcessors#setOutputQueueSize(int)
*/
+ @Override
public boolean getDropCasOnException() {
return dropCasOnException;
}
@@ -258,6 +276,7 @@ public class CpeCasProcessorsImpl extends MetaDataObject_impl implements CpeCasP
* @see org.apache.uima.resource.metadata.impl.MetaDataObject_impl#buildFromXMLElement(org.w3c.dom.Element,
* org.apache.uima.util.XMLParser, org.apache.uima.util.XMLParser.ParsingOptions)
*/
+ @Override
public void buildFromXMLElement(Element aElement, XMLParser aParser, ParsingOptions aOptions)
throws InvalidXMLException {
try {
@@ -359,6 +378,7 @@ public class CpeCasProcessorsImpl extends MetaDataObject_impl implements CpeCasP
}
}
+ @Override
public void toXML(ContentHandler aContentHandler, boolean aWriteDefaultNamespaceAttribute)
throws SAXException {
XmlizationInfo inf = getXmlizationInfo();
@@ -391,6 +411,7 @@ public class CpeCasProcessorsImpl extends MetaDataObject_impl implements CpeCasP
*
* @see org.apache.uima.resource.metadata.impl.MetaDataObject_impl#getXMLAttributes()
*/
+ @Override
protected AttributesImpl getXMLAttributes() {
AttributesImpl attrs = super.getXMLAttributes();
if (isDropCasOnException() == true) {
@@ -412,6 +433,7 @@ public class CpeCasProcessorsImpl extends MetaDataObject_impl implements CpeCasP
return attrs;
}
+ @Override
protected XmlizationInfo getXmlizationInfo() {
return XMLIZATION_INFO;
}
@@ -419,6 +441,7 @@ public class CpeCasProcessorsImpl extends MetaDataObject_impl implements CpeCasP
static final private XmlizationInfo XMLIZATION_INFO = new XmlizationInfo("casProcessors",
new PropertyXmlInfo[] { new PropertyXmlInfo("allCpeCasProcessors", null), });
+ @Override
public int getCasPoolSize() {
// Indirection needed to handle the exception. xsdbeans based implementation of this API
// was throwing it, if there was a problem. With the current approach this exception never
diff --git a/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/metadata/cpe/CpeCheckpointImpl.java b/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/metadata/cpe/CpeCheckpointImpl.java
index 131038d..535f3d8 100644
--- a/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/metadata/cpe/CpeCheckpointImpl.java
+++ b/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/metadata/cpe/CpeCheckpointImpl.java
@@ -47,6 +47,7 @@ public class CpeCheckpointImpl extends MetaDataObject_impl implements CpeCheckpo
*
* @see org.apache.uima.collection.metadata.CpeCheckpoint#setFilePath(java.lang.String)
*/
+ @Override
public void setFilePath(String aCheckpointFilePath) throws CpeDescriptorException {
file = aCheckpointFilePath;
}
@@ -56,6 +57,7 @@ public class CpeCheckpointImpl extends MetaDataObject_impl implements CpeCheckpo
*
* @see org.apache.uima.collection.metadata.CpeCheckpoint#getFilePath()
*/
+ @Override
public String getFilePath() {
return file;
}
@@ -65,6 +67,7 @@ public class CpeCheckpointImpl extends MetaDataObject_impl implements CpeCheckpo
*
* @see org.apache.uima.collection.metadata.CpeCheckpoint#setFrequency(int, boolean)
*/
+ @Override
public void setFrequency(int aFrequency, boolean aTimeBased) {
time = String.valueOf(aFrequency) + "ms";
}
@@ -76,10 +79,12 @@ public class CpeCheckpointImpl extends MetaDataObject_impl implements CpeCheckpo
int len = ((String) anObject).length();
int i = 0;
for (; i < len; i++) {
- if (Character.isDigit(((String) anObject).charAt(i)))
+ if (Character.isDigit(((String) anObject).charAt(i))) {
continue;
- else
+ }
+ else {
break; // non-digit char
+ }
}
if (i > 0) {
convertedTime = Integer.parseInt(((String) anObject).substring(0, i));
@@ -94,6 +99,7 @@ public class CpeCheckpointImpl extends MetaDataObject_impl implements CpeCheckpo
*
* @see org.apache.uima.collection.metadata.CpeCheckpoint#getFrequency()
*/
+ @Override
public int getFrequency() {
return convert2Number(time);
}
@@ -103,6 +109,7 @@ public class CpeCheckpointImpl extends MetaDataObject_impl implements CpeCheckpo
*
* @see org.apache.uima.collection.metadata.CpeCheckpoint#isTimeBased()
*/
+ @Override
public boolean isTimeBased() {
return true;
}
@@ -112,6 +119,7 @@ public class CpeCheckpointImpl extends MetaDataObject_impl implements CpeCheckpo
*
* @see org.apache.uima.collection.metadata.CpeCheckpoint#setBatchSize(int)
*/
+ @Override
public void setBatchSize(int aBatchSize) {
batch = aBatchSize;
}
@@ -121,6 +129,7 @@ public class CpeCheckpointImpl extends MetaDataObject_impl implements CpeCheckpo
*
* @see org.apache.uima.collection.metadata.CpeCheckpoint#getBatchSize()
*/
+ @Override
public int getBatchSize() {
return batch;
}
@@ -131,6 +140,7 @@ public class CpeCheckpointImpl extends MetaDataObject_impl implements CpeCheckpo
* @see org.apache.uima.resource.metadata.impl.MetaDataObject_impl#buildFromXMLElement(org.w3c.dom.Element,
* org.apache.uima.util.XMLParser, org.apache.uima.util.XMLParser.ParsingOptions)
*/
+ @Override
public void buildFromXMLElement(Element aElement, XMLParser aParser, ParsingOptions aOptions)
throws InvalidXMLException {
setFile(aElement.getAttribute("file"));
@@ -147,6 +157,7 @@ public class CpeCheckpointImpl extends MetaDataObject_impl implements CpeCheckpo
*
* @see org.apache.uima.resource.metadata.impl.MetaDataObject_impl#getXMLAttributes()
*/
+ @Override
protected AttributesImpl getXMLAttributes() {
AttributesImpl attrs = super.getXMLAttributes();
attrs.addAttribute("", "batch", "batch", "CDATA", String.valueOf(getBatch()));
@@ -159,6 +170,7 @@ public class CpeCheckpointImpl extends MetaDataObject_impl implements CpeCheckpo
return attrs;
}
+ @Override
protected XmlizationInfo getXmlizationInfo() {
return XMLIZATION_INFO;
}
@@ -166,7 +178,8 @@ public class CpeCheckpointImpl extends MetaDataObject_impl implements CpeCheckpo
static final private XmlizationInfo XMLIZATION_INFO = new XmlizationInfo("checkpoint",
new PropertyXmlInfo[0]);
- /** METHODS CALLED BY THE PARSER * */
+ // METHODS CALLED BY THE PARSER
+
/**
* @return the batch size
*/
@@ -188,23 +201,14 @@ public class CpeCheckpointImpl extends MetaDataObject_impl implements CpeCheckpo
return time;
}
- /**
- * @param i
- */
public void setBatch(int i) {
batch = i;
}
- /**
- * @param string
- */
public void setFile(String string) {
file = string;
}
- /**
- * @param i
- */
public void setTime(String i) {
time = i;
}
diff --git a/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/metadata/cpe/CpeCollectionReaderCasInitializerImpl.java b/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/metadata/cpe/CpeCollectionReaderCasInitializerImpl.java
index 93bc789..5acde26 100644
--- a/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/metadata/cpe/CpeCollectionReaderCasInitializerImpl.java
+++ b/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/metadata/cpe/CpeCollectionReaderCasInitializerImpl.java
@@ -56,6 +56,7 @@ public class CpeCollectionReaderCasInitializerImpl extends MetaDataObject_impl i
*
* @see org.apache.uima.collection.metadata.CpeCollectionReaderCasInitializer#setDescriptorPath(java.lang.String)
*/
+ @Override
public void setDescriptor(CpeComponentDescriptor aDescriptor) {
descriptor = aDescriptor;
}
@@ -65,6 +66,7 @@ public class CpeCollectionReaderCasInitializerImpl extends MetaDataObject_impl i
*
* @see org.apache.uima.collection.metadata.CpeCollectionReaderCasInitializer#getDescriptorPath()
*/
+ @Override
public CpeComponentDescriptor getDescriptor() {
return descriptor;
}
@@ -74,6 +76,7 @@ public class CpeCollectionReaderCasInitializerImpl extends MetaDataObject_impl i
*
* @return the configuration parameter settings
*/
+ @Override
public CasProcessorConfigurationParameterSettings getConfigurationParameterSettings() {
return cfps;
}
@@ -119,16 +122,14 @@ public class CpeCollectionReaderCasInitializerImpl extends MetaDataObject_impl i
for (int i = 0; nvp != null && i < nvp.length; i++) {
local.setParameterValue(nvp[i].getName(), nvp[i].getValue());
}
- } else
+ } else {
local = configurationParameterSettings;
+ }
return local;
}
- /**
- * @param settings
- */
public void setParameterSettings(ConfigurationParameterSettings settings) {
configurationParameterSettings = settings;
if (configurationParameterSettings != null) {
@@ -137,6 +138,7 @@ public class CpeCollectionReaderCasInitializerImpl extends MetaDataObject_impl i
}
+ @Override
protected XmlizationInfo getXmlizationInfo() {
return XMLIZATION_INFO;
}
@@ -145,21 +147,18 @@ public class CpeCollectionReaderCasInitializerImpl extends MetaDataObject_impl i
new PropertyXmlInfo[] { new PropertyXmlInfo("descriptor", null),
new PropertyXmlInfo("parameterSettings", null),
new PropertyXmlInfo("sofaNameMappings", null),
-
});
/**
* @return the sofa mappings
*/
+ @Override
public CpeSofaMappings getSofaNameMappings() {
return sofaNameMappings;
}
- /**
- * @param mappings
- */
+ @Override
public void setSofaNameMappings(CpeSofaMappings mappings) {
sofaNameMappings = mappings;
}
-
}
diff --git a/uimaj-ep-cas-editor-ide/src/main/java/org/apache/uima/caseditor/ide/CasEditorIdePlugin.java b/uimaj-ep-cas-editor-ide/src/main/java/org/apache/uima/caseditor/ide/CasEditorIdePlugin.java
index 2e3f56a..9bf72ab 100644
--- a/uimaj-ep-cas-editor-ide/src/main/java/org/apache/uima/caseditor/ide/CasEditorIdePlugin.java
+++ b/uimaj-ep-cas-editor-ide/src/main/java/org/apache/uima/caseditor/ide/CasEditorIdePlugin.java
@@ -64,7 +64,7 @@ public class CasEditorIdePlugin extends AbstractUIPlugin {
/**
* This method is called upon plug-in activation
*
- * @param context
+ * @param context -
* @throws Exception -
*/
@Override
@@ -111,8 +111,9 @@ public class CasEditorIdePlugin extends AbstractUIPlugin {
try {
DotCorpus dotCorpus = DotCorpusSerializer.parseDotCorpus(dotCorpusIn);
- if (dotCorpus.getTypeSystemFileName() != null)
- typeSystemFile = project.getFile(dotCorpus.getTypeSystemFileName());
+ if (dotCorpus.getTypeSystemFileName() != null) {
+ typeSystemFile = project.getFile(dotCorpus.getTypeSystemFileName());
+ }
}
finally {
try {
@@ -146,7 +147,7 @@ public class CasEditorIdePlugin extends AbstractUIPlugin {
/**
* This method is called when the plug-in is stopped.
*
- * @param context
+ * @param context -
* @throws Exception -
*/
@Override
@@ -169,7 +170,7 @@ public class CasEditorIdePlugin extends AbstractUIPlugin {
/**
* Log the throwable.
*
- * @param t
+ * @param t -
*/
public static void log(Throwable t) {
getDefault().getLog().log(new Status(IStatus.ERROR, ID, IStatus.OK, t.getMessage(), t));
diff --git a/uimaj-ep-configurator/src/main/java/org/apache/uima/taeconfigurator/editors/ui/Utility.java b/uimaj-ep-configurator/src/main/java/org/apache/uima/taeconfigurator/editors/ui/Utility.java
index a36a30b..d83db6a 100644
--- a/uimaj-ep-configurator/src/main/java/org/apache/uima/taeconfigurator/editors/ui/Utility.java
+++ b/uimaj-ep-configurator/src/main/java/org/apache/uima/taeconfigurator/editors/ui/Utility.java
@@ -33,15 +33,6 @@ import org.eclipse.swt.widgets.Widget;
// MessageDialog extended only to enable resize
public class Utility extends MessageDialog {
- /**
- * @param parentShell
- * @param dialogTitle
- * @param dialogTitleImage
- * @param dialogMessage
- * @param dialogImageType
- * @param dialogButtonLabels
- * @param defaultIndex
- */
public Utility(Shell parentShell, String dialogTitle, Image dialogTitleImage,
String dialogMessage, int dialogImageType, String[] dialogButtonLabels, int defaultIndex) {
super(parentShell, dialogTitle, dialogTitleImage, dialogMessage, dialogImageType,
@@ -58,7 +49,7 @@ public class Utility extends MessageDialog {
*
* @param title
* of the warning
- * @param message
+ * @param message -
* @param type
* one of MessageDialog.NONE for a dialog with no image MessageDialog.ERROR for a dialog
* with an error image MessageDialog.INFORMATION for a dialog with an information image
@@ -74,7 +65,7 @@ public class Utility extends MessageDialog {
*
* @param title
* of the warning
- * @param message
+ * @param message -
* @param type
* one of MessageDialog.NONE for a dialog with no image MessageDialog.ERROR for a dialog
* with an error image MessageDialog.INFORMATION for a dialog with an information image
@@ -106,7 +97,9 @@ public class Utility extends MessageDialog {
dialog.setShellStyle(SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL | SWT.RESIZE);
int returnCode = dialog.open();
if (returnCode == -1)
- returnCode = Window.CANCEL; // Cancel code
+ {
+ returnCode = Window.CANCEL; // Cancel code
+ }
return returnCode;
}
@@ -117,39 +110,40 @@ public class Utility extends MessageDialog {
/**
* remove element(s) (must be present) using == test
*
- * @param source
- * @param element
- * @param componentClass
+ * @param source -
+ * @param element -
+ * @param componentClass -
* @return a copy of the array with == element(s) removed
*/
-
public static Object[] removeElementFromArray(Object[] source, Object element,
Class componentClass) {
Object[] result = (Object[]) Array.newInstance(componentClass, source.length - 1);
for (int i = 0, j = 0; i < source.length; i++) {
- if (element != source[i])
+ if (element != source[i]) {
result[j++] = source[i];
}
+ }
return result;
}
/**
* remove element(s) (must be present) using equals test
*
- * @param source
- * @param element
- * @param componentClass
+ * @param source -
+ * @param element -
+ * @param componentClass -
* @return a copy of the array with equal element(s) removed
*/
-
public static Object[] removeEqualElementFromArray(Object[] source, Object element,
Class componentClass) {
Object[] result = (Object[]) Array.newInstance(componentClass, source.length - 1);
for (int i = 0, j = 0; i < source.length; i++) {
- if (element == null && source[i] == null)
+ if (element == null && source[i] == null) {
continue;
- if (null != element && element.equals(source[i]))
+ }
+ if (null != element && element.equals(source[i])) {
continue;
+ }
result[j++] = source[i];
}
return result;
@@ -157,41 +151,49 @@ public class Utility extends MessageDialog {
public static Object[] removeElementsFromArray(Object[] source, Object element,
Class componentClass) {
- if (null == source)
- return null;
+ if (null == source) {
+ return null;
+ }
int count = 0;
for (int i = 0; i < source.length; i++) {
- if (!element.equals(source[i]))
+ if (!element.equals(source[i])) {
count++;
}
- if (count == source.length)
- return source;
+ }
+ if (count == source.length) {
+ return source;
+ }
Object[] result = (Object[]) Array.newInstance(componentClass, count);
for (int i = 0, j = 0; i < source.length; i++) {
- if (!element.equals(source[i]))
+ if (!element.equals(source[i])) {
result[j++] = source[i];
}
+ }
return result;
}
public static Object[] removeElementsFromArray(Object[] source, Object element,
Class componentClass, Comparator comp) {
- if (null == source)
- return null;
+ if (null == source) {
+ return null;
+ }
int count = 0;
for (int i = 0; i < source.length; i++) {
- if (0 != comp.compare(element, source[i]))
+ if (0 != comp.compare(element, source[i])) {
count++;
}
- if (count == source.length)
- return source;
+ }
+ if (count == source.length) {
+ return source;
+ }
Object[] result = (Object[]) Array.newInstance(componentClass, count);
for (int i = 0, j = 0; i < source.length; i++) {
- if (0 != comp.compare(element, source[i]))
+ if (0 != comp.compare(element, source[i])) {
result[j++] = source[i];
}
+ }
return result;
}
@@ -204,16 +206,20 @@ public class Utility extends MessageDialog {
}
public static boolean arrayContains(Object[] array, Object element) {
- if (null == element)
- throw new InternalErrorCDE("null not allowed as an argument");
- if (null == array)
- return false;
+ if (null == element) {
+ throw new InternalErrorCDE("null not allowed as an argument");
+ }
+ if (null == array) {
+ return false;
+ }
for (int i = 0; i < array.length; i++) {
- if (null == array[i])
+ if (null == array[i]) {
continue;
- if (array[i].equals(element))
+ }
+ if (array[i].equals(element)) {
return true;
}
+ }
return false;
}
diff --git a/uimaj-ep-launcher/src/main/java/org/apache/uima/ep_launcher/LauncherPlugin.java b/uimaj-ep-launcher/src/main/java/org/apache/uima/ep_launcher/LauncherPlugin.java
index 1659840..e413bf5 100644
--- a/uimaj-ep-launcher/src/main/java/org/apache/uima/ep_launcher/LauncherPlugin.java
+++ b/uimaj-ep-launcher/src/main/java/org/apache/uima/ep_launcher/LauncherPlugin.java
@@ -54,30 +54,33 @@ public class LauncherPlugin extends Plugin {
public Bundle[] getBundles(String bundleName, String version) {
Bundle[] bundles = Platform.getBundles(bundleName, version);
- if (bundles != null)
- return bundles;
+ if (bundles != null) {
+ return bundles;
+ }
// Accessing bundle which is not resolved
PackageAdmin admin = (PackageAdmin) bundleContext.getService(
bundleContext.getServiceReference(PackageAdmin.class.getName()));
bundles = admin.getBundles(bundleName, version);
- if (bundles != null && bundles.length > 0)
- return bundles;
+ if (bundles != null && bundles.length > 0) {
+ return bundles;
+ }
return null;
}
public Bundle getBundle(String bundleName) {
Bundle[] bundles = getBundles(bundleName, null);
- if (bundles != null && bundles.length > 0)
- // return fist bundle, if multiple
- return bundles[0];
+ if (bundles != null && bundles.length > 0) {
+ // return fist bundle, if multiple
+ return bundles[0];
+ }
return null;
}
/**
- * Returns the shared instance.
+ * @return the shared instance.
*/
public static LauncherPlugin getDefault() {
return plugin;
diff --git a/uimaj-ep-pear-packager/src/main/java/org/apache/uima/pear/insd/edit/INSDComponentPage.java b/uimaj-ep-pear-packager/src/main/java/org/apache/uima/pear/insd/edit/INSDComponentPage.java
index 6d0f1af..69f9d8e 100644
--- a/uimaj-ep-pear-packager/src/main/java/org/apache/uima/pear/insd/edit/INSDComponentPage.java
+++ b/uimaj-ep-pear-packager/src/main/java/org/apache/uima/pear/insd/edit/INSDComponentPage.java
@@ -73,9 +73,6 @@ public class INSDComponentPage extends WizardPage implements InsdConstants {
Hashtable wizardData;
- /**
- * Constructor
- */
public INSDComponentPage(IContainer currentContainer, InstallationDescriptor insd,
Hashtable wizardData) {
super("wizardPage");
@@ -119,10 +116,12 @@ public class INSDComponentPage extends WizardPage implements InsdConstants {
String temp = "";
temp = insd.getMainComponentId();
- if (temp == null || temp.trim().length() == 0)
- compID = currentContainer.getName();
- else
- compID = temp;
+ if (temp == null || temp.trim().length() == 0) {
+ compID = currentContainer.getName();
+ }
+ else {
+ compID = temp;
+ }
temp = insd.getMainComponentDesc();
compDescriptorPath = temp == null ? "" : removeMacros(temp);
@@ -137,7 +136,8 @@ public class INSDComponentPage extends WizardPage implements InsdConstants {
text.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
text.setText(strText);
text.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
+ @Override
+ public void modifyText(ModifyEvent e) {
dialogChanged();
}
});
@@ -148,7 +148,8 @@ public class INSDComponentPage extends WizardPage implements InsdConstants {
/**
* See IDialogPage#createControl(Composite)
*/
- public void createControl(Composite parent) {
+ @Override
+public void createControl(Composite parent) {
try {
@@ -210,8 +211,10 @@ public class INSDComponentPage extends WizardPage implements InsdConstants {
setPageComplete(false);
setErrorMessage(null);
- } else
- updateStatus(null);
+ }
+ else {
+ updateStatus(null);
+ }
}
@@ -221,8 +224,10 @@ public class INSDComponentPage extends WizardPage implements InsdConstants {
setPageComplete(false);
setErrorMessage(null);
- } else
- updateStatus(null);
+ }
+ else {
+ updateStatus(null);
+ }
}
void saveWizardData() {
@@ -252,15 +257,18 @@ public class INSDComponentPage extends WizardPage implements InsdConstants {
if (filename != null && filename.trim().length() > 0) {
filename = filename.trim();
IFile iFile = currentContainer.getFile(new Path(filename));
- if (!iFile.exists())
- sb.append("\n \"" + filename + "\" was not found in the current project!");
- else if (filename.trim().indexOf(".xml") == -1)
- sb.append("\n \"" + filename + "\" is not an xml file!");
+ if (!iFile.exists()) {
+ sb.append("\n \"" + filename + "\" was not found in the current project!");
+ }
+ else if (filename.trim().indexOf(".xml") == -1) {
+ sb.append("\n \"" + filename + "\" is not an xml file!");
+ }
}
}
String s = sb.toString();
- if (s.length() > 0)
- message = s;
+ if (s.length() > 0) {
+ message = s;
+ }
return message;
}
@@ -282,6 +290,7 @@ public class INSDComponentPage extends WizardPage implements InsdConstants {
* @param defaultButton
* <code>true</code> if the button is to be the default button, and <code>false</code>
* otherwise
+ * @param text -
*/
protected Button addButton(Composite parent, String label, boolean defaultButton, final Text text) {
@@ -298,7 +307,8 @@ public class INSDComponentPage extends WizardPage implements InsdConstants {
button.setFont(parent.getFont());
SelectionListener listener = new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
ResourceSelectionDialog dialog = new ResourceSelectionDialog(getShell(), currentContainer,
"Selection Dialog");
@@ -337,7 +347,8 @@ public class INSDComponentPage extends WizardPage implements InsdConstants {
button.setSelection(initialSelection);
SelectionListener listener = new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
dialogChanged();
}
};
@@ -348,9 +359,11 @@ public class INSDComponentPage extends WizardPage implements InsdConstants {
/*
* see @DialogPage.setVisible(boolean)
*/
- public void setVisible(boolean visible) {
+ @Override
+public void setVisible(boolean visible) {
super.setVisible(visible);
- if (visible)
- compIDText.setFocus();
+ if (visible) {
+ compIDText.setFocus();
+ }
}
}
\ No newline at end of file
diff --git a/uimaj-ep-pear-packager/src/main/java/org/apache/uima/pear/insd/edit/vars/AbstractVarValViewerHandler.java b/uimaj-ep-pear-packager/src/main/java/org/apache/uima/pear/insd/edit/vars/AbstractVarValViewerHandler.java
index e4055c2..e242ff8 100644
--- a/uimaj-ep-pear-packager/src/main/java/org/apache/uima/pear/insd/edit/vars/AbstractVarValViewerHandler.java
+++ b/uimaj-ep-pear-packager/src/main/java/org/apache/uima/pear/insd/edit/vars/AbstractVarValViewerHandler.java
@@ -29,10 +29,6 @@ import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.*;
-/**
- *
- *
- */
abstract class AbstractVarValViewerHandler {
public Table table;
@@ -144,8 +140,9 @@ abstract class AbstractVarValViewerHandler {
public void close() {
Shell shell = table.getShell();
- if (shell != null && !shell.isDisposed())
- shell.dispose();
+ if (shell != null && !shell.isDisposed()) {
+ shell.dispose();
+ }
}
/**
@@ -155,18 +152,23 @@ abstract class AbstractVarValViewerHandler {
*/
class ExampleContentProvider implements IStructuredContentProvider, IVarValListViewer {
+ @Override
public void inputChanged(Viewer v, Object oldInput, Object newInput) {
- if (newInput != null)
+ if (newInput != null) {
((VarValList) newInput).addChangeListener(this);
- if (oldInput != null)
+ }
+ if (oldInput != null) {
((VarValList) oldInput).removeChangeListener(this);
}
+ }
+ @Override
public void dispose() {
tableRowList.removeChangeListener(this);
}
// Return the tableRows as an array of Objects
+ @Override
public Object[] getElements(Object parent) {
return tableRowList.getTableRows().toArray();
}
@@ -176,6 +178,7 @@ abstract class AbstractVarValViewerHandler {
*
* @see IVarValListViewer#addTableRow(VarVal)
*/
+ @Override
public void addTableRow(VarVal tableRow) {
tableViewer.add(tableRow);
}
@@ -185,6 +188,7 @@ abstract class AbstractVarValViewerHandler {
*
* @see IVarValListViewer#removeTableRow(VarVal)
*/
+ @Override
public void removeTableRow(VarVal tableRow) {
tableViewer.remove(tableRow);
}
@@ -194,6 +198,7 @@ abstract class AbstractVarValViewerHandler {
*
* @see IVarValListViewer#updateTableRow(VarVal)
*/
+ @Override
public void updateTableRow(VarVal tableRow) {
tableViewer.update(tableRow, null);
}
@@ -217,7 +222,8 @@ abstract class AbstractVarValViewerHandler {
add.addSelectionListener(new SelectionAdapter() {
// Add a tableRow to the VarValList and refresh the view
- public void widgetSelected(SelectionEvent e) {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
if (!tableRowList.addTableRow()) {
MessageDialog.openWarning(new Shell(), "Duplicate Variable",
"The variable 'New_Variable' already exists");
@@ -235,7 +241,8 @@ abstract class AbstractVarValViewerHandler {
delete.addSelectionListener(new SelectionAdapter() {
// Remove the selection and refresh the view
- public void widgetSelected(SelectionEvent e) {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
VarVal tableRow = (VarVal) ((IStructuredSelection) tableViewer.getSelection())
.getFirstElement();
if (tableRow != null) {
@@ -263,21 +270,21 @@ abstract class AbstractVarValViewerHandler {
}
/**
- * Return the VarValList
+ * @return the VarValList
*/
public VarValList getTableRowList() {
return tableRowList;
}
/**
- * Return the parent composite
+ * @return the parent composite
*/
public Control getControl() {
return table.getParent();
}
/**
- * Return the 'close' Button
+ * @return the 'close' Button
*/
public Button getCloseButton() {
return closeButton;
diff --git a/uimaj-ep-pear-packager/src/main/java/org/apache/uima/pear/insd/edit/vars/VarValList.java b/uimaj-ep-pear-packager/src/main/java/org/apache/uima/pear/insd/edit/vars/VarValList.java
index 03d6f8f..1393209 100644
--- a/uimaj-ep-pear-packager/src/main/java/org/apache/uima/pear/insd/edit/vars/VarValList.java
+++ b/uimaj-ep-pear-packager/src/main/java/org/apache/uima/pear/insd/edit/vars/VarValList.java
@@ -25,11 +25,7 @@ import java.util.Set;
import java.util.Vector;
/**
- *
* Represents a list of environment variable to be displayed in a table
- *
- *
- *
*/
public class VarValList {
@@ -65,8 +61,10 @@ public class VarValList {
if (!isDuplicate(tableRow)) {
tableRows.add(tableRow);
return true;
- } else
- return false;
+ }
+ else {
+ return false;
+ }
}
/**
@@ -77,11 +75,14 @@ public class VarValList {
if (!isDuplicate(tableRow)) {
tableRows.add(tableRows.size(), tableRow);
Iterator iterator = changeListeners.iterator();
- while (iterator.hasNext())
+ while (iterator.hasNext()) {
((IVarValListViewer) iterator.next()).addTableRow(tableRow);
+ }
return true;
- } else
- return false;
+ }
+ else {
+ return false;
+ }
}
private boolean isDuplicate(VarVal tableRow) {
@@ -90,48 +91,47 @@ public class VarValList {
Iterator itr = tableRows.iterator();
while (itr.hasNext()) {
VarVal vv = (VarVal) itr.next();
- if (vv.getVarName().equals(varName))
+ if (vv.getVarName().equals(varName)) {
duplicate = true;
}
+ }
return duplicate;
}
- /**
- * @param tableRow
- */
public void removeTableRow(VarVal tableRow) {
tableRows.remove(tableRow);
Iterator iterator = changeListeners.iterator();
- while (iterator.hasNext())
- ((IVarValListViewer) iterator.next()).removeTableRow(tableRow);
+ while (iterator.hasNext()) {
+ ((IVarValListViewer) iterator.next()).removeTableRow(tableRow);
+ }
}
/**
* Notify listeners by calling their updateTableRow() method
*
- * @param tableRow
+ * @param tableRow -
*/
public void tableRowChanged(VarVal tableRow) {
Iterator iterator = changeListeners.iterator();
- while (iterator.hasNext())
- ((IVarValListViewer) iterator.next()).updateTableRow(tableRow);
+ while (iterator.hasNext()) {
+ ((IVarValListViewer) iterator.next()).updateTableRow(tableRow);
+ }
}
/**
* Removes a Change Listener
*
* @param viewer
- * A Chnage listener
+ * A change listener
*/
public void removeChangeListener(IVarValListViewer viewer) {
changeListeners.remove(viewer);
}
/**
- *
* Adds a change listener
*
- * @param viewer
+ * @param viewer -
*/
public void addChangeListener(IVarValListViewer viewer) {
changeListeners.add(viewer);
diff --git a/uimaj-examples/src/main/java/org/apache/uima/examples/cpe/SimpleRunCPE.java b/uimaj-examples/src/main/java/org/apache/uima/examples/cpe/SimpleRunCPE.java
index 45730b1..333b9e6 100644
--- a/uimaj-examples/src/main/java/org/apache/uima/examples/cpe/SimpleRunCPE.java
+++ b/uimaj-examples/src/main/java/org/apache/uima/examples/cpe/SimpleRunCPE.java
@@ -59,6 +59,7 @@ public class SimpleRunCPE extends Thread {
*
* @param args
* command line arguments into the program - see class description
+ * @throws Exception -
*/
public SimpleRunCPE(String args[]) throws Exception {
mStartTime = System.currentTimeMillis();
@@ -107,6 +108,7 @@ public class SimpleRunCPE extends Thread {
*
* @param args
* Command line arguments - see class description
+ * @throws Exception -
*/
public static void main(String[] args) throws Exception {
new SimpleRunCPE(args);
@@ -125,8 +127,9 @@ public class SimpleRunCPE extends Thread {
/**
* Called when the initialization is completed.
*
- * @see org.apache.uima.collection.processing.StatusCallbackListener#initializationComplete()
+ * @see StatusCallbackListener#initializationComplete()
*/
+ @Override
public void initializationComplete() {
System.out.println("CPM Initialization Complete");
mInitCompleteTime = System.currentTimeMillis();
@@ -135,9 +138,10 @@ public class SimpleRunCPE extends Thread {
/**
* Called when the batchProcessing is completed.
*
- * @see org.apache.uima.collection.processing.StatusCallbackListener#batchProcessComplete()
+ * @see StatusCallbackListener#batchProcessComplete()
*
*/
+ @Override
public void batchProcessComplete() {
System.out.print("Completed " + entityCount + " documents");
if (size > 0) {
@@ -151,8 +155,9 @@ public class SimpleRunCPE extends Thread {
/**
* Called when the collection processing is completed.
*
- * @see org.apache.uima.collection.processing.StatusCallbackListener#collectionProcessComplete()
+ * @see StatusCallbackListener#collectionProcessComplete()
*/
+ @Override
public void collectionProcessComplete() {
long time = System.currentTimeMillis();
System.out.print("Completed " + entityCount + " documents");
@@ -177,8 +182,9 @@ public class SimpleRunCPE extends Thread {
/**
* Called when the CPM is paused.
*
- * @see org.apache.uima.collection.processing.StatusCallbackListener#paused()
+ * @see StatusCallbackListener#paused()
*/
+ @Override
public void paused() {
System.out.println("Paused");
}
@@ -186,8 +192,9 @@ public class SimpleRunCPE extends Thread {
/**
* Called when the CPM is resumed after a pause.
*
- * @see org.apache.uima.collection.processing.StatusCallbackListener#resumed()
+ * @see StatusCallbackListener#resumed()
*/
+ @Override
public void resumed() {
System.out.println("Resumed");
}
@@ -195,8 +202,9 @@ public class SimpleRunCPE extends Thread {
/**
* Called when the CPM is stopped abruptly due to errors.
*
- * @see org.apache.uima.collection.processing.StatusCallbackListener#aborted()
+ * @see StatusCallbackListener#aborted()
*/
+ @Override
public void aborted() {
System.out.println("Aborted");
// stop the JVM. Otherwise main thread will still be blocked waiting for
@@ -213,6 +221,7 @@ public class SimpleRunCPE extends Thread {
* @param aStatus
* EntityProcessStatus that holds the status of all the events for aEntity
*/
+ @Override
public void entityProcessComplete(CAS aCas, EntityProcessStatus aStatus) {
if (aStatus.isException()) {
List exceptions = aStatus.getExceptions();
diff --git a/uimaj-examples/src/main/java/org/apache/uima/examples/xmi/Ecore2UimaTypeSystem.java b/uimaj-examples/src/main/java/org/apache/uima/examples/xmi/Ecore2UimaTypeSystem.java
index 4e093e3..93102b2 100644
--- a/uimaj-examples/src/main/java/org/apache/uima/examples/xmi/Ecore2UimaTypeSystem.java
+++ b/uimaj-examples/src/main/java/org/apache/uima/examples/xmi/Ecore2UimaTypeSystem.java
@@ -318,10 +318,6 @@ public class Ecore2UimaTypeSystem {
return type;
}
- /**
- * @param attr -
- * @return -
- */
private static FeatureDescription eStructuralFeature2UimaFeature(
EStructuralFeature aStructuralFeature, Map aOptions) throws URISyntaxException {
FeatureDescription feat = uimaFactory.createFeatureDescription();
@@ -418,10 +414,12 @@ public class Ecore2UimaTypeSystem {
EPackage epackage = aEcoreType.getEPackage();
if (epackage != null) {
String uimaNamespace = namespaceUri2UimaNamespace(epackage.getNsURI());
- if (uimaNamespace != null)
- return uimaNamespace + '.' + aEcoreType.getName();
- else
- return aEcoreType.getName();
+ if (uimaNamespace != null) {
+ return uimaNamespace + '.' + aEcoreType.getName();
+ }
+ else {
+ return aEcoreType.getName();
+ }
} else {
return aEcoreType.getName();
}
@@ -491,6 +489,8 @@ public class Ecore2UimaTypeSystem {
/**
* Main program. Takes two arguments: the filename of an input .ecore file and the filename of the
* UIMA TypeSystem file to generate.
+ * @param args command line arguments.
+ * @throws Exception -
*/
public static void main(String[] args) throws Exception {
if (args.length != 2) {
diff --git a/uimaj-tools/src/main/java/org/apache/uima/tools/AnnotationViewerMain.java b/uimaj-tools/src/main/java/org/apache/uima/tools/AnnotationViewerMain.java
index d60fb78..3935688 100644
--- a/uimaj-tools/src/main/java/org/apache/uima/tools/AnnotationViewerMain.java
+++ b/uimaj-tools/src/main/java/org/apache/uima/tools/AnnotationViewerMain.java
@@ -192,7 +192,8 @@ public class AnnotationViewerMain extends JFrame {
// Event Handlling of "Exit" Menu Item
exitMenuItem.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent ae) {
+ @Override
+ public void actionPerformed(ActionEvent ae) {
savePreferences();
System.exit(0);
}
@@ -200,14 +201,16 @@ public class AnnotationViewerMain extends JFrame {
// Event Handlling of "About" Menu Item
aboutMenuItem.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent ae) {
+ @Override
+ public void actionPerformed(ActionEvent ae) {
aboutDialog.setVisible(true);
}
});
// Event Handlling of "Help" Menu Item
helpMenuItem.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent ae) {
+ @Override
+ public void actionPerformed(ActionEvent ae) {
JOptionPane.showMessageDialog(AnnotationViewerMain.this, HELP_MESSAGE,
"Annotation Viewer Help", JOptionPane.PLAIN_MESSAGE);
}
@@ -233,7 +236,8 @@ public class AnnotationViewerMain extends JFrame {
// Event Handling of view Button
viewButton.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent ee) {
+ @Override
+ public void actionPerformed(ActionEvent ee) {
try {
viewDocuments();
} catch (Exception e) {
@@ -342,6 +346,8 @@ public class AnnotationViewerMain extends JFrame {
/**
* Gets the name of the style map file for the given AE or TypeSystem descriptor filename.
+ * @param aDescriptorFileName -
+ * @return -
*/
public File getStyleMapFileName(String aDescriptorFileName) {
String baseName;
@@ -358,7 +364,8 @@ public class AnnotationViewerMain extends JFrame {
final AnnotationViewerMain frame = new AnnotationViewerMain();
frame.addWindowListener(new WindowAdapter() {
- public void windowClosing(WindowEvent e) {
+ @Override
+ public void windowClosing(WindowEvent e) {
frame.savePreferences();
System.exit(0);
}
@@ -457,7 +464,8 @@ public class AnnotationViewerMain extends JFrame {
*
* @see java.awt.Component#getPreferredSize()
*/
- public Dimension getPreferredSize() {
+ @Override
+public Dimension getPreferredSize() {
return new Dimension(640, 200);
}
}
diff --git a/uimaj-tools/src/main/java/org/apache/uima/tools/RunAE.java b/uimaj-tools/src/main/java/org/apache/uima/tools/RunAE.java
index e2ab9ff..40c5cc1 100644
--- a/uimaj-tools/src/main/java/org/apache/uima/tools/RunAE.java
+++ b/uimaj-tools/src/main/java/org/apache/uima/tools/RunAE.java
@@ -105,6 +105,7 @@ public class RunAE implements StatusCallbackListener {
/**
* Constructor. Sets up and runs an Analysis Engine.
+ * @param args command line arguments.
*/
public RunAE(String[] args) {
try {
@@ -236,7 +237,8 @@ public class RunAE implements StatusCallbackListener {
/**
* @see org.apache.uima.collection.base_cpm.BaseStatusCallbackListener#initializationComplete()
*/
- public void initializationComplete() {
+ @Override
+public void initializationComplete() {
}
/**
@@ -247,7 +249,8 @@ public class RunAE implements StatusCallbackListener {
* @see org.apache.uima.collection.StatusCallbackListener#entityProcessComplete(org.apache.uima.cas.CAS,
* org.apache.uima.collection.EntityProcessStatus)
*/
- public void entityProcessComplete(CAS aCas, EntityProcessStatus aStatus) {
+ @Override
+public void entityProcessComplete(CAS aCas, EntityProcessStatus aStatus) {
if (aStatus.isException()) {
Iterator iter = aStatus.getExceptions().iterator();
while (iter.hasNext()) {
@@ -273,7 +276,8 @@ public class RunAE implements StatusCallbackListener {
/**
* @see org.apache.uima.collection.base_cpm.BaseStatusCallbackListener#aborted()
*/
- public void aborted() {
+ @Override
+public void aborted() {
System.out.println("Processing Aborted");
}
@@ -281,13 +285,15 @@ public class RunAE implements StatusCallbackListener {
/**
* @see org.apache.uima.collection.base_cpm.BaseStatusCallbackListener#batchProcessComplete()
*/
- public void batchProcessComplete() {
+ @Override
+public void batchProcessComplete() {
}
/**
* @see org.apache.uima.collection.base_cpm.BaseStatusCallbackListener#collectionProcessComplete()
*/
- public void collectionProcessComplete() {
+ @Override
+public void collectionProcessComplete() {
// output performance stats
if (statsLevel > 0) {
AnalysisEnginePerformanceReports performanceReports = new AnalysisEnginePerformanceReports(
@@ -304,13 +310,15 @@ public class RunAE implements StatusCallbackListener {
/**
* @see org.apache.uima.collection.base_cpm.BaseStatusCallbackListener#paused()
*/
- public void paused() {
+ @Override
+public void paused() {
}
/**
* @see org.apache.uima.collection.base_cpm.BaseStatusCallbackListener#resumed()
*/
- public void resumed() {
+ @Override
+public void resumed() {
}
/**
diff --git a/uimaj-tools/src/main/java/org/apache/uima/tools/cvd/MainFrame.java b/uimaj-tools/src/main/java/org/apache/uima/tools/cvd/MainFrame.java
index f652685..fb228e0 100644
--- a/uimaj-tools/src/main/java/org/apache/uima/tools/cvd/MainFrame.java
+++ b/uimaj-tools/src/main/java/org/apache/uima/tools/cvd/MainFrame.java
@@ -410,7 +410,7 @@ public class MainFrame extends JFrame {
/**
* Constructor for MainFrame.
- *
+ * @param iniFile -
* @throws HeadlessException -
*/
public MainFrame(File iniFile) {
@@ -1104,7 +1104,8 @@ public class MainFrame extends JFrame {
this.showPerfReportItem = new JMenuItem("Performance report");
this.showPerfReportItem.setEnabled(false);
this.showPerfReportItem.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
+ @Override
+ public void actionPerformed(ActionEvent e) {
if (MainFrame.this.lastRunProcessTrace == null) {
MainFrame.this.showError("No performance report to show.");
} else {
@@ -1171,7 +1172,8 @@ public class MainFrame extends JFrame {
JMenuItem logViewer = new JMenuItem("View Log File", KeyEvent.VK_L);
logViewer.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent event) {
+ @Override
+ public void actionPerformed(ActionEvent event) {
LogFileViewer viewer = new LogFileViewer("Log file: "
+ MainFrame.this.logFile.getAbsolutePath());
viewer.addWindowListener(new CloseLogViewHandler(MainFrame.this));
@@ -2191,7 +2193,7 @@ public class MainFrame extends JFrame {
* window is being closed. Calling <code>setExitOnClose(false)</code> prevents that. It is then
* the caller's task to shut down the JVM.
*
- * @param exitOnClose
+ * @param exitOnClose exit-on-close behavior
*/
public void setExitOnClose(boolean exitOnClose) {
this.exitOnClose = exitOnClose;
diff --git a/uimaj-tools/src/main/java/org/apache/uima/tools/cvd/MultiAnnotViewerFrame.java b/uimaj-tools/src/main/java/org/apache/uima/tools/cvd/MultiAnnotViewerFrame.java
index 4d3b146..ac38247 100644
--- a/uimaj-tools/src/main/java/org/apache/uima/tools/cvd/MultiAnnotViewerFrame.java
+++ b/uimaj-tools/src/main/java/org/apache/uima/tools/cvd/MultiAnnotViewerFrame.java
@@ -40,35 +40,21 @@ public class MultiAnnotViewerFrame extends JFrame {
private static final long serialVersionUID = -920372876117526451L;
- /**
- * @throws java.awt.HeadlessException
- */
public MultiAnnotViewerFrame() {
super();
// TODO Auto-generated constructor stub
}
- /**
- * @param gc
- */
public MultiAnnotViewerFrame(GraphicsConfiguration gc) {
super(gc);
// TODO Auto-generated constructor stub
}
- /**
- * @param title
- * @throws java.awt.HeadlessException
- */
public MultiAnnotViewerFrame(String title) {
super(title);
// TODO Auto-generated constructor stub
}
- /**
- * @param title
- * @param gc
- */
public MultiAnnotViewerFrame(String title, GraphicsConfiguration gc) {
super(title, gc);
// TODO Auto-generated constructor stub
diff --git a/uimaj-tools/src/main/java/org/apache/uima/tools/cvd/control/IndexPopupListener.java b/uimaj-tools/src/main/java/org/apache/uima/tools/cvd/control/IndexPopupListener.java
index 01cd400..7002a27 100644
--- a/uimaj-tools/src/main/java/org/apache/uima/tools/cvd/control/IndexPopupListener.java
+++ b/uimaj-tools/src/main/java/org/apache/uima/tools/cvd/control/IndexPopupListener.java
@@ -37,17 +37,16 @@ public class IndexPopupListener extends MouseAdapter {
private final MainFrame main;
- /**
- * @param frame
- */
public IndexPopupListener(MainFrame frame) {
this.main = frame;
}
+ @Override
public void mousePressed(MouseEvent e) {
maybeShowPopup(e);
}
+ @Override
public void mouseReleased(MouseEvent e) {
maybeShowPopup(e);
}
diff --git a/uimaj-tools/src/main/java/org/apache/uima/tools/cvd/control/ShowTypesystemHandler.java b/uimaj-tools/src/main/java/org/apache/uima/tools/cvd/control/ShowTypesystemHandler.java
index 0c732a8..7a51e39 100644
--- a/uimaj-tools/src/main/java/org/apache/uima/tools/cvd/control/ShowTypesystemHandler.java
+++ b/uimaj-tools/src/main/java/org/apache/uima/tools/cvd/control/ShowTypesystemHandler.java
@@ -33,9 +33,6 @@ public class ShowTypesystemHandler implements ActionListener {
private final MainFrame main;
- /**
- * @param frame
- */
public ShowTypesystemHandler(MainFrame frame) {
this.main = frame;
}
@@ -43,6 +40,7 @@ public class ShowTypesystemHandler implements ActionListener {
/**
* @see java.awt.event.ActionListener#actionPerformed(ActionEvent)
*/
+ @Override
public void actionPerformed(ActionEvent event) {
if (this.main.getCas() == null) {
return;
diff --git a/uimaj-tools/src/main/java/org/apache/uima/tools/cvd/tsview/FeatureTableModel.java b/uimaj-tools/src/main/java/org/apache/uima/tools/cvd/tsview/FeatureTableModel.java
index 0fd635a..425ba55 100644
--- a/uimaj-tools/src/main/java/org/apache/uima/tools/cvd/tsview/FeatureTableModel.java
+++ b/uimaj-tools/src/main/java/org/apache/uima/tools/cvd/tsview/FeatureTableModel.java
@@ -26,11 +26,6 @@ import javax.swing.table.AbstractTableModel;
import org.apache.uima.cas.Feature;
import org.apache.uima.cas.Type;
-/**
- * Insert comment for enclosing_type here.
- *
- *
- */
public class FeatureTableModel extends AbstractTableModel {
private static final long serialVersionUID = -6010925680514336742L;
@@ -43,9 +38,6 @@ public class FeatureTableModel extends AbstractTableModel {
super();
}
- /**
- * Constructor for FeatureTableModel.
- */
public FeatureTableModel(Type type) {
super();
this.type = type;
@@ -56,6 +48,7 @@ public class FeatureTableModel extends AbstractTableModel {
fireTableDataChanged();
}
+ @Override
public String getColumnName(int i) {
if (i < 0 || i >= columnHeaders.length) {
return "";
@@ -66,6 +59,7 @@ public class FeatureTableModel extends AbstractTableModel {
/**
* @see javax.swing.table.TableModel#getRowCount()
*/
+ @Override
public int getRowCount() {
if (this.type == null) {
return 0;
@@ -76,6 +70,7 @@ public class FeatureTableModel extends AbstractTableModel {
/**
* @see javax.swing.table.TableModel#getColumnCount()
*/
+ @Override
public int getColumnCount() {
return 3;
}
@@ -83,6 +78,7 @@ public class FeatureTableModel extends AbstractTableModel {
/**
* @see javax.swing.table.TableModel#getValueAt(int, int)
*/
+ @Override
public Object getValueAt(int rowIndex, int columnIndex) {
if (this.type == null) {
return null;
@@ -107,5 +103,4 @@ public class FeatureTableModel extends AbstractTableModel {
}
}
}
-
}
diff --git a/uimaj-tools/src/main/java/org/apache/uima/tools/cvd/tsview/MainFrame.java b/uimaj-tools/src/main/java/org/apache/uima/tools/cvd/tsview/MainFrame.java
index 86c20ab..bbba0fb 100644
--- a/uimaj-tools/src/main/java/org/apache/uima/tools/cvd/tsview/MainFrame.java
+++ b/uimaj-tools/src/main/java/org/apache/uima/tools/cvd/tsview/MainFrame.java
@@ -61,6 +61,7 @@ public class MainFrame extends JFrame {
/**
* @see javax.swing.event.TreeSelectionListener#valueChanged(javax.swing.event.TreeSelectionEvent)
*/
+ @Override
public void valueChanged(TreeSelectionEvent event) {
// System.out.println("");
DefaultMutableTreeNode node = (DefaultMutableTreeNode) MainFrame.this.typeTree
@@ -96,33 +97,16 @@ public class MainFrame extends JFrame {
init();
}
- /**
- * Constructor for MainFrame.
- *
- * @param gc
- */
public MainFrame(GraphicsConfiguration gc) {
super(gc);
init();
}
- /**
- * Constructor for MainFrame.
- *
- * @param title
- * @throws HeadlessException -
- */
public MainFrame(String title) {
super(title);
init();
}
- /**
- * Constructor for MainFrame.
- *
- * @param title
- * @param gc
- */
public MainFrame(String title, GraphicsConfiguration gc) {
super(title, gc);
init();
diff --git a/uimaj-tools/src/main/java/org/apache/uima/tools/docanalyzer/DocumentAnalyzer.java b/uimaj-tools/src/main/java/org/apache/uima/tools/docanalyzer/DocumentAnalyzer.java
index 28a5916..0276e7e 100644
--- a/uimaj-tools/src/main/java/org/apache/uima/tools/docanalyzer/DocumentAnalyzer.java
+++ b/uimaj-tools/src/main/java/org/apache/uima/tools/docanalyzer/DocumentAnalyzer.java
@@ -343,7 +343,8 @@ public class DocumentAnalyzer extends JFrame implements StatusCallbackListener,
inputFileFormatComboBox.setEditable(false);
inputFileFormatComboBox.setSelectedItem(prefsMed.getInputFileFormat());
inputFileFormatComboBox.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
+ @Override
+ public void actionPerformed(ActionEvent e) {
String inputFileFormat = (String) inputFileFormatComboBox.getSelectedItem();
lenientCheckbox.setEnabled(
"xcas".equalsIgnoreCase(inputFileFormat) ||
@@ -424,7 +425,8 @@ public class DocumentAnalyzer extends JFrame implements StatusCallbackListener,
// Event Handlling of "Exit" Menu Item
exitMenuItem.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent evt) {
+ @Override
+ public void actionPerformed(ActionEvent evt) {
savePreferences();
System.exit(0);
}
@@ -432,14 +434,16 @@ public class DocumentAnalyzer extends JFrame implements StatusCallbackListener,
// Event Handlling of "About" Menu Item
aboutMenuItem.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent evt) {
+ @Override
+ public void actionPerformed(ActionEvent evt) {
aboutDialog.setVisible(true);
}
});
// Event Handlling of "Help" Menu Item
helpMenuItem.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent evt) {
+ @Override
+ public void actionPerformed(ActionEvent evt) {
JOptionPane.showMessageDialog(DocumentAnalyzer.this, HELP_MESSAGE,
"Document Analyzer Help", JOptionPane.PLAIN_MESSAGE);
}
@@ -481,7 +485,8 @@ public class DocumentAnalyzer extends JFrame implements StatusCallbackListener,
// Event Handling of run Button
runButton.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent ee) {
+ @Override
+ public void actionPerformed(ActionEvent ee) {
interactive = false;
savePreferences();
analyzeDocuments(null); // JMP added arg
@@ -490,9 +495,11 @@ public class DocumentAnalyzer extends JFrame implements StatusCallbackListener,
// Event Handling of interactive Button
interButton.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent ee) {
- if (outputFileSelector.getSelected().length() == 0)
- displayError("Need to specify an output directory for temporary results.");
+ @Override
+ public void actionPerformed(ActionEvent ee) {
+ if (outputFileSelector.getSelected().length() == 0) {
+ displayError("Need to specify an output directory for temporary results.");
+ }
else {
interactive = true;
savePreferences();
@@ -511,7 +518,8 @@ public class DocumentAnalyzer extends JFrame implements StatusCallbackListener,
restorePreferences();
progressTimer = new Timer(100, new ActionListener() {
- public void actionPerformed(ActionEvent ee) {
+ @Override
+ public void actionPerformed(ActionEvent ee) {
checkProgressMonitor();
}
});
@@ -539,7 +547,8 @@ public class DocumentAnalyzer extends JFrame implements StatusCallbackListener,
}
// View button clicked
- public void actionPerformed(ActionEvent e) {
+ @Override
+public void actionPerformed(ActionEvent e) {
savePreferences();
try {
aeSpecifierFile = new File(xmlFileSelector.getSelected());
@@ -564,18 +573,21 @@ public class DocumentAnalyzer extends JFrame implements StatusCallbackListener,
outputFileSelected = outputFileSelector.getSelected();
File inputDir = new File(inputFileSelector.getSelected());
- if (outputFileSelector.getSelected().length() > 0)
- outputDirectory = new File(outputFileSelector.getSelected());
- else
- outputDirectory = null;
+ if (outputFileSelector.getSelected().length() > 0) {
+ outputDirectory = new File(outputFileSelector.getSelected());
+ }
+ else {
+ outputDirectory = null;
+ }
// reset file pointers in case of typed-in text. JMP
String tempFileDir = null;
if ((analysisText != null) && (outputDirectory != null)) {
tempFileDir = outputFileSelector.getSelected() + "/interactive_temp";
inputDir = new File(tempFileDir);
- if (!inputDir.exists())
+ if (!inputDir.exists()) {
inputDir.mkdirs();
+ }
outputFileSelected = outputFileSelector.getSelected() + "/interactive_out";
prefsMed.setOutputDirForInteractiveMode(outputFileSelected, outputFileSelector.getSelected());
outputDirectory = new File(outputFileSelected);
@@ -700,7 +712,8 @@ public class DocumentAnalyzer extends JFrame implements StatusCallbackListener,
* @see org.apache.uima.collection.StatusCallbackListener#entityProcessComplete(org.apache.uima.cas.CAS,
* org.apache.uima.collection.EntityProcessStatus)
*/
- public void entityProcessComplete(CAS aCas, EntityProcessStatus aStatus) {
+ @Override
+public void entityProcessComplete(CAS aCas, EntityProcessStatus aStatus) {
// if an error occurred, display error
if (aStatus.isException()) {
displayError((Throwable) aStatus.getExceptions().get(0));
@@ -718,7 +731,8 @@ public class DocumentAnalyzer extends JFrame implements StatusCallbackListener,
/**
* @see org.apache.uima.collection.base_cpm.BaseStatusCallbackListener#aborted()
*/
- public void aborted() {
+ @Override
+public void aborted() {
// close progress monitor
if (progressMonitor != null) {
progressMonitor.close();
@@ -733,13 +747,15 @@ public class DocumentAnalyzer extends JFrame implements StatusCallbackListener,
/**
* @see org.apache.uima.collection.base_cpm.BaseStatusCallbackListener#batchProcessComplete()
*/
- public void batchProcessComplete() {
+ @Override
+public void batchProcessComplete() {
}
/**
* @see org.apache.uima.collection.base_cpm.BaseStatusCallbackListener#collectionProcessComplete()
*/
- public void collectionProcessComplete() {
+ @Override
+public void collectionProcessComplete() {
// invoke ProcessingCompleteRunnable in Swing event handler thread
// SwingUtilities.invokeLater(new ProcessingCompleteRunnable());
// hide progress bar dialog if it is visible
@@ -763,19 +779,22 @@ public class DocumentAnalyzer extends JFrame implements StatusCallbackListener,
/**
* @see org.apache.uima.collection.base_cpm.BaseStatusCallbackListener#initializationComplete()
*/
- public void initializationComplete() {
+ @Override
+public void initializationComplete() {
}
/**
* @see org.apache.uima.collection.base_cpm.BaseStatusCallbackListener#paused()
*/
- public void paused() {
+ @Override
+public void paused() {
}
/**
* @see org.apache.uima.collection.base_cpm.BaseStatusCallbackListener#resumed()
*/
- public void resumed() {
+ @Override
+public void resumed() {
}
/**
@@ -827,6 +846,8 @@ public class DocumentAnalyzer extends JFrame implements StatusCallbackListener,
* Creates a CAS from an descriptor. Supports both local AE descriptors and remote service
* specifiers. In the latter case the service is contacted to obtain its type system.
*
+ * @param aDescriptorFile -
+ * @return the new CAS
* @throws ResourceInitializationException -
* @throws InvalidXMLException -
* @throws IOException -
@@ -1043,10 +1064,12 @@ public class DocumentAnalyzer extends JFrame implements StatusCallbackListener,
displayFormatPanel.setLayout(new FlowLayout(FlowLayout.LEFT));
displayFormatPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
- if (generatedStyleMap)
+ if (generatedStyleMap) {
javaViewerRB.setSelected(true);
- else
+ }
+ else {
javaViewerUCRB.setSelected(true);
+ }
ButtonGroup displayFormatButtonGroup = new ButtonGroup();
displayFormatButtonGroup.add(javaViewerRB);
@@ -1090,6 +1113,7 @@ public class DocumentAnalyzer extends JFrame implements StatusCallbackListener,
mainPanel.add(southernPanel);
// Event Handling of analyze Button
analyzeButton.addActionListener(new ActionListener() {
+ @Override
public void actionPerformed(ActionEvent ee) {
analyzeTextArea();
}
@@ -1098,6 +1122,7 @@ public class DocumentAnalyzer extends JFrame implements StatusCallbackListener,
// event for the closeButton button
closeButton.addActionListener(new ActionListener() {
+ @Override
public void actionPerformed(ActionEvent evt) {
setVisible(false);
aiDialog.dispose();
diff --git a/uimaj-tools/src/main/java/org/apache/uima/tools/stylemap/StyleMapEditor.java b/uimaj-tools/src/main/java/org/apache/uima/tools/stylemap/StyleMapEditor.java
index 6c24202..1339f60 100644
--- a/uimaj-tools/src/main/java/org/apache/uima/tools/stylemap/StyleMapEditor.java
+++ b/uimaj-tools/src/main/java/org/apache/uima/tools/stylemap/StyleMapEditor.java
@@ -217,7 +217,8 @@ public class StyleMapEditor extends JDialog implements ActionListener {
// Style Edit OK Button event handle
okButton.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent evt) {
+ @Override
+ public void actionPerformed(ActionEvent evt) {
Vector vn = new Vector();
for (int row = 0; row < styleList.size(); row++) {
StyleMapEntry e = (StyleMapEntry) styleList.get(row);
@@ -246,14 +247,16 @@ public class StyleMapEditor extends JDialog implements ActionListener {
}
}
- if (buttonPress)
- styleMapEditorDialog.setVisible(false);
+ if (buttonPress) {
+ styleMapEditorDialog.setVisible(false);
+ }
}
});
// Style Edit Exit Button Event Handling
cancelButton.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent evt) {
+ @Override
+ public void actionPerformed(ActionEvent evt) {
buttonPress = false;
styleMapEditorDialog.setVisible(false);
}
@@ -264,7 +267,8 @@ public class StyleMapEditor extends JDialog implements ActionListener {
pack();
}
- public Dimension getPreferredSize() {
+ @Override
+public Dimension getPreferredSize() {
Dimension screenSize = getToolkit().getScreenSize();
Dimension d = super.getPreferredSize();
return new Dimension(screenSize.width, d.height);
@@ -273,6 +277,7 @@ public class StyleMapEditor extends JDialog implements ActionListener {
}
/**
+ * @param tae -
* @deprecated use {@link #setAnalysisEngine(AnalysisEngineDescription)} instead.
*/
@Deprecated
@@ -334,8 +339,9 @@ public class StyleMapEditor extends JDialog implements ActionListener {
// the corresponding Color objects as values.
// If stylemap XML is null, auto-generate it from metadata capabilities:
- if (aStyleMapXml == null)
- aStyleMapXml = AnnotationViewGenerator.autoGenerateStyleMap(aAnalysisEngineMetaData);
+ if (aStyleMapXml == null) {
+ aStyleMapXml = AnnotationViewGenerator.autoGenerateStyleMap(aAnalysisEngineMetaData);
+ }
return parseStyleList(aStyleMapXml);
}
@@ -364,7 +370,8 @@ public class StyleMapEditor extends JDialog implements ActionListener {
return styleList;
}
- public void actionPerformed(ActionEvent evt) {
+ @Override
+public void actionPerformed(ActionEvent evt) {
JComponent source = (JComponent) evt.getSource();
if (source == moveRowUpButton) {
@@ -499,11 +506,13 @@ public class StyleMapEditor extends JDialog implements ActionListener {
// Calculate adequate column widths:
int typeNameWidth = fm.stringWidth(e.getAnnotationTypeName());
- if (typeNameWidth > maxColumnWidths[StyleConstants.TYPE_NAME_COLUMN])
- maxColumnWidths[StyleConstants.TYPE_NAME_COLUMN] = typeNameWidth;
+ if (typeNameWidth > maxColumnWidths[StyleConstants.TYPE_NAME_COLUMN]) {
+ maxColumnWidths[StyleConstants.TYPE_NAME_COLUMN] = typeNameWidth;
+ }
int labelWidth = fm.stringWidth(e.getLabel().trim());
- if (labelWidth > maxColumnWidths[StyleConstants.LABEL_COLUMN])
- maxColumnWidths[StyleConstants.LABEL_COLUMN] = labelWidth;
+ if (labelWidth > maxColumnWidths[StyleConstants.LABEL_COLUMN]) {
+ maxColumnWidths[StyleConstants.LABEL_COLUMN] = labelWidth;
+ }
}
tableModel.set(data);
@@ -534,7 +543,8 @@ public class StyleMapEditor extends JDialog implements ActionListener {
final JButton button = new JButton("") {
private static final long serialVersionUID = 3955120051470642157L;
- public void setText(String s) {
+ @Override
+ public void setText(String s) {
// Button never shows text -- only color.
}
};
@@ -560,15 +570,18 @@ public class StyleMapEditor extends JDialog implements ActionListener {
// colorChooser.setChooserPanels(preferredPanels);
ActionListener okListener = new ActionListener() {
- public void actionPerformed(ActionEvent e) {
+ @Override
+ public void actionPerformed(ActionEvent e) {
colorEditor.currentColor = colorChooser.getColor();
Color newColor = colorEditor.currentColor;
StyleMapEntry entry = (StyleMapEntry) styleList.get(tbl.getSelectedRow());
int column = tbl.getSelectedColumn();
- if (column == StyleConstants.BG_COLUMN)
- entry.setBackground(newColor);
- else
- entry.setForeground(newColor);
+ if (column == StyleConstants.BG_COLUMN) {
+ entry.setBackground(newColor);
+ }
+ else {
+ entry.setForeground(newColor);
+ }
tbl.repaint();
}
@@ -578,7 +591,8 @@ public class StyleMapEditor extends JDialog implements ActionListener {
// Here's the code that brings up the dialog.
button.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
+ @Override
+ public void actionPerformed(ActionEvent e) {
button.setBackground(colorEditor.currentColor);
colorChooser.setColor(colorEditor.currentColor);
// Without the following line, the dialog comes up
@@ -618,12 +632,16 @@ public class StyleMapEditor extends JDialog implements ActionListener {
newStyle.append("<label>");
String label = e.getLabel();
if (label != null) {
- if ((label != null) && !label.equals(""))
- newStyle.append(label);
- else
- newStyle.append(e.getAnnotationTypeName());
- } else
+ if ((label != null) && !label.equals("")) {
+ newStyle.append(label);
+ }
+ else {
+ newStyle.append(e.getAnnotationTypeName());
+ }
+ }
+ else {
newStyle.append(e.getAnnotationTypeName());
+ }
newStyle.append("</label>\n");
newStyle.append("<style>");
diff --git a/uimaj-tools/src/main/java/org/apache/uima/tools/util/gui/SpringUtilities.java b/uimaj-tools/src/main/java/org/apache/uima/tools/util/gui/SpringUtilities.java
index bc43c6d..dd1518d 100644
--- a/uimaj-tools/src/main/java/org/apache/uima/tools/util/gui/SpringUtilities.java
+++ b/uimaj-tools/src/main/java/org/apache/uima/tools/util/gui/SpringUtilities.java
@@ -33,6 +33,7 @@ public class SpringUtilities {
/**
* A debugging utility that prints to stdout the component's minimum, preferred, and maximum
* sizes.
+ * @param c a component.
*/
public static void printSizes(Component c) {
System.out.println("minimumSize = " + c.getMinimumSize());