Class VinciCasDataConverter


  • public class VinciCasDataConverter
    extends java.lang.Object
    Utilities for converting a VinciFrame to and from a CasData.
    • Constructor Summary

      Constructors 
      Constructor Description
      VinciCasDataConverter​(java.lang.String aUeidType, java.lang.String aUeidFeature, java.lang.String aCasDataDocTextType, java.lang.String aCasDataDocTextFeature, java.lang.String aXCasDocTextTag, boolean aIncludeAnnotationSpannedText)
      Creates a new VinciCasDataConverter
    • Constructor Detail

      • VinciCasDataConverter

        public VinciCasDataConverter​(java.lang.String aUeidType,
                                     java.lang.String aUeidFeature,
                                     java.lang.String aCasDataDocTextType,
                                     java.lang.String aCasDataDocTextFeature,
                                     java.lang.String aXCasDocTextTag,
                                     boolean aIncludeAnnotationSpannedText)
        Creates a new VinciCasDataConverter
        Parameters:
        aUeidType - CasData type that contains the UEID (may be null)
        aUeidFeature - CasData feature that contains the UEID (may be null)
        aCasDataDocTextType - CasData type that contains the document text
        aCasDataDocTextFeature - CasData feature that contains the document text
        aXCasDocTextTag - XCas tag representing the document text
        aIncludeAnnotationSpannedText - if true, when generating XCas for an annotation, the spanned text of the annotation will be included as the content of the XCas element.
    • Method Detail

      • casDataToVinciFrame

        public void casDataToVinciFrame​(CasData aCasData,
                                        AFrame aParentFrame)
                                 throws java.io.IOException,
                                        org.xml.sax.SAXException
        Converts a CasData to a VinciFrame
        Parameters:
        aCasData - CasData to convert
        aParentFrame - VinciFrame to be the parent of the frame created from the CasData
        Throws:
        java.io.IOException
        org.xml.sax.SAXException
      • vinciFrameToCasData

        @Deprecated
        public void vinciFrameToCasData​(AFrame aCasFrame,
                                        CasData aCasData)
                                 throws org.xml.sax.SAXException
        Deprecated.
        Use appendVinciFrameToCasData(Aframe, CasData) or vinciFrameToCasData(AFrame)
        Converts a VinciFrame to a CasData, appending to an existing CasData.
        Parameters:
        aCasFrame - VinciFrame containing XCAS
        aCasData - CasData to which FeatureStructures from XCAS will be appended
        Throws:
        org.xml.sax.SAXException
      • vinciFrameToCasData

        public CasData vinciFrameToCasData​(AFrame aCasFrame)
                                    throws org.xml.sax.SAXException
        Converts a VinciFrame to a CasData.
        Parameters:
        aCasFrame - VinciFrame containing XCAS
        Returns:
        a new CasData corrsponding to the XCAS in aCasFrame
        Throws:
        org.xml.sax.SAXException
      • appendVinciFrameToCasData

        public void appendVinciFrameToCasData​(AFrame aCasFrame,
                                              CasData aCasData)
                                       throws org.xml.sax.SAXException
        Converts a VinciFrame to a CasData, appending to an existing CasData.
        Parameters:
        aCasFrame - VinciFrame containing XCAS
        aCasData - CasData to which FeatureStructures from XCAS will be appended
        Throws:
        org.xml.sax.SAXException