Package org.apache.tika.parser.ctakes
Class CTAKESConfig
java.lang.Object
org.apache.tika.parser.ctakes.CTAKESConfig
- All Implemented Interfaces:
Serializable
Configuration for
CTAKESContentHandler
.
This class allows to enable cTAKES and set its parameters.
- See Also:
-
Constructor Summary
ConstructorDescriptionDefault constructor.CTAKESConfig
(InputStream stream) Loads properties from InputStream and then tries to close InputStream. -
Method Summary
Modifier and TypeMethodDescriptionReturns the path to XML descriptor for AnalysisEngine.Returns an array ofCTAKESAnnotationProperty
's that will be included into cTAKES metadata.Returns a string containing a comma-separated list ofCTAKESAnnotationProperty
names that will be included into cTAKES metadata.String[]
Returns an array of metadata whose values will be analyzed using cTAKES.Returns a string containing a comma-separated list of metadata whose values will be analyzed using cTAKES.Returns anOutputStream
object used write the CAS.char
Returns the separator character used for annotation properties.Returns the type of cTAKES (UIMA) serializer used to write the CAS.Returns the UMLS password.Returns the UMLS username.boolean
Returnstrue
if formatted output is enabled,false
otherwise.boolean
Returnstrue
if CAS serialization is enabled,false
otherwise.boolean
isText()
Returnstrue
if content text analysis is enabledfalse
otherwise.void
setAeDescriptorPath
(String aeDescriptorPath) Sets the path to XML descriptor for AnalysisEngine.void
setAnnotationProps
(String[] annotationProps) ets theCTAKESAnnotationProperty
's that will be included into cTAKES metadata.void
setAnnotationProps
(CTAKESAnnotationProperty[] annotationProps) Sets theCTAKESAnnotationProperty
's that will be included into cTAKES metadata.void
setMetadata
(String[] metadata) Sets the metadata whose values will be analyzed using cTAKES.void
setOutputStream
(OutputStream stream) Sets theOutputStream
object used to write the CAS.void
setPrettyPrint
(boolean prettyPrint) Enables the formatted output for serializer.void
setSeparatorChar
(char separatorChar) Sets the separator character used for annotation properties.void
setSerialize
(boolean serialize) Enables CAS serialization.void
setSerializerType
(CTAKESSerializer serializerType) Sets the type of cTAKES (UIMA) serializer used to write CAS.void
setText
(boolean text) Enables content text analysis using cTAKES.void
setUMLSPass
(String uMLSPass) Sets the UMLS password.void
setUMLSUser
(String uMLSUser) Sets the UMLS username.
-
Constructor Details
-
CTAKESConfig
public CTAKESConfig()Default constructor. -
CTAKESConfig
Loads properties from InputStream and then tries to close InputStream.- Parameters:
stream
-InputStream
object used to read properties.
-
-
Method Details
-
getAeDescriptorPath
Returns the path to XML descriptor for AnalysisEngine.- Returns:
- the path to XML descriptor for AnalysisEngine.
-
setAeDescriptorPath
Sets the path to XML descriptor for AnalysisEngine.- Parameters:
aeDescriptorPath
- the path to XML descriptor for AnalysisEngine.
-
getUMLSUser
Returns the UMLS username.- Returns:
- the UMLS username.
-
setUMLSUser
Sets the UMLS username.- Parameters:
uMLSUser
- the UMLS username.
-
getUMLSPass
Returns the UMLS password.- Returns:
- the UMLS password.
-
setUMLSPass
Sets the UMLS password.- Parameters:
uMLSPass
- the UMLS password.
-
isPrettyPrint
public boolean isPrettyPrint()Returnstrue
if formatted output is enabled,false
otherwise.- Returns:
true
if formatted output is enabled,false
otherwise.
-
setPrettyPrint
public void setPrettyPrint(boolean prettyPrint) Enables the formatted output for serializer.- Parameters:
prettyPrint
-true
to enable formatted output,false
otherwise.
-
getSerializerType
Returns the type of cTAKES (UIMA) serializer used to write the CAS.- Returns:
- the type of cTAKES serializer.
-
setSerializerType
Sets the type of cTAKES (UIMA) serializer used to write CAS.- Parameters:
serializerType
- the type of cTAKES serializer.
-
getOutputStream
Returns anOutputStream
object used write the CAS.- Returns:
OutputStream
object used write the CAS.
-
setOutputStream
Sets theOutputStream
object used to write the CAS.- Parameters:
stream
- theOutputStream
object used to write the CAS.
-
isSerialize
public boolean isSerialize()Returnstrue
if CAS serialization is enabled,false
otherwise.- Returns:
true
if CAS serialization output is enabled,false
otherwise.
-
setSerialize
public void setSerialize(boolean serialize) Enables CAS serialization.- Parameters:
serialize
-true
to enable CAS serialization,false
otherwise.
-
isText
public boolean isText()Returnstrue
if content text analysis is enabledfalse
otherwise.- Returns:
true
if content text analysis is enabledfalse
otherwise.
-
setText
public void setText(boolean text) Enables content text analysis using cTAKES.- Parameters:
text
-true
to enable content text analysis,false
otherwise.
-
getMetadata
Returns an array of metadata whose values will be analyzed using cTAKES.- Returns:
- an array of metadata whose values will be analyzed using cTAKES.
-
setMetadata
Sets the metadata whose values will be analyzed using cTAKES.- Parameters:
metadata
- the metadata whose values will be analyzed using cTAKES.
-
getMetadataAsString
Returns a string containing a comma-separated list of metadata whose values will be analyzed using cTAKES.- Returns:
- a string containing a comma-separated list of metadata whose values will be analyzed using cTAKES.
-
getAnnotationProps
Returns an array ofCTAKESAnnotationProperty
's that will be included into cTAKES metadata.- Returns:
- an array of
CTAKESAnnotationProperty
's that will be included into cTAKES metadata.
-
setAnnotationProps
Sets theCTAKESAnnotationProperty
's that will be included into cTAKES metadata.- Parameters:
annotationProps
- theCTAKESAnnotationProperty
's that will be included into cTAKES metadata.
-
setAnnotationProps
ets theCTAKESAnnotationProperty
's that will be included into cTAKES metadata.- Parameters:
annotationProps
- theCTAKESAnnotationProperty
's that will be included into cTAKES metadata.
-
getAnnotationPropsAsString
Returns a string containing a comma-separated list ofCTAKESAnnotationProperty
names that will be included into cTAKES metadata.- Returns:
-
getSeparatorChar
public char getSeparatorChar()Returns the separator character used for annotation properties.- Returns:
- the separator character used for annotation properties.
-
setSeparatorChar
public void setSeparatorChar(char separatorChar) Sets the separator character used for annotation properties.- Parameters:
separatorChar
- the separator character used for annotation properties.
-