Package org.apache.tika.parser.ctakes
Class CTAKESConfig
- java.lang.Object
-
- org.apache.tika.parser.ctakes.CTAKESConfig
-
- All Implemented Interfaces:
java.io.Serializable
public class CTAKESConfig extends java.lang.Object implements java.io.SerializableConfiguration forCTAKESContentHandler. This class allows to enable cTAKES and set its parameters.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CTAKESConfig()Default constructor.CTAKESConfig(java.io.InputStream stream)Loads properties from InputStream and then tries to close InputStream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetAeDescriptorPath()Returns the path to XML descriptor for AnalysisEngine.CTAKESAnnotationProperty[]getAnnotationProps()Returns an array ofCTAKESAnnotationProperty's that will be included into cTAKES metadata.java.lang.StringgetAnnotationPropsAsString()Returns a string containing a comma-separated list ofCTAKESAnnotationPropertynames that will be included into cTAKES metadata.java.lang.String[]getMetadata()Returns an array of metadata whose values will be analyzed using cTAKES.java.lang.StringgetMetadataAsString()Returns a string containing a comma-separated list of metadata whose values will be analyzed using cTAKES.java.io.OutputStreamgetOutputStream()Returns anOutputStreamobject used write the CAS.chargetSeparatorChar()Returns the separator character used for annotation properties.CTAKESSerializergetSerializerType()Returns the type of cTAKES (UIMA) serializer used to write the CAS.java.lang.StringgetUMLSPass()Returns the UMLS password.java.lang.StringgetUMLSUser()Returns the UMLS username.booleanisPrettyPrint()Returnstrueif formatted output is enabled,falseotherwise.booleanisSerialize()Returnstrueif CAS serialization is enabled,falseotherwise.booleanisText()Returnstrueif content text analysis is enabledfalseotherwise.voidsetAeDescriptorPath(java.lang.String aeDescriptorPath)Sets the path to XML descriptor for AnalysisEngine.voidsetAnnotationProps(java.lang.String[] annotationProps)ets theCTAKESAnnotationProperty's that will be included into cTAKES metadata.voidsetAnnotationProps(CTAKESAnnotationProperty[] annotationProps)Sets theCTAKESAnnotationProperty's that will be included into cTAKES metadata.voidsetMetadata(java.lang.String[] metadata)Sets the metadata whose values will be analyzed using cTAKES.voidsetOutputStream(java.io.OutputStream stream)Sets theOutputStreamobject used to write the CAS.voidsetPrettyPrint(boolean prettyPrint)Enables the formatted output for serializer.voidsetSeparatorChar(char separatorChar)Sets the separator character used for annotation properties.voidsetSerialize(boolean serialize)Enables CAS serialization.voidsetSerializerType(CTAKESSerializer serializerType)Sets the type of cTAKES (UIMA) serializer used to write CAS.voidsetText(boolean text)Enables content text analysis using cTAKES.voidsetUMLSPass(java.lang.String uMLSPass)Sets the UMLS password.voidsetUMLSUser(java.lang.String uMLSUser)Sets the UMLS username.
-
-
-
Method Detail
-
getAeDescriptorPath
public java.lang.String getAeDescriptorPath()
Returns the path to XML descriptor for AnalysisEngine.- Returns:
- the path to XML descriptor for AnalysisEngine.
-
getUMLSUser
public java.lang.String getUMLSUser()
Returns the UMLS username.- Returns:
- the UMLS username.
-
getUMLSPass
public java.lang.String getUMLSPass()
Returns the UMLS password.- Returns:
- the UMLS password.
-
isPrettyPrint
public boolean isPrettyPrint()
Returnstrueif formatted output is enabled,falseotherwise.- Returns:
trueif formatted output is enabled,falseotherwise.
-
getSerializerType
public CTAKESSerializer getSerializerType()
Returns the type of cTAKES (UIMA) serializer used to write the CAS.- Returns:
- the type of cTAKES serializer.
-
getOutputStream
public java.io.OutputStream getOutputStream()
Returns anOutputStreamobject used write the CAS.- Returns:
OutputStreamobject used write the CAS.
-
isSerialize
public boolean isSerialize()
Returnstrueif CAS serialization is enabled,falseotherwise.- Returns:
trueif CAS serialization output is enabled,falseotherwise.
-
isText
public boolean isText()
Returnstrueif content text analysis is enabledfalseotherwise.- Returns:
trueif content text analysis is enabledfalseotherwise.
-
getMetadata
public java.lang.String[] 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.
-
getMetadataAsString
public java.lang.String 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
public CTAKESAnnotationProperty[] 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.
-
getAnnotationPropsAsString
public java.lang.String getAnnotationPropsAsString()
Returns a string containing a comma-separated list ofCTAKESAnnotationPropertynames 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.
-
setAeDescriptorPath
public void setAeDescriptorPath(java.lang.String aeDescriptorPath)
Sets the path to XML descriptor for AnalysisEngine.- Parameters:
aeDescriptorPath- the path to XML descriptor for AnalysisEngine.
-
setUMLSUser
public void setUMLSUser(java.lang.String uMLSUser)
Sets the UMLS username.- Parameters:
uMLSUser- the UMLS username.
-
setUMLSPass
public void setUMLSPass(java.lang.String uMLSPass)
Sets the UMLS password.- Parameters:
uMLSPass- the UMLS password.
-
setPrettyPrint
public void setPrettyPrint(boolean prettyPrint)
Enables the formatted output for serializer.- Parameters:
prettyPrint-trueto enable formatted output,falseotherwise.
-
setSerializerType
public void setSerializerType(CTAKESSerializer serializerType)
Sets the type of cTAKES (UIMA) serializer used to write CAS.- Parameters:
serializerType- the type of cTAKES serializer.
-
setOutputStream
public void setOutputStream(java.io.OutputStream stream)
Sets theOutputStreamobject used to write the CAS.- Parameters:
stream- theOutputStreamobject used to write the CAS.
-
setSerialize
public void setSerialize(boolean serialize)
Enables CAS serialization.- Parameters:
serialize-trueto enable CAS serialization,falseotherwise.
-
setText
public void setText(boolean text)
Enables content text analysis using cTAKES.- Parameters:
text-trueto enable content text analysis,falseotherwise.
-
setMetadata
public void setMetadata(java.lang.String[] metadata)
Sets the metadata whose values will be analyzed using cTAKES.- Parameters:
metadata- the metadata whose values will be analyzed using cTAKES.
-
setAnnotationProps
public void setAnnotationProps(CTAKESAnnotationProperty[] annotationProps)
Sets theCTAKESAnnotationProperty's that will be included into cTAKES metadata.- Parameters:
annotationProps- theCTAKESAnnotationProperty's that will be included into cTAKES metadata.
-
setAnnotationProps
public void setAnnotationProps(java.lang.String[] annotationProps)
ets theCTAKESAnnotationProperty's that will be included into cTAKES metadata.- Parameters:
annotationProps- theCTAKESAnnotationProperty's that will be included into cTAKES metadata.
-
setSeparatorChar
public void setSeparatorChar(char separatorChar)
Sets the separator character used for annotation properties.- Parameters:
separatorChar- the separator character used for annotation properties.
-
-