Class IOUtils


  • public class IOUtils
    extends Object
    • Constructor Detail

      • IOUtils

        public IOUtils()
    • Method Detail

      • file_to_arraylist

        public static ArrayList<String> file_to_arraylist​(File file)
                                                   throws IOException
        Generate ArrayList from File
        Parameters:
        file - May be a regular file or a GZIP file. In the second case, the file name must end on .gz or .gzip.
        Returns:
        Throws:
        IOException
      • arraylist_to_file

        public static void arraylist_to_file​(List array,
                                             File file)
                                      throws IOException
        Generate File form ArrayList
        Parameters:
        array -
        file - May be a regular file or a GZIP file. In the second case, the file name must end on .gz or .gzip.
        Throws:
        IOException
      • hashmapKeys_to_file

        public static void hashmapKeys_to_file​(HashMap array,
                                               File file)
                                        throws IOException
        Generate File form ArrayList
        Parameters:
        array -
        file -
        Throws:
        IOException
      • findCoverFS

        public static org.apache.uima.cas.text.AnnotationFS findCoverFS​(org.apache.uima.cas.CAS aCAS,
                                                                        org.apache.uima.cas.text.AnnotationFS annot,
                                                                        org.apache.uima.cas.Type coverFsType)
        Michael Scor implementation Finds the covering annotation of the specified coverFSType for the given annotation.
        Parameters:
        aCAS - a CAS to search in
        annot - current annotation
        coverFsType - covering annotation type to search for
        Returns:
        returns the covering annotation FS or null if the covering annotation was not found.