You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by sc...@apache.org on 2016/11/13 16:16:54 UTC
svn commit: r1769515 [1/2] - in
/uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main:
java/example/ java/org/apache/uima/examples/
java/org/apache/uima/examples/cpe/ java/org/apache/uima/examples/tokenizer/
java/org/apache/uima/examples/xmi/...
Author: schor
Date: Sun Nov 13 16:16:53 2016
New Revision: 1769515
URL: http://svn.apache.org/viewvc?rev=1769515&view=rev
Log:
[UIMA-5172] javadoc improvements so they pass lint checking on Java 8. Also added some @Overrides
Added:
uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/run_configuration/UIMA Run V3 migrate JCas PEAR.launch
uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/run_configuration/UIMA Run V3 migrate JCas unzipped PEAR.launch
uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/run_configuration/UIMA Run V3 migrate JCas.launch
Modified:
uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/example/PersonTitle.java
uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/PrintAnnotations.java
uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/RunAE.java
uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/SofaExampleApplication.java
uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/SourceDocumentInformation.java
uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/cpe/AnnotationPrinter.java
uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/cpe/FileSystemCollectionReader.java
uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/cpe/InlineXmlCasConsumer.java
uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/cpe/PersonTitleDBWriterCasConsumer.java
uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/cpe/SimpleRunCPE.java
uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/cpe/SimpleRunCPM.java
uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/cpe/XCasWriterCasConsumer.java
uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/tokenizer/Sentence.java
uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/tokenizer/SimpleTokenAndSentenceAnnotator.java
uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/tokenizer/Token.java
uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/xmi/Ecore2UimaTypeSystem.java
uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/xmi/UimaTypeSystem2Ecore.java
uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/tutorial/DateAnnot.java
uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/tutorial/DateTimeAnnot.java
uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/tutorial/Meeting.java
uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/tutorial/RoomNumber.java
uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/tutorial/SentenceAnnot.java
uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/tutorial/TimeAnnot.java
uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/tutorial/UimaAcronym.java
uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/tutorial/UimaMeeting.java
uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/tutorial/WordAnnot.java
uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/run_configuration/UIMA Annotation Viewer.launch
uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/run_configuration/UIMA CAS Visual Debugger.launch
uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/run_configuration/UIMA CPE GUI.launch
uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/run_configuration/UIMA Document Analyzer.launch
uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/run_configuration/UIMA JCasGen Merge.launch
uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/run_configuration/UIMA JCasGen.launch
uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/run_configuration/UIMA PEAR Installer.launch
uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/run_configuration/UIMA Run AE.launch
uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/run_configuration/UIMA Run CPE.launch
uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/run_configuration/UIMA Start VNS.launch
uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/run_configuration/UIMA Start Vinci Service.launch
Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/example/PersonTitle.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/example/PersonTitle.java?rev=1769515&r1=1769514&r2=1769515&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/example/PersonTitle.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/example/PersonTitle.java Sun Nov 13 16:16:53 2016
@@ -25,6 +25,7 @@ import org.apache.uima.cas.impl.CASImpl;
import org.apache.uima.cas.impl.TypeImpl;
import org.apache.uima.cas.impl.TypeSystemImpl;
+// TODO: Auto-generated Javadoc
/**
* A Personal Title. Updated by JCasGen Mon May 23 17:48:43 EDT 2005 XML source:
* c:\a\eclipse\301jxe\jedii_examples\descriptors\analysis_engine\NamesAndPersonTitles_TAE.xml
@@ -34,22 +35,32 @@ import org.apache.uima.cas.impl.TypeSyst
public class PersonTitle extends Annotation {
/**
- * @generated
- * @ordered
- */
+ * The Constant typeIndexID.
+ *
+ * @generated
+ * @ordered
+ */
public static final int typeIndexID = JCasRegistry.register(PersonTitle.class);
/**
- * @generated
- * @ordered
- */
+ * The Constant type.
+ *
+ * @generated
+ * @ordered
+ */
public static final int type = typeIndexID;
- /** @generated */
+ /**
+ * Gets the type index ID.
+ *
+ * @return the type index ID
+ * @generated
+ */
public int getTypeIndexID() {
return typeIndexID;
}
+ /** The Constant _FI_Kind. */
public static final int _FI_Kind = TypeSystemImpl.getAdjustedFeatureOffset("Kind");
/**
@@ -61,21 +72,35 @@ public class PersonTitle extends Annotat
}
/**
- * Internal - constructor used by generator
- *
- * @generated
- */
+ * Internal - constructor used by generator.
+ *
+ * @param type the type
+ * @param casImpl the cas impl
+ * @generated
+ */
public PersonTitle(TypeImpl type, CASImpl casImpl) {
super(type, casImpl);
readObject();
}
- /** @generated */
+ /**
+ * Instantiates a new person title.
+ *
+ * @param jcas the jcas
+ * @generated
+ */
public PersonTitle(JCas jcas) {
super(jcas);
readObject();
}
+ /**
+ * Instantiates a new person title.
+ *
+ * @param jcas the jcas
+ * @param begin the begin
+ * @param end the end
+ */
public PersonTitle(JCas jcas, int begin, int end) {
super(jcas);
setBegin(begin);
@@ -84,29 +109,31 @@ public class PersonTitle extends Annotat
}
/**
- * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
- *
- * @generated modifiable
- */
+ * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->.
+ *
+ * @generated modifiable
+ */
private void readObject() {
}
// *--------------*
// * Feature: Kind
/**
- * getter for Kind - gets The kind of title - Civilian, Military, or Government.
- *
- * @generated
- */
+ * getter for Kind - gets The kind of title - Civilian, Military, or Government.
+ *
+ * @return the kind
+ * @generated
+ */
public String getKind() {
return _getStringValueNc(_FI_Kind);
}
/**
- * setter for Kind - sets The kind of title - Civilian, Military, or Government.
- *
- * @generated
- */
+ * setter for Kind - sets The kind of title - Civilian, Military, or Government.
+ *
+ * @param v the new kind
+ * @generated
+ */
public void setKind(String v) {
_setStringValueNfc(_FI_Kind, v);
}
Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/PrintAnnotations.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/PrintAnnotations.java?rev=1769515&r1=1769514&r2=1769515&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/PrintAnnotations.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/PrintAnnotations.java Sun Nov 13 16:16:53 2016
@@ -40,6 +40,7 @@ import org.apache.uima.resource.Resource
import org.apache.uima.util.FileUtils;
import org.apache.uima.util.XMLInputSource;
+// TODO: Auto-generated Javadoc
/**
* A simple example of how to extract information from the CAS. This example retrieves all
* annotations of a specified type from a CAS and prints them (along with all of their features) to
@@ -230,6 +231,8 @@ public class PrintAnnotations {
* Main program for testing this class. Ther are two required arguments - the path to the XML
* descriptor for the TAE to run and an input file. Additional arguments are Type or Feature names
* to be included in the ResultSpecification passed to the TAE.
+ *
+ * @param args the arguments
*/
public static void main(String[] args) {
try {
Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/RunAE.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/RunAE.java?rev=1769515&r1=1769514&r2=1769515&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/RunAE.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/RunAE.java Sun Nov 13 16:16:53 2016
@@ -46,6 +46,7 @@ import org.apache.uima.tools.components.
import org.apache.uima.tools.components.XmlDetagger;
import org.apache.uima.util.AnalysisEnginePerformanceReports;
+// TODO: Auto-generated Javadoc
/**
* An example application that reads documents from the file system, sends them though an Analysis
* Engine(AE), and produces XML files with inline annotations. This application uses a
@@ -76,35 +77,50 @@ import org.apache.uima.util.AnalysisEngi
*/
public class RunAE implements StatusCallbackListener {
+ /** The ae specifier file. */
// Values read from cmd line args
private File aeSpecifierFile = null;
+ /** The input dir. */
private File inputDir = null;
+ /** The output dir. */
private File outputDir = null;
+ /** The xml tag name. */
private String xmlTagName = null;
+ /** The language. */
private String language;
+ /** The encoding. */
private String encoding;
+ /** The gen progress messages. */
private boolean genProgressMessages = true;
+ /** The stats level. */
private int statsLevel = 1;
+ /** The xcas input. */
private boolean xcasInput = false;
+ /** The xmi input. */
private boolean xmiInput = false;
+ /** The x lenient. */
private boolean xLenient = false;
+ /** The docs processed. */
int docsProcessed;
+ /** The m CPE. */
private CollectionProcessingEngine mCPE;
/**
* Constructor. Sets up and runs an Analysis Engine.
+ *
+ * @param args the args
*/
public RunAE(String[] args) {
try {
@@ -235,12 +251,18 @@ public class RunAE implements StatusCall
/**
+ * Initialization complete.
+ *
* @see org.apache.uima.collection.base_cpm.BaseStatusCallbackListener#initializationComplete()
*/
public void initializationComplete() {
}
/**
+ * Entity process complete.
+ *
+ * @param aCas the a cas
+ * @param aStatus the a status
* @see org.apache.uima.collection.StatusCallbackListener#entityProcessComplete(org.apache.uima.cas.CAS,
* org.apache.uima.collection.EntityProcessStatus)
*/
@@ -268,6 +290,8 @@ public class RunAE implements StatusCall
}
/**
+ * Aborted.
+ *
* @see org.apache.uima.collection.base_cpm.BaseStatusCallbackListener#aborted()
*/
public void aborted() {
@@ -276,12 +300,16 @@ public class RunAE implements StatusCall
}
/**
+ * Batch process complete.
+ *
* @see org.apache.uima.collection.base_cpm.BaseStatusCallbackListener#batchProcessComplete()
*/
public void batchProcessComplete() {
}
/**
+ * Collection process complete.
+ *
* @see org.apache.uima.collection.base_cpm.BaseStatusCallbackListener#collectionProcessComplete()
*/
public void collectionProcessComplete() {
@@ -299,12 +327,16 @@ public class RunAE implements StatusCall
}
/**
+ * Paused.
+ *
* @see org.apache.uima.collection.base_cpm.BaseStatusCallbackListener#paused()
*/
public void paused() {
}
/**
+ * Resumed.
+ *
* @see org.apache.uima.collection.base_cpm.BaseStatusCallbackListener#resumed()
*/
public void resumed() {
@@ -338,7 +370,8 @@ public class RunAE implements StatusCall
/**
* Reads command line arguments and sets static class variables appropriately.
- *
+ *
+ * @param args the args
* @return true if command line args were valid, false if not
*/
private boolean processCmdLineArgs(String[] args) {
@@ -416,6 +449,11 @@ public class RunAE implements StatusCall
return (aeSpecifierFile != null) && (inputDir != null);
}
+ /**
+ * The main method.
+ *
+ * @param args the arguments
+ */
public static void main(String[] args) {
new RunAE(args);
}
Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/SofaExampleApplication.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/SofaExampleApplication.java?rev=1769515&r1=1769514&r2=1769515&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/SofaExampleApplication.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/SofaExampleApplication.java Sun Nov 13 16:16:53 2016
@@ -33,6 +33,7 @@ import org.apache.uima.cas.Type;
import org.apache.uima.cas.text.AnnotationFS;
import org.apache.uima.util.XMLInputSource;
+// TODO: Auto-generated Javadoc
/**
* A simple Multiple Subject of Analysis (multi-Sofa) test application. Creates a text Sofa with
* English text, calls an annotator that creates a text Sofa with German text, then dumps all
@@ -41,9 +42,13 @@ import org.apache.uima.util.XMLInputSour
* The application takes no arguments.
*/
public class SofaExampleApplication {
+
/**
- * Main program
- *
+ * Main program.
+ *
+ * @param args the arguments
+ * @throws UIMAException the UIMA exception
+ * @throws IOException Signals that an I/O exception has occurred.
*/
public static void main(String[] args) throws UIMAException, IOException {
// parse AnalysisEngine descriptor
Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/SourceDocumentInformation.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/SourceDocumentInformation.java?rev=1769515&r1=1769514&r2=1769515&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/SourceDocumentInformation.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/SourceDocumentInformation.java Sun Nov 13 16:16:53 2016
@@ -1,5 +1,21 @@
-
-
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
/* Apache UIMA v3 - First created by JCasGen Wed Mar 02 13:42:57 EST 2016 */
Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/cpe/AnnotationPrinter.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/cpe/AnnotationPrinter.java?rev=1769515&r1=1769514&r2=1769515&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/cpe/AnnotationPrinter.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/cpe/AnnotationPrinter.java Sun Nov 13 16:16:53 2016
@@ -36,6 +36,7 @@ import org.apache.uima.resource.Resource
import org.apache.uima.resource.ResourceProcessException;
import org.apache.uima.util.ProcessTrace;
+// TODO: Auto-generated Javadoc
/**
* An example of CAS Consumer. <br>
* AnnotationPrinter prints to an output file all annotations in the CAS. <br>
@@ -52,10 +53,16 @@ import org.apache.uima.util.ProcessTrace
*/
public class AnnotationPrinter extends CasConsumer_ImplBase implements CasObjectProcessor {
+
+ /** The out file. */
File outFile;
+ /** The file writer. */
FileWriter fileWriter;
+ /**
+ * Instantiates a new annotation printer.
+ */
public AnnotationPrinter() {
}
Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/cpe/FileSystemCollectionReader.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/cpe/FileSystemCollectionReader.java?rev=1769515&r1=1769514&r2=1769515&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/cpe/FileSystemCollectionReader.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/cpe/FileSystemCollectionReader.java Sun Nov 13 16:16:53 2016
@@ -36,6 +36,7 @@ import org.apache.uima.util.FileUtils;
import org.apache.uima.util.Progress;
import org.apache.uima.util.ProgressImpl;
+// TODO: Auto-generated Javadoc
/**
* A simple collection reader that reads documents from a directory in the filesystem. It can be
* configured with the following parameters:
@@ -72,17 +73,25 @@ public class FileSystemCollectionReader
*/
public static final String PARAM_SUBDIR = "BrowseSubdirectories";
+ /** The m files. */
private ArrayList<File> mFiles;
+ /** The m encoding. */
private String mEncoding;
+ /** The m language. */
private String mLanguage;
+ /** The m recursive. */
private Boolean mRecursive;
+ /** The m current index. */
private int mCurrentIndex;
/**
+ * Initialize.
+ *
+ * @throws ResourceInitializationException the resource initialization exception
* @see org.apache.uima.collection.CollectionReader_ImplBase#initialize()
*/
public void initialize() throws ResourceInitializationException {
@@ -111,8 +120,8 @@ public class FileSystemCollectionReader
* This method adds files in the directory passed in as a parameter to mFiles.
* If mRecursive is true, it will include all files in all
* subdirectories (recursively), as well.
- *
- * @param dir
+ *
+ * @param dir the dir
*/
private void addFilesFromDir(File dir) {
File[] files = dir.listFiles();
@@ -126,6 +135,9 @@ public class FileSystemCollectionReader
}
/**
+ * Checks for next.
+ *
+ * @return true, if successful
* @see org.apache.uima.collection.CollectionReader#hasNext()
*/
public boolean hasNext() {
@@ -133,6 +145,11 @@ public class FileSystemCollectionReader
}
/**
+ * Gets the next.
+ *
+ * @param aCAS the a CAS
+ * @throws IOException Signals that an I/O exception has occurred.
+ * @throws CollectionException the collection exception
* @see org.apache.uima.collection.CollectionReader#getNext(org.apache.uima.cas.CAS)
*/
public void getNext(CAS aCAS) throws IOException, CollectionException {
@@ -168,12 +185,18 @@ public class FileSystemCollectionReader
}
/**
+ * Close.
+ *
+ * @throws IOException Signals that an I/O exception has occurred.
* @see org.apache.uima.collection.base_cpm.BaseCollectionReader#close()
*/
public void close() throws IOException {
}
/**
+ * Gets the progress.
+ *
+ * @return the progress
* @see org.apache.uima.collection.base_cpm.BaseCollectionReader#getProgress()
*/
public Progress[] getProgress() {
Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/cpe/InlineXmlCasConsumer.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/cpe/InlineXmlCasConsumer.java?rev=1769515&r1=1769514&r2=1769515&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/cpe/InlineXmlCasConsumer.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/cpe/InlineXmlCasConsumer.java Sun Nov 13 16:16:53 2016
@@ -35,6 +35,7 @@ import org.apache.uima.resource.Resource
import org.apache.uima.resource.ResourceProcessException;
import org.apache.uima.util.CasToInlineXml;
+// TODO: Auto-generated Javadoc
/**
* A simple CAS consumer that generates inline XML and writes it to a file. UTF-8 encoding is used.
* <p>
@@ -52,12 +53,18 @@ public class InlineXmlCasConsumer extend
*/
public static final String PARAM_OUTPUTDIR = "OutputDirectory";
+ /** The m output dir. */
private File mOutputDir;
+ /** The cas 2 xml. */
private CasToInlineXml cas2xml;
+ /** The m doc num. */
private int mDocNum;
+ /* (non-Javadoc)
+ * @see org.apache.uima.collection.CasConsumer_ImplBase#initialize()
+ */
public void initialize() throws ResourceInitializationException {
mDocNum = 0;
mOutputDir = new File(((String) getConfigParameterValue(PARAM_OUTPUTDIR)).trim());
Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/cpe/PersonTitleDBWriterCasConsumer.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/cpe/PersonTitleDBWriterCasConsumer.java?rev=1769515&r1=1769514&r2=1769515&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/cpe/PersonTitleDBWriterCasConsumer.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/cpe/PersonTitleDBWriterCasConsumer.java Sun Nov 13 16:16:53 2016
@@ -39,6 +39,7 @@ import org.apache.uima.util.ProcessTrace
import example.PersonTitle;
+// TODO: Auto-generated Javadoc
/**
* A simple CAS consumer that creates a Derby (Cloudscape) database in the file system. You can
* obtain this database from http://incubator.apache.org/derby/ *
@@ -75,26 +76,39 @@ public class PersonTitleDBWriterCasConsu
*/
public static final String PARAM_OUTPUTDIR = "OutputDirectory";
+ /** The Constant MAX_URI_LENGTH. */
public static final int MAX_URI_LENGTH = 80;
+ /** The Constant MAX_TITLE_LENGTH. */
public static final int MAX_TITLE_LENGTH = 20;
+ /** The Constant DB_LOAD_BATCH_SIZE. */
public static final int DB_LOAD_BATCH_SIZE = 50;
+ /** The batch counter. */
private int batchCounter = DB_LOAD_BATCH_SIZE;
+ /** The m output dir. */
private File mOutputDir;
+ /** The first call. */
private boolean firstCall = true;
+ /** The first ever call. */
private static boolean firstEverCall = true;
+ /** The stmt. */
private PreparedStatement stmt;
+ /** The con. */
private Connection con;
+ /** The start time. */
private long startTime;
+ /* (non-Javadoc)
+ * @see org.apache.uima.collection.CasConsumer_ImplBase#initialize()
+ */
public void initialize() throws ResourceInitializationException {
startTime = System.currentTimeMillis();
System.out
@@ -277,6 +291,9 @@ public class PersonTitleDBWriterCasConsu
}
}
+ /* (non-Javadoc)
+ * @see org.apache.uima.collection.CasConsumer_ImplBase#collectionProcessComplete(org.apache.uima.util.ProcessTrace)
+ */
public void collectionProcessComplete(ProcessTrace arg0) throws ResourceProcessException,
IOException {
firstCall = true;
@@ -312,6 +329,11 @@ public class PersonTitleDBWriterCasConsu
}
}
+ /**
+ * Delete dir.
+ *
+ * @param f the f
+ */
private void deleteDir(File f) {
if (f.isDirectory()) {
String[] contents = f.list();
@@ -322,6 +344,13 @@ public class PersonTitleDBWriterCasConsu
f.delete();
}
+ /**
+ * Truncate.
+ *
+ * @param s the s
+ * @param length the length
+ * @return the string
+ */
private String truncate(String s, int length) {
if (s.length() <= length)
return s;
Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/cpe/SimpleRunCPE.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/cpe/SimpleRunCPE.java?rev=1769515&r1=1769514&r2=1769515&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/cpe/SimpleRunCPE.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/cpe/SimpleRunCPE.java Sun Nov 13 16:16:53 2016
@@ -31,6 +31,7 @@ import org.apache.uima.collection.Status
import org.apache.uima.collection.metadata.CpeDescription;
import org.apache.uima.util.XMLInputSource;
+// TODO: Auto-generated Javadoc
/**
* Main Class that runs a Collection Processing Engine (CPE). This class reads a CPE Descriptor as a
* command-line argument and instantiates the CPE. It also registers a callback listener with the
@@ -44,21 +45,17 @@ public class SimpleRunCPE extends Thread
*/
private CollectionProcessingEngine mCPE;
- /**
- * Start time of CPE initialization
- */
+ /** Start time of CPE initialization. */
private long mStartTime;
- /**
- * Start time of the processing
- */
+ /** Start time of the processing. */
private long mInitCompleteTime;
/**
* Constructor for the class.
- *
- * @param args
- * command line arguments into the program - see class description
+ *
+ * @param args command line arguments into the program - see class description
+ * @throws Exception the exception
*/
public SimpleRunCPE(String args[]) throws Exception {
mStartTime = System.currentTimeMillis();
@@ -97,6 +94,9 @@ public class SimpleRunCPE extends Thread
}
+ /**
+ * Prints the usage message.
+ */
private static void printUsageMessage() {
System.out.println(" Arguments to the program are as follows : \n"
+ "args[0] : path to CPE descriptor file");
@@ -104,9 +104,9 @@ public class SimpleRunCPE extends Thread
/**
* main class.
- *
- * @param args
- * Command line arguments - see class description
+ *
+ * @param args Command line arguments - see class description
+ * @throws Exception the exception
*/
public static void main(String[] args) throws Exception {
new SimpleRunCPE(args);
@@ -118,8 +118,11 @@ public class SimpleRunCPE extends Thread
*
*/
class StatusCallbackListenerImpl implements StatusCallbackListener {
+
+ /** The entity count. */
int entityCount = 0;
+ /** The size. */
long size = 0;
/**
Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/cpe/SimpleRunCPM.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/cpe/SimpleRunCPM.java?rev=1769515&r1=1769514&r2=1769515&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/cpe/SimpleRunCPM.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/cpe/SimpleRunCPM.java Sun Nov 13 16:16:53 2016
@@ -34,6 +34,7 @@ import org.apache.uima.collection.Status
import org.apache.uima.resource.ResourceSpecifier;
import org.apache.uima.util.XMLInputSource;
+// TODO: Auto-generated Javadoc
/**
* Main Class that runs the Collection Processing Manager (CPM). This class reads descriptor files
* and initiailizes the following components:
@@ -72,9 +73,10 @@ public class SimpleRunCPM extends Thread
/**
* Constructor for the class.
- *
- * @param args
- * command line arguments into the program - see class description
+ *
+ * @param args command line arguments into the program - see class description
+ * @throws UIMAException the UIMA exception
+ * @throws IOException Signals that an I/O exception has occurred.
*/
public SimpleRunCPM(String args[]) throws UIMAException, IOException {
mStartTime = System.currentTimeMillis();
@@ -123,6 +125,9 @@ public class SimpleRunCPM extends Thread
}
+ /**
+ * Prints the usage message.
+ */
private static void printUsageMessage() {
System.out.println(" Arguments to the program are as follows : \n"
+ "args[0] : Collection Reader descriptor file \n "
@@ -132,9 +137,10 @@ public class SimpleRunCPM extends Thread
/**
* main class.
- *
- * @param args
- * Command line arguments - see class description
+ *
+ * @param args Command line arguments - see class description
+ * @throws UIMAException the UIMA exception
+ * @throws IOException Signals that an I/O exception has occurred.
*/
public static void main(String[] args) throws UIMAException, IOException {
new SimpleRunCPM(args);
@@ -146,8 +152,11 @@ public class SimpleRunCPM extends Thread
*
*/
class StatusCallbackListenerImpl implements StatusCallbackListener {
+
+ /** The entity count. */
int entityCount = 0;
+ /** The size. */
long size = 0;
/**
Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/cpe/XCasWriterCasConsumer.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/cpe/XCasWriterCasConsumer.java?rev=1769515&r1=1769514&r2=1769515&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/cpe/XCasWriterCasConsumer.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/cpe/XCasWriterCasConsumer.java Sun Nov 13 16:16:53 2016
@@ -49,6 +49,7 @@ import org.apache.uima.resource.Resource
import org.apache.uima.util.XMLSerializer;
import org.xml.sax.SAXException;
+// TODO: Auto-generated Javadoc
/**
* A simple CAS consumer that generates XCAS (XML representation of the CAS) files in the
* filesystem.
@@ -67,10 +68,15 @@ public class XCasWriterCasConsumer exten
*/
public static final String PARAM_OUTPUTDIR = "OutputDirectory";
+ /** The m output dir. */
private File mOutputDir;
+ /** The m doc num. */
private int mDocNum;
+ /* (non-Javadoc)
+ * @see org.apache.uima.collection.CasConsumer_ImplBase#initialize()
+ */
public void initialize() throws ResourceInitializationException {
mDocNum = 0;
mOutputDir = new File((String) getConfigParameterValue(PARAM_OUTPUTDIR));
@@ -130,17 +136,12 @@ public class XCasWriterCasConsumer exten
}
/**
- * Serialize a CAS to a file in XCAS format
- *
- * @param aCas
- * CAS to serialize
- * @param name
- * output file
- *
- * @throws IOException
- * if an I/O failure occurs
- * @throws SAXException
- * if an error occurs generating the XML text
+ * Serialize a CAS to a file in XCAS format.
+ *
+ * @param aCas CAS to serialize
+ * @param name output file
+ * @throws IOException if an I/O failure occurs
+ * @throws SAXException if an error occurs generating the XML text
*/
private void writeXCas(CAS aCas, File name) throws IOException, SAXException {
FileOutputStream out = null;
Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/tokenizer/Sentence.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/tokenizer/Sentence.java?rev=1769515&r1=1769514&r2=1769515&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/tokenizer/Sentence.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/tokenizer/Sentence.java Sun Nov 13 16:16:53 2016
@@ -25,29 +25,58 @@ import org.apache.uima.cas.impl.CASImpl;
import org.apache.uima.cas.impl.TypeImpl;
import org.apache.uima.cas.impl.TypeSystemImpl;
+// TODO: Auto-generated Javadoc
+/**
+ * The Class Sentence.
+ */
public class Sentence extends Annotation {
+ /** The Constant typeIndexID. */
public static final int typeIndexID = JCasRegistry.register(Sentence.class);
+ /** The Constant type. */
public static final int type = typeIndexID;
+ /* (non-Javadoc)
+ * @see org.apache.uima.jcas.tcas.Annotation#getTypeIndexID()
+ */
public int getTypeIndexID() {
return typeIndexID;
}
+ /**
+ * Instantiates a new sentence.
+ */
// Never called. Disable default constructor
protected Sentence() {
}
- /** Internal - Constructor used by generator */
+ /**
+ * Internal - Constructor used by generator.
+ *
+ * @param type the type
+ * @param casImpl the cas impl
+ */
public Sentence(TypeImpl type, CASImpl casImpl) {
super(type, casImpl);
}
+ /**
+ * Instantiates a new sentence.
+ *
+ * @param jcas the jcas
+ */
public Sentence(JCas jcas) {
super(jcas);
}
+ /**
+ * Instantiates a new sentence.
+ *
+ * @param jcas the jcas
+ * @param start the start
+ * @param end the end
+ */
public Sentence(JCas jcas, int start, int end) {
super(jcas, start, end);
}
Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/tokenizer/SimpleTokenAndSentenceAnnotator.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/tokenizer/SimpleTokenAndSentenceAnnotator.java?rev=1769515&r1=1769514&r2=1769515&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/tokenizer/SimpleTokenAndSentenceAnnotator.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/tokenizer/SimpleTokenAndSentenceAnnotator.java Sun Nov 13 16:16:53 2016
@@ -28,30 +28,49 @@ import org.apache.uima.analysis_engine.A
import org.apache.uima.jcas.JCas;
import org.apache.uima.jcas.tcas.Annotation;
+// TODO: Auto-generated Javadoc
/**
* An example annotator that annotates Tokens and Sentences.
*/
public class SimpleTokenAndSentenceAnnotator extends JCasAnnotator_ImplBase {
+ /**
+ * The Class Maker.
+ */
static abstract class Maker {
+
+ /**
+ * New annotation.
+ *
+ * @param jcas the jcas
+ * @param start the start
+ * @param end the end
+ * @return the annotation
+ */
abstract Annotation newAnnotation(JCas jcas, int start, int end);
}
+ /** The jcas. */
JCas jcas;
+ /** The input. */
String input;
+ /** The pp. */
ParsePosition pp = new ParsePosition(0);
// ****************************************
// * Static vars holding break iterators
+ /** The Constant sentenceBreak. */
// ****************************************
static final BreakIterator sentenceBreak = BreakIterator.getSentenceInstance(Locale.US);
+ /** The Constant wordBreak. */
static final BreakIterator wordBreak = BreakIterator.getWordInstance(Locale.US);
// *********************************************
// * function pointers for new instances *
+ /** The Constant sentenceAnnotationMaker. */
// *********************************************
static final Maker sentenceAnnotationMaker = new Maker() {
Annotation newAnnotation(JCas jcas, int start, int end) {
@@ -59,6 +78,7 @@ public class SimpleTokenAndSentenceAnnot
}
};
+ /** The Constant tokenAnnotationMaker. */
static final Maker tokenAnnotationMaker = new Maker() {
Annotation newAnnotation(JCas jcas, int start, int end) {
return new Token(jcas, start, end);
@@ -67,6 +87,9 @@ public class SimpleTokenAndSentenceAnnot
// *************************************************************
// * process *
+ /* (non-Javadoc)
+ * @see org.apache.uima.analysis_component.JCasAnnotator_ImplBase#process(org.apache.uima.jcas.JCas)
+ */
// *************************************************************
public void process(JCas aJCas) throws AnalysisEngineProcessException {
jcas = aJCas;
@@ -79,6 +102,12 @@ public class SimpleTokenAndSentenceAnnot
// *************************************************************
// * Helper Methods *
+ /**
+ * Make annotations.
+ *
+ * @param m the m
+ * @param b the b
+ */
// *************************************************************
void makeAnnotations(Maker m, BreakIterator b) {
b.setText(input);
Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/tokenizer/Token.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/tokenizer/Token.java?rev=1769515&r1=1769514&r2=1769515&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/tokenizer/Token.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/tokenizer/Token.java Sun Nov 13 16:16:53 2016
@@ -25,29 +25,58 @@ import org.apache.uima.cas.impl.CASImpl;
import org.apache.uima.cas.impl.TypeImpl;
import org.apache.uima.cas.impl.TypeSystemImpl;
+// TODO: Auto-generated Javadoc
+/**
+ * The Class Token.
+ */
public class Token extends Annotation {
+ /** The Constant typeIndexID. */
public static final int typeIndexID = JCasRegistry.register(Token.class);
+ /** The Constant type. */
public static final int type = typeIndexID;
+ /* (non-Javadoc)
+ * @see org.apache.uima.jcas.tcas.Annotation#getTypeIndexID()
+ */
public int getTypeIndexID() {
return typeIndexID;
}
+ /**
+ * Instantiates a new token.
+ */
// Never called. Disable default constructor
protected Token() {
}
- /** Internal - Constructor used by generator */
+ /**
+ * Internal - Constructor used by generator.
+ *
+ * @param type the type
+ * @param casImpl the cas impl
+ */
public Token(TypeImpl type, CASImpl casImpl) {
super(type, casImpl);
}
+ /**
+ * Instantiates a new token.
+ *
+ * @param jcas the jcas
+ */
public Token(JCas jcas) {
super(jcas);
}
+ /**
+ * Instantiates a new token.
+ *
+ * @param jcas the jcas
+ * @param start the start
+ * @param end the end
+ */
public Token(JCas jcas, int start, int end) {
super(jcas, start, end);
}
Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/xmi/Ecore2UimaTypeSystem.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/xmi/Ecore2UimaTypeSystem.java?rev=1769515&r1=1769514&r2=1769515&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/xmi/Ecore2UimaTypeSystem.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/xmi/Ecore2UimaTypeSystem.java Sun Nov 13 16:16:53 2016
@@ -57,6 +57,7 @@ import org.eclipse.emf.ecore.resource.im
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl;
+// TODO: Auto-generated Javadoc
/**
* Converts an Ecore model to a UIMA TypeSystemDescription.
*/
@@ -78,6 +79,7 @@ public class Ecore2UimaTypeSystem {
*/
public static final String OPTION_CREATE_ANNOTATION_SUBTYPES = "OPTION_CREATE_ANNOTATION_SUBTYPES";
+ /** The uima factory. */
private static ResourceSpecifierFactory uimaFactory = UIMAFramework.getResourceSpecifierFactory();
/**
@@ -156,6 +158,14 @@ public class Ecore2UimaTypeSystem {
return tsDesc;
}
+ /**
+ * E package 2 uima types.
+ *
+ * @param aEPackage the a E package
+ * @param aResultTypes the a result types
+ * @param aOptions the a options
+ * @throws URISyntaxException the URI syntax exception
+ */
private static void ePackage2UimaTypes(EPackage aEPackage, List aResultTypes, Map aOptions)
throws URISyntaxException {
String nsUri = aEPackage.getNsURI();
@@ -188,6 +198,15 @@ public class Ecore2UimaTypeSystem {
}
}
+ /**
+ * Eclass 2 uima type.
+ *
+ * @param aEClass the a E class
+ * @param aUimaNamespace the a uima namespace
+ * @param aOptions the a options
+ * @return the type description
+ * @throws URISyntaxException the URI syntax exception
+ */
private static TypeDescription eclass2UimaType(EClass aEClass, String aUimaNamespace, Map aOptions)
throws URISyntaxException {
TypeDescription type = uimaFactory.createTypeDescription();
@@ -273,6 +292,13 @@ public class Ecore2UimaTypeSystem {
return type;
}
+ /**
+ * Contains named element.
+ *
+ * @param locallyDefinedFeatures the locally defined features
+ * @param name the name
+ * @return true, if successful
+ */
private static boolean containsNamedElement(EList locallyDefinedFeatures, String name) {
Iterator iter = locallyDefinedFeatures.iterator();
while (iter.hasNext()) {
@@ -286,6 +312,15 @@ public class Ecore2UimaTypeSystem {
return false;
}
+ /**
+ * Eenum 2 uima type.
+ *
+ * @param aEEnum the a E enum
+ * @param aUimaNamespace the a uima namespace
+ * @param aOptions the a options
+ * @return the type description
+ * @throws URISyntaxException the URI syntax exception
+ */
private static TypeDescription eenum2UimaType(EEnum aEEnum, String aUimaNamespace, Map aOptions)
throws URISyntaxException {
TypeDescription type = uimaFactory.createTypeDescription();
@@ -319,8 +354,12 @@ public class Ecore2UimaTypeSystem {
}
/**
- * @param attr -
+ * E structural feature 2 uima feature.
+ *
+ * @param aStructuralFeature the a structural feature
+ * @param aOptions the a options
* @return -
+ * @throws URISyntaxException the URI syntax exception
*/
private static FeatureDescription eStructuralFeature2UimaFeature(
EStructuralFeature aStructuralFeature, Map aOptions) throws URISyntaxException {
@@ -377,6 +416,12 @@ public class Ecore2UimaTypeSystem {
return feat;
}
+ /**
+ * Checks if is array or list.
+ *
+ * @param rangeTypeName the range type name
+ * @return true, if is array or list
+ */
private static boolean isArrayOrList(String rangeTypeName) {
return CAS.TYPE_NAME_FS_LIST.equals(rangeTypeName)
|| CAS.TYPE_NAME_INTEGER_LIST.equals(rangeTypeName)
@@ -394,6 +439,15 @@ public class Ecore2UimaTypeSystem {
}
+ /**
+ * Gets the uima type name.
+ *
+ * @param aEcoreType the a ecore type
+ * @param aMultiValued the a multi valued
+ * @param aOptions the a options
+ * @return the uima type name
+ * @throws URISyntaxException the URI syntax exception
+ */
private static String getUimaTypeName(EClassifier aEcoreType, boolean aMultiValued, Map aOptions)
throws URISyntaxException {
boolean useUimaLists = Boolean.TRUE.equals(aOptions.get(OPTION_GENERATE_UIMA_LIST_TYPES));
@@ -461,6 +515,13 @@ public class Ecore2UimaTypeSystem {
}
}
+ /**
+ * Namespace uri 2 uima namespace.
+ *
+ * @param nsUri the ns uri
+ * @return the string
+ * @throws URISyntaxException the URI syntax exception
+ */
private static String namespaceUri2UimaNamespace(String nsUri) throws URISyntaxException {
// Check for the special "no namespace URI", which maps to the null UIMA namespace
if (XmiCasSerializer.DEFAULT_NAMESPACE_URI.equals(nsUri)) {
@@ -491,6 +552,9 @@ 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 the arguments
+ * @throws Exception the exception
*/
public static void main(String[] args) throws Exception {
if (args.length != 2) {
Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/xmi/UimaTypeSystem2Ecore.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/xmi/UimaTypeSystem2Ecore.java?rev=1769515&r1=1769514&r2=1769515&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/xmi/UimaTypeSystem2Ecore.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/examples/xmi/UimaTypeSystem2Ecore.java Sun Nov 13 16:16:53 2016
@@ -54,26 +54,22 @@ import org.eclipse.emf.ecore.resource.Re
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl;
+// TODO: Auto-generated Javadoc
/**
* Converts a UIMA TypeSystemDescription to an Ecore model.
*/
public class UimaTypeSystem2Ecore {
+
/**
- * Converts a UIMA TypeSystem descriptor to an Ecore model
- *
- * @param aUimaTypeSystemFilePath
- * file path to UIMA TypeSystem descritpor
- * @param aOutputResource
- * An EMF Resource to be populated with the Ecore model
- * @param aOptions
- * a Map defining options for the conversion. Valid keys for this map are defined as
+ * Converts a UIMA TypeSystem descriptor to an Ecore model.
+ *
+ * @param aUimaTypeSystemFilePath file path to UIMA TypeSystem descritpor
+ * @param aOutputResource An EMF Resource to be populated with the Ecore model
+ * @param aOptions a Map defining options for the conversion. Valid keys for this map are defined as
* constants on this class.
- *
- * @throws InvalidXMLException
- * if the TypeSystem descriptor, or one of its imports, is not valid or if there are
+ * @throws InvalidXMLException if the TypeSystem descriptor, or one of its imports, is not valid or if there are
* duplicate, inconsistent definitions of the same type.
- * @throws IOException
- * if an failure occur while reading the descriptor file
+ * @throws IOException if an failure occur while reading the descriptor file
*/
public static void uimaTypeSystem2Ecore(String aUimaTypeSystemFilePath, Resource aOutputResource,
Map aOptions) throws InvalidXMLException, IOException {
@@ -83,18 +79,13 @@ public class UimaTypeSystem2Ecore {
}
/**
- * Converts a UIMA TypeSystemDescription to an Ecore model
- *
- * @param aTypeSystem
- * UIMA TypeSystemDescription object to convert
- * @param aOutputResource
- * An EMF Resource to be populated with the Ecore model
- * @param aOptions
- * a Map defining options for the conversion. Valid keys for this map are defined as
+ * Converts a UIMA TypeSystemDescription to an Ecore model.
+ *
+ * @param aTypeSystem UIMA TypeSystemDescription object to convert
+ * @param aOutputResource An EMF Resource to be populated with the Ecore model
+ * @param aOptions a Map defining options for the conversion. Valid keys for this map are defined as
* constants on this class.
- *
- * @throws InvalidXMLException
- * if the TypeSystem descriptor imports another descriptor that could not be
+ * @throws InvalidXMLException if the TypeSystem descriptor imports another descriptor that could not be
* successfully parsed, or if there are duplicate, inconsistent definitions of the same
* type.
*/
@@ -104,19 +95,16 @@ public class UimaTypeSystem2Ecore {
}
/**
- * Converts a UIMA TypeSystemDescription to an Ecore model
- *
- * @param aTypeSystem
- * UIMA TypeSystemDescription object to convert
- * @param aOutputResource
- * An EMF Resource to be populated with the Ecore model
- * @param aOptions
- * a Map defining options for the conversion. Valid keys for this map are defined as
+ * Converts a UIMA TypeSystemDescription to an Ecore model.
+ *
+ * @param aTypeSystem UIMA TypeSystemDescription object to convert
+ * @param aOutputResource An EMF Resource to be populated with the Ecore model
+ * @param aOptions a Map defining options for the conversion. Valid keys for this map are defined as
* constants on this class.
- * @param aSchemaLocationMap
- * optional parameter - if non-null, this map will be populated with (Namespace URI,
+ * @param aSchemaLocationMap optional parameter - if non-null, this map will be populated with (Namespace URI,
* Schema Location) pairs, suitable for inclusion in the "schemaLocation" attribute of
* XMI instance documents.
+ * @throws InvalidXMLException the invalid XML exception
*/
public static void uimaTypeSystem2Ecore(TypeSystemDescription aTypeSystem,
Resource aOutputResource, Map aOptions, Map aSchemaLocationMap)
@@ -210,6 +198,13 @@ public class UimaTypeSystem2Ecore {
firstPackage.getEAnnotations().add(eannot);
}
+ /**
+ * Load uima builtins ecore.
+ *
+ * @param resourceSet the resource set
+ * @param aSchemaLocationMap the a schema location map
+ * @return the resource
+ */
private static Resource loadUimaBuiltinsEcore(ResourceSet resourceSet, Map aSchemaLocationMap) {
// load Ecore model for UIMA built-in types (use classloader to locate)
URL uimaEcoreUrl = UimaTypeSystem2Ecore.class.getResource("/uima.ecore");
@@ -235,6 +230,13 @@ public class UimaTypeSystem2Ecore {
return uimaEcoreResource;
}
+ /**
+ * Uima type 2 E classifier.
+ *
+ * @param aType the a type
+ * @param aOptions the a options
+ * @return the e classifier
+ */
private static EClassifier uimaType2EClassifier(TypeDescription aType, Map aOptions) {
// separate name into package name and class name
String fullTypeName = aType.getName();
@@ -287,6 +289,13 @@ public class UimaTypeSystem2Ecore {
return eclassifier;
}
+ /**
+ * Uima feature 2 E structural feature.
+ *
+ * @param aFeature the a feature
+ * @param aOptions the a options
+ * @return the e structural feature
+ */
private static EStructuralFeature uimaFeature2EStructuralFeature(FeatureDescription aFeature,
Map aOptions) {
String range = aFeature.getRangeTypeName();
@@ -408,6 +417,12 @@ public class UimaTypeSystem2Ecore {
return efeat;
}
+ /**
+ * Lookup E classifier for type.
+ *
+ * @param aFullTypeName the a full type name
+ * @return the e classifier
+ */
private static EClassifier lookupEClassifierForType(String aFullTypeName) {
// separate name into package name and class name
String uimaNamespace, shortTypeName;
@@ -473,6 +488,12 @@ public class UimaTypeSystem2Ecore {
return ePackage;
}
+ /**
+ * Uima namespace 2 namespace uri.
+ *
+ * @param uimaNamespace the uima namespace
+ * @return the string
+ */
private static String uimaNamespace2NamespaceUri(String uimaNamespace) {
if (uimaNamespace == null || uimaNamespace.length() == 0) {
return XmiCasSerializer.DEFAULT_NAMESPACE_URI;
@@ -486,6 +507,9 @@ public class UimaTypeSystem2Ecore {
/**
* Main program. Takes two arguments: the filename of an input TypeSystem descriptor file and the
* filename of the Ecore/XMI file to generate.
+ *
+ * @param args the arguments
+ * @throws Exception the exception
*/
public static void main(String[] args) throws Exception {
// register default resource factory
Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/tutorial/DateAnnot.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/tutorial/DateAnnot.java?rev=1769515&r1=1769514&r2=1769515&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/tutorial/DateAnnot.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/tutorial/DateAnnot.java Sun Nov 13 16:16:53 2016
@@ -24,6 +24,7 @@ import org.apache.uima.cas.impl.CASImpl;
import org.apache.uima.cas.impl.TypeImpl;
import org.apache.uima.cas.impl.TypeSystemImpl;
+// TODO: Auto-generated Javadoc
/**
* Updated by JCasGen Mon Nov 29 15:02:38 EST 2004 XML source: C:/Program
* Files/apache/uima/examples/descriptors/tutorial/ex6/TutorialTypeSystem.xml
@@ -33,18 +34,27 @@ import org.apache.uima.cas.impl.TypeSyst
public class DateAnnot extends DateTimeAnnot {
/**
- * @generated
- * @ordered
- */
+ * The Constant typeIndexID.
+ *
+ * @generated
+ * @ordered
+ */
public static final int typeIndexID = JCasRegistry.register(DateAnnot.class);
/**
- * @generated
- * @ordered
- */
+ * The Constant type.
+ *
+ * @generated
+ * @ordered
+ */
public static final int type = typeIndexID;
- /** @generated */
+ /**
+ * Gets the type index ID.
+ *
+ * @return the type index ID
+ * @generated
+ */
public int getTypeIndexID() {
return typeIndexID;
}
@@ -58,21 +68,35 @@ public class DateAnnot extends DateTimeA
}
/**
- * Internal - constructor used by generator
- *
- * @generated
- */
+ * Internal - constructor used by generator.
+ *
+ * @param type the type
+ * @param casImpl the cas impl
+ * @generated
+ */
public DateAnnot(TypeImpl type, CASImpl casImpl) {
super(type, casImpl);
readObject();
}
- /** @generated */
+ /**
+ * Instantiates a new date annot.
+ *
+ * @param jcas the jcas
+ * @generated
+ */
public DateAnnot(JCas jcas) {
super(jcas);
readObject();
}
+ /**
+ * Instantiates a new date annot.
+ *
+ * @param jcas the jcas
+ * @param begin the begin
+ * @param end the end
+ */
public DateAnnot(JCas jcas, int begin, int end) {
super(jcas);
setBegin(begin);
@@ -81,10 +105,10 @@ public class DateAnnot extends DateTimeA
}
/**
- * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
- *
- * @generated modifiable
- */
+ * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->.
+ *
+ * @generated modifiable
+ */
private void readObject() {
}
}
Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/tutorial/DateTimeAnnot.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/tutorial/DateTimeAnnot.java?rev=1769515&r1=1769514&r2=1769515&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/tutorial/DateTimeAnnot.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/tutorial/DateTimeAnnot.java Sun Nov 13 16:16:53 2016
@@ -25,6 +25,7 @@ import org.apache.uima.cas.impl.CASImpl;
import org.apache.uima.cas.impl.TypeImpl;
import org.apache.uima.cas.impl.TypeSystemImpl;
+// TODO: Auto-generated Javadoc
/**
* Updated by JCasGen Mon Nov 29 15:02:38 EST 2004 XML source: C:/Program
* Files/apache/uima/examples/descriptors/tutorial/ex6/TutorialTypeSystem.xml
@@ -34,22 +35,32 @@ import org.apache.uima.cas.impl.TypeSyst
public class DateTimeAnnot extends Annotation {
/**
- * @generated
- * @ordered
- */
+ * The Constant typeIndexID.
+ *
+ * @generated
+ * @ordered
+ */
public static final int typeIndexID = JCasRegistry.register(DateTimeAnnot.class);
/**
- * @generated
- * @ordered
- */
+ * The Constant type.
+ *
+ * @generated
+ * @ordered
+ */
public static final int type = typeIndexID;
- /** @generated */
+ /**
+ * Gets the type index ID.
+ *
+ * @return the type index ID
+ * @generated
+ */
public int getTypeIndexID() {
return typeIndexID;
}
+ /** The Constant _FI_shortDateString. */
public static final int _FI_shortDateString = TypeSystemImpl.getAdjustedFeatureOffset("shortDateString");
/**
@@ -61,21 +72,35 @@ public class DateTimeAnnot extends Annot
}
/**
- * Internal - constructor used by generator
- *
- * @generated
- */
+ * Internal - constructor used by generator.
+ *
+ * @param type the type
+ * @param casImpl the cas impl
+ * @generated
+ */
public DateTimeAnnot(TypeImpl type, CASImpl casImpl) {
super(type, casImpl);
readObject();
}
- /** @generated */
+ /**
+ * Instantiates a new date time annot.
+ *
+ * @param jcas the jcas
+ * @generated
+ */
public DateTimeAnnot(JCas jcas) {
super(jcas);
readObject();
}
+ /**
+ * Instantiates a new date time annot.
+ *
+ * @param jcas the jcas
+ * @param begin the begin
+ * @param end the end
+ */
public DateTimeAnnot(JCas jcas, int begin, int end) {
super(jcas);
setBegin(begin);
@@ -84,29 +109,31 @@ public class DateTimeAnnot extends Annot
}
/**
- * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
- *
- * @generated modifiable
- */
+ * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->.
+ *
+ * @generated modifiable
+ */
private void readObject() {
}
// *--------------*
// * Feature: shortDateString
/**
- * getter for shortDateString - gets
- *
- * @generated
- */
+ * getter for shortDateString - gets.
+ *
+ * @return the short date string
+ * @generated
+ */
public String getShortDateString() {
return _getStringValueNc(_FI_shortDateString);
}
/**
- * setter for shortDateString - sets
- *
- * @generated
- */
+ * setter for shortDateString - sets.
+ *
+ * @param v the new short date string
+ * @generated
+ */
public void setShortDateString(String v) {
_setStringValueNfc(_FI_shortDateString, v);
}
Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/tutorial/Meeting.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/tutorial/Meeting.java?rev=1769515&r1=1769514&r2=1769515&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/tutorial/Meeting.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/tutorial/Meeting.java Sun Nov 13 16:16:53 2016
@@ -25,6 +25,7 @@ import org.apache.uima.cas.impl.CASImpl;
import org.apache.uima.cas.impl.TypeImpl;
import org.apache.uima.cas.impl.TypeSystemImpl;
+// TODO: Auto-generated Javadoc
/**
* Updated by JCasGen Mon Nov 29 15:02:38 EST 2004 XML source: C:/Program
* Files/apache/uima/examples/descriptors/tutorial/ex6/TutorialTypeSystem.xml
@@ -34,28 +35,41 @@ import org.apache.uima.cas.impl.TypeSyst
public class Meeting extends Annotation {
/**
- * @generated
- * @ordered
- */
+ * The Constant typeIndexID.
+ *
+ * @generated
+ * @ordered
+ */
public static final int typeIndexID = JCasRegistry.register(Meeting.class);
/**
- * @generated
- * @ordered
- */
+ * The Constant type.
+ *
+ * @generated
+ * @ordered
+ */
public static final int type = typeIndexID;
- /** @generated */
+ /**
+ * Gets the type index ID.
+ *
+ * @return the type index ID
+ * @generated
+ */
public int getTypeIndexID() {
return typeIndexID;
}
+ /** The Constant _FI_room. */
public static final int _FI_room = TypeSystemImpl.getAdjustedFeatureOffset("room");
+ /** The Constant _FI_date. */
public static final int _FI_date = TypeSystemImpl.getAdjustedFeatureOffset("date");
+ /** The Constant _FI_startTime. */
public static final int _FI_startTime = TypeSystemImpl.getAdjustedFeatureOffset("startTime");
+ /** The Constant _FI_endTime. */
public static final int _FI_endTime = TypeSystemImpl.getAdjustedFeatureOffset("endTime");
/**
@@ -67,21 +81,35 @@ public class Meeting extends Annotation
}
/**
- * Internal - constructor used by generator
- *
- * @generated
- */
+ * Internal - constructor used by generator.
+ *
+ * @param type the type
+ * @param casImpl the cas impl
+ * @generated
+ */
public Meeting(TypeImpl type, CASImpl casImpl) {
super(type, casImpl);
readObject();
}
- /** @generated */
+ /**
+ * Instantiates a new meeting.
+ *
+ * @param jcas the jcas
+ * @generated
+ */
public Meeting(JCas jcas) {
super(jcas);
readObject();
}
+ /**
+ * Instantiates a new meeting.
+ *
+ * @param jcas the jcas
+ * @param begin the begin
+ * @param end the end
+ */
public Meeting(JCas jcas, int begin, int end) {
super(jcas);
setBegin(begin);
@@ -90,29 +118,31 @@ public class Meeting extends Annotation
}
/**
- * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
- *
- * @generated modifiable
- */
+ * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->.
+ *
+ * @generated modifiable
+ */
private void readObject() {
}
// *--------------*
// * Feature: room
/**
- * getter for room - gets
- *
- * @generated
- */
+ * getter for room - gets.
+ *
+ * @return the room
+ * @generated
+ */
public RoomNumber getRoom() {
return (RoomNumber) (_getFeatureValueNc(_FI_room));
}
/**
- * setter for room - sets
- *
- * @generated
- */
+ * setter for room - sets.
+ *
+ * @param v the new room
+ * @generated
+ */
public void setRoom(RoomNumber v) {
_setFeatureValueNcWj(_FI_room, v);
}
@@ -120,19 +150,21 @@ public class Meeting extends Annotation
// *--------------*
// * Feature: date
/**
- * getter for date - gets
- *
- * @generated
- */
+ * getter for date - gets.
+ *
+ * @return the date
+ * @generated
+ */
public DateAnnot getDate() {
return (DateAnnot) (_getFeatureValueNc(_FI_date));
}
/**
- * setter for date - sets
- *
- * @generated
- */
+ * setter for date - sets.
+ *
+ * @param v the new date
+ * @generated
+ */
public void setDate(DateAnnot v) {
_setFeatureValueNcWj(_FI_date, v);
}
@@ -140,19 +172,21 @@ public class Meeting extends Annotation
// *--------------*
// * Feature: startTime
/**
- * getter for startTime - gets
- *
- * @generated
- */
+ * getter for startTime - gets.
+ *
+ * @return the start time
+ * @generated
+ */
public TimeAnnot getStartTime() {
return (TimeAnnot) (_getFeatureValueNc(_FI_startTime));
}
/**
- * setter for startTime - sets
- *
- * @generated
- */
+ * setter for startTime - sets.
+ *
+ * @param v the new start time
+ * @generated
+ */
public void setStartTime(TimeAnnot v) {
_setFeatureValueNcWj(_FI_startTime, v);
}
@@ -160,24 +194,36 @@ public class Meeting extends Annotation
// *--------------*
// * Feature: endTime
/**
- * getter for endTime - gets
- *
- * @generated
- */
+ * getter for endTime - gets.
+ *
+ * @return the end time
+ * @generated
+ */
public TimeAnnot getEndTime() {
return (TimeAnnot) (_getFeatureValueNc(_FI_endTime));
}
/**
- * setter for endTime - sets
- *
- * @generated
- */
+ * setter for endTime - sets.
+ *
+ * @param v the new end time
+ * @generated
+ */
public void setEndTime(TimeAnnot v) {
_setFeatureValueNcWj(_FI_endTime, v);
}
- /** Custom constructor taking all parameters */
+ /**
+ * Custom constructor taking all parameters.
+ *
+ * @param jcas the jcas
+ * @param start the start
+ * @param end the end
+ * @param room the room
+ * @param date the date
+ * @param startTime the start time
+ * @param endTime the end time
+ */
public Meeting(JCas jcas, int start, int end, RoomNumber room, DateAnnot date, TimeAnnot startTime, TimeAnnot endTime) {
this(jcas, start, end);
setRoom(room);
@@ -186,6 +232,9 @@ public class Meeting extends Annotation
setEndTime(endTime);
}
+ /* (non-Javadoc)
+ * @see org.apache.uima.cas.impl.FeatureStructureImplC#toString()
+ */
public String toString() {
return "Meeting in " + getRoom().getCoveredText() + " on " + getDate().getCoveredText() + ", " + getStartTime().getCoveredText() + " - " + getEndTime().getCoveredText();
}
Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/tutorial/RoomNumber.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/tutorial/RoomNumber.java?rev=1769515&r1=1769514&r2=1769515&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/tutorial/RoomNumber.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/tutorial/RoomNumber.java Sun Nov 13 16:16:53 2016
@@ -25,6 +25,7 @@ import org.apache.uima.cas.impl.CASImpl;
import org.apache.uima.cas.impl.TypeImpl;
import org.apache.uima.cas.impl.TypeSystemImpl;
+// TODO: Auto-generated Javadoc
/**
* Updated by JCasGen Mon Nov 29 15:02:37 EST 2004 XML source: C:/Program
* Files/apache/uima/examples/descriptors/tutorial/ex6/TutorialTypeSystem.xml
@@ -34,22 +35,32 @@ import org.apache.uima.cas.impl.TypeSyst
public class RoomNumber extends Annotation {
/**
- * @generated
- * @ordered
- */
+ * The Constant typeIndexID.
+ *
+ * @generated
+ * @ordered
+ */
public static final int typeIndexID = JCasRegistry.register(RoomNumber.class);
/**
- * @generated
- * @ordered
- */
+ * The Constant type.
+ *
+ * @generated
+ * @ordered
+ */
public static final int type = typeIndexID;
- /** @generated */
+ /**
+ * Gets the type index ID.
+ *
+ * @return the type index ID
+ * @generated
+ */
public int getTypeIndexID() {
return typeIndexID;
}
+ /** The Constant _FI_building. */
public static final int _FI_building = TypeSystemImpl.getAdjustedFeatureOffset("building");
/**
@@ -61,21 +72,35 @@ public class RoomNumber extends Annotati
}
/**
- * Internal - constructor used by generator
- *
- * @generated
- */
+ * Internal - constructor used by generator.
+ *
+ * @param type the type
+ * @param casImpl the cas impl
+ * @generated
+ */
public RoomNumber(TypeImpl type, CASImpl casImpl) {
super(type, casImpl);
readObject();
}
- /** @generated */
+ /**
+ * Instantiates a new room number.
+ *
+ * @param jcas the jcas
+ * @generated
+ */
public RoomNumber(JCas jcas) {
super(jcas);
readObject();
}
+ /**
+ * Instantiates a new room number.
+ *
+ * @param jcas the jcas
+ * @param begin the begin
+ * @param end the end
+ */
public RoomNumber(JCas jcas, int begin, int end) {
super(jcas);
setBegin(begin);
@@ -84,29 +109,31 @@ public class RoomNumber extends Annotati
}
/**
- * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
- *
- * @generated modifiable
- */
+ * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->.
+ *
+ * @generated modifiable
+ */
private void readObject() {
}
// *--------------*
// * Feature: building
/**
- * getter for building - gets Building containing this room
- *
- * @generated
- */
+ * getter for building - gets Building containing this room.
+ *
+ * @return the building
+ * @generated
+ */
public String getBuilding() {
return _getStringValueNc(_FI_building);
}
/**
- * setter for building - sets Building containing this room
- *
- * @generated
- */
+ * setter for building - sets Building containing this room.
+ *
+ * @param v the new building
+ * @generated
+ */
public void setBuilding(String v) {
_setStringValueNfc(_FI_building, v);
}
Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/tutorial/SentenceAnnot.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/tutorial/SentenceAnnot.java?rev=1769515&r1=1769514&r2=1769515&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/tutorial/SentenceAnnot.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/tutorial/SentenceAnnot.java Sun Nov 13 16:16:53 2016
@@ -25,6 +25,7 @@ import org.apache.uima.cas.impl.CASImpl;
import org.apache.uima.cas.impl.TypeImpl;
import org.apache.uima.cas.impl.TypeSystemImpl;
+// TODO: Auto-generated Javadoc
/**
* Updated by JCasGen Mon Nov 29 15:02:37 EST 2004 XML source: C:/Program
* Files/apache/uima/examples/descriptors/tutorial/ex6/TutorialTypeSystem.xml
@@ -34,18 +35,27 @@ import org.apache.uima.cas.impl.TypeSyst
public class SentenceAnnot extends Annotation {
/**
- * @generated
- * @ordered
- */
+ * The Constant typeIndexID.
+ *
+ * @generated
+ * @ordered
+ */
public static final int typeIndexID = JCasRegistry.register(SentenceAnnot.class);
/**
- * @generated
- * @ordered
- */
+ * The Constant type.
+ *
+ * @generated
+ * @ordered
+ */
public static final int type = typeIndexID;
- /** @generated */
+ /**
+ * Gets the type index ID.
+ *
+ * @return the type index ID
+ * @generated
+ */
public int getTypeIndexID() {
return typeIndexID;
}
@@ -59,21 +69,35 @@ public class SentenceAnnot extends Annot
}
/**
- * Internal - constructor used by generator
- *
- * @generated
- */
+ * Internal - constructor used by generator.
+ *
+ * @param type the type
+ * @param casImpl the cas impl
+ * @generated
+ */
public SentenceAnnot(TypeImpl type, CASImpl casImpl) {
super(type, casImpl);
readObject();
}
- /** @generated */
+ /**
+ * Instantiates a new sentence annot.
+ *
+ * @param jcas the jcas
+ * @generated
+ */
public SentenceAnnot(JCas jcas) {
super(jcas);
readObject();
}
+ /**
+ * Instantiates a new sentence annot.
+ *
+ * @param jcas the jcas
+ * @param begin the begin
+ * @param end the end
+ */
public SentenceAnnot(JCas jcas, int begin, int end) {
super(jcas);
setBegin(begin);
@@ -82,10 +106,10 @@ public class SentenceAnnot extends Annot
}
/**
- * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
- *
- * @generated modifiable
- */
+ * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->.
+ *
+ * @generated modifiable
+ */
private void readObject() {
}
}
Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/tutorial/TimeAnnot.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/tutorial/TimeAnnot.java?rev=1769515&r1=1769514&r2=1769515&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/tutorial/TimeAnnot.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/tutorial/TimeAnnot.java Sun Nov 13 16:16:53 2016
@@ -24,6 +24,7 @@ import org.apache.uima.cas.impl.CASImpl;
import org.apache.uima.cas.impl.TypeImpl;
import org.apache.uima.cas.impl.TypeSystemImpl;
+// TODO: Auto-generated Javadoc
/**
* Updated by JCasGen Mon Nov 29 15:02:38 EST 2004 XML source: C:/Program
* Files/apache/uima/examples/descriptors/tutorial/ex6/TutorialTypeSystem.xml
@@ -33,18 +34,27 @@ import org.apache.uima.cas.impl.TypeSyst
public class TimeAnnot extends DateTimeAnnot {
/**
- * @generated
- * @ordered
- */
+ * The Constant typeIndexID.
+ *
+ * @generated
+ * @ordered
+ */
public static final int typeIndexID = JCasRegistry.register(TimeAnnot.class);
/**
- * @generated
- * @ordered
- */
+ * The Constant type.
+ *
+ * @generated
+ * @ordered
+ */
public static final int type = typeIndexID;
- /** @generated */
+ /**
+ * Gets the type index ID.
+ *
+ * @return the type index ID
+ * @generated
+ */
public int getTypeIndexID() {
return typeIndexID;
}
@@ -58,21 +68,35 @@ public class TimeAnnot extends DateTimeA
}
/**
- * Internal - constructor used by generator
- *
- * @generated
- */
+ * Internal - constructor used by generator.
+ *
+ * @param type the type
+ * @param casImpl the cas impl
+ * @generated
+ */
public TimeAnnot(TypeImpl type, CASImpl casImpl) {
super(type, casImpl);
readObject();
}
- /** @generated */
+ /**
+ * Instantiates a new time annot.
+ *
+ * @param jcas the jcas
+ * @generated
+ */
public TimeAnnot(JCas jcas) {
super(jcas);
readObject();
}
+ /**
+ * Instantiates a new time annot.
+ *
+ * @param jcas the jcas
+ * @param begin the begin
+ * @param end the end
+ */
public TimeAnnot(JCas jcas, int begin, int end) {
super(jcas);
setBegin(begin);
@@ -81,10 +105,10 @@ public class TimeAnnot extends DateTimeA
}
/**
- * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
- *
- * @generated modifiable
- */
+ * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->.
+ *
+ * @generated modifiable
+ */
private void readObject() {
}
}
Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/tutorial/UimaAcronym.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/tutorial/UimaAcronym.java?rev=1769515&r1=1769514&r2=1769515&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/tutorial/UimaAcronym.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/tutorial/UimaAcronym.java Sun Nov 13 16:16:53 2016
@@ -25,6 +25,7 @@ import org.apache.uima.cas.impl.CASImpl;
import org.apache.uima.cas.impl.TypeImpl;
import org.apache.uima.cas.impl.TypeSystemImpl;
+// TODO: Auto-generated Javadoc
/**
* Updated by JCasGen Mon Nov 29 15:02:38 EST 2004 XML source: C:/Program
* Files/apache/uima/examples/descriptors/tutorial/ex6/TutorialTypeSystem.xml
@@ -34,22 +35,32 @@ import org.apache.uima.cas.impl.TypeSyst
public class UimaAcronym extends Annotation {
/**
- * @generated
- * @ordered
- */
+ * The Constant typeIndexID.
+ *
+ * @generated
+ * @ordered
+ */
public static final int typeIndexID = JCasRegistry.register(UimaAcronym.class);
/**
- * @generated
- * @ordered
- */
+ * The Constant type.
+ *
+ * @generated
+ * @ordered
+ */
public static final int type = typeIndexID;
- /** @generated */
+ /**
+ * Gets the type index ID.
+ *
+ * @return the type index ID
+ * @generated
+ */
public int getTypeIndexID() {
return typeIndexID;
}
+ /** The Constant _FI_expandedForm. */
public static final int _FI_expandedForm = TypeSystemImpl.getAdjustedFeatureOffset("expandedForm");
/**
@@ -61,21 +72,35 @@ public class UimaAcronym extends Annotat
}
/**
- * Internal - constructor used by generator
- *
- * @generated
- */
+ * Internal - constructor used by generator.
+ *
+ * @param type the type
+ * @param casImpl the cas impl
+ * @generated
+ */
public UimaAcronym(TypeImpl type, CASImpl casImpl) {
super(type, casImpl);
readObject();
}
- /** @generated */
+ /**
+ * Instantiates a new uima acronym.
+ *
+ * @param jcas the jcas
+ * @generated
+ */
public UimaAcronym(JCas jcas) {
super(jcas);
readObject();
}
+ /**
+ * Instantiates a new uima acronym.
+ *
+ * @param jcas the jcas
+ * @param begin the begin
+ * @param end the end
+ */
public UimaAcronym(JCas jcas, int begin, int end) {
super(jcas);
setBegin(begin);
@@ -84,34 +109,43 @@ public class UimaAcronym extends Annotat
}
/**
- * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
- *
- * @generated modifiable
- */
+ * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->.
+ *
+ * @generated modifiable
+ */
private void readObject() {
}
// *--------------*
// * Feature: expandedForm
/**
- * getter for expandedForm - gets
- *
- * @generated
- */
+ * getter for expandedForm - gets.
+ *
+ * @return the expanded form
+ * @generated
+ */
public String getExpandedForm() {
return _getStringValueNc(_FI_expandedForm);
}
/**
- * setter for expandedForm - sets
- *
- * @generated
- */
+ * setter for expandedForm - sets.
+ *
+ * @param v the new expanded form
+ * @generated
+ */
public void setExpandedForm(String v) {
_setStringValueNfc(_FI_expandedForm, v);
}
- /** Custom constructor taking all parameters */
+ /**
+ * Custom constructor taking all parameters.
+ *
+ * @param jcas the jcas
+ * @param start the start
+ * @param end the end
+ * @param expandedForm the expanded form
+ */
public UimaAcronym(JCas jcas, int start, int end, String expandedForm) {
super(jcas, start, end);
setExpandedForm(expandedForm);
Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/tutorial/UimaMeeting.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/tutorial/UimaMeeting.java?rev=1769515&r1=1769514&r2=1769515&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/tutorial/UimaMeeting.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-examples/src/main/java/org/apache/uima/tutorial/UimaMeeting.java Sun Nov 13 16:16:53 2016
@@ -24,6 +24,7 @@ import org.apache.uima.cas.impl.CASImpl;
import org.apache.uima.cas.impl.TypeImpl;
import org.apache.uima.cas.impl.TypeSystemImpl;
+// TODO: Auto-generated Javadoc
/**
* Updated by JCasGen Mon Nov 29 15:02:38 EST 2004 XML source: C:/Program
* Files/apache/uima/examples/descriptors/tutorial/ex6/TutorialTypeSystem.xml
@@ -33,18 +34,27 @@ import org.apache.uima.cas.impl.TypeSyst
public class UimaMeeting extends Meeting {
/**
- * @generated
- * @ordered
- */
+ * The Constant typeIndexID.
+ *
+ * @generated
+ * @ordered
+ */
public static final int typeIndexID = JCasRegistry.register(UimaMeeting.class);
/**
- * @generated
- * @ordered
- */
+ * The Constant type.
+ *
+ * @generated
+ * @ordered
+ */
public static final int type = typeIndexID;
- /** @generated */
+ /**
+ * Gets the type index ID.
+ *
+ * @return the type index ID
+ * @generated
+ */
public int getTypeIndexID() {
return typeIndexID;
}
@@ -58,21 +68,35 @@ public class UimaMeeting extends Meeting
}
/**
- * Internal - constructor used by generator
- *
- * @generated
- */
+ * Internal - constructor used by generator.
+ *
+ * @param type the type
+ * @param casImpl the cas impl
+ * @generated
+ */
public UimaMeeting(TypeImpl type, CASImpl casImpl) {
super(type, casImpl);
readObject();
}
- /** @generated */
+ /**
+ * Instantiates a new uima meeting.
+ *
+ * @param jcas the jcas
+ * @generated
+ */
public UimaMeeting(JCas jcas) {
super(jcas);
readObject();
}
+ /**
+ * Instantiates a new uima meeting.
+ *
+ * @param jcas the jcas
+ * @param begin the begin
+ * @param end the end
+ */
public UimaMeeting(JCas jcas, int begin, int end) {
super(jcas);
setBegin(begin);
@@ -81,14 +105,24 @@ public class UimaMeeting extends Meeting
}
/**
- * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
- *
- * @generated modifiable
- */
+ * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->.
+ *
+ * @generated modifiable
+ */
private void readObject() {
}
- /** Custom constructor taking all parameters */
+ /**
+ * Custom constructor taking all parameters.
+ *
+ * @param jcas the jcas
+ * @param start the start
+ * @param end the end
+ * @param room the room
+ * @param date the date
+ * @param startTime the start time
+ * @param endTime the end time
+ */
public UimaMeeting(JCas jcas, int start, int end, RoomNumber room, DateAnnot date, TimeAnnot startTime, TimeAnnot endTime) {
super(jcas, start, end, room, date, startTime, endTime);
}