public final class JCasFactory extends Object
JCas
objects.Modifier and Type | Method and Description |
---|---|
static org.apache.uima.jcas.JCas |
createJCas()
Creates a new JCas for the automatically derived type system.
|
static org.apache.uima.jcas.JCas |
createJCas(String... typeSystemDescriptorNames)
Creates a new JCas from type system descriptor files found by name
|
static org.apache.uima.jcas.JCas |
createJCas(String fileName,
org.apache.uima.resource.metadata.TypeSystemDescription typeSystemDescription)
This method creates a new JCas and loads the contents of an XMI or XCAS file into it.
|
static org.apache.uima.jcas.JCas |
createJCas(org.apache.uima.resource.metadata.TypeSystemDescription typeSystemDescription)
Create a new JCas for the given type system description
|
static org.apache.uima.jcas.JCas |
createJCasFromPath(String... typeSystemDescriptorPaths)
Creates a new JCas from type system descriptor files.
|
public static org.apache.uima.jcas.JCas createJCas() throws org.apache.uima.UIMAException
TypeSystemDescriptionFactory.createTypeSystemDescription()
org.apache.uima.UIMAException
- if the JCas could not be initializedpublic static org.apache.uima.jcas.JCas createJCas(String... typeSystemDescriptorNames) throws org.apache.uima.UIMAException
typeSystemDescriptorNames
- names of the type system descriptors on the classpath used to initialize the JCas (in
Java notation, e.g. "my.package.TypeSystem" without the ".xml" extension)org.apache.uima.UIMAException
- if the JCas could not be initializedpublic static org.apache.uima.jcas.JCas createJCasFromPath(String... typeSystemDescriptorPaths) throws org.apache.uima.UIMAException
typeSystemDescriptorPaths
- paths to type system descriptor filesorg.apache.uima.UIMAException
- if the JCas could not be initializedpublic static org.apache.uima.jcas.JCas createJCas(org.apache.uima.resource.metadata.TypeSystemDescription typeSystemDescription) throws org.apache.uima.UIMAException
typeSystemDescription
- a type system description to initialize the JCasorg.apache.uima.UIMAException
- if the JCas could not be initializedpublic static org.apache.uima.jcas.JCas createJCas(String fileName, org.apache.uima.resource.metadata.TypeSystemDescription typeSystemDescription) throws org.apache.uima.UIMAException, IOException
fileName
- a file name for the serialized CAS datatypeSystemDescription
- a type system description to initialize the JCasorg.apache.uima.UIMAException
- if the JCas could not be initializedIOException
- if there is a problem reading the fileCopyright © 2012–2014 The Apache Software Foundation. All rights reserved.