Class CasConverter


  • public class CasConverter
    extends Object
    Converts CasData to and from Cas Object (CAS).
    • Constructor Detail

      • CasConverter

        public CasConverter()
    • Method Detail

      • getDocumentTextTypeName

        public String getDocumentTextTypeName()
        Gets the name of the CASData FeatureStructure Type that stores the document text.
        Returns:
        the document text type name
      • setDocumentTextTypeName

        public void setDocumentTextTypeName​(String aDocumentTextTypeName)
        Sets the name of the CASData FeatureStructure Type that stores the document text.
        Parameters:
        aDocumentTextTypeName - the document text type name
      • getDocumentTextFeatureName

        public String getDocumentTextFeatureName()
        Gets the name of the CASData Feature that stores the document text.
        Returns:
        the document text feature name
      • setDocumentTextFeatureName

        public void setDocumentTextFeatureName​(String aDocumentTextFeatureName)
        Sets the name of the CASData Feature that stores the document text.
        Parameters:
        aDocumentTextFeatureName - the document text feature name
      • casDataToCasContainer

        public void casDataToCasContainer​(CasData aData,
                                          CAS aContainer,
                                          boolean aLenient)
                                   throws CollectionException
        Convert CAS Data to CAS Container (aka CAS Object)
        Parameters:
        aData - CAS Data to convert
        aContainer - CAS to convert into
        aLenient - if true, data that does not fit into CAS type system will be ignored. If false, an exception will be thrown in that case.
        Throws:
        CollectionException - if aLenient is false and a type system incompatibility is found
      • casContainerToCasData

        public CasData casContainerToCasData​(CAS aContainer)
        Convert CAS Container (aka CAS Object) to CAS Data
        Parameters:
        aContainer - CAS to convert
        Returns:
        CasData object containing all information from the CAS