Class AnnotationViewerDialog

    • Constructor Detail

      • AnnotationViewerDialog

        public AnnotationViewerDialog​(JFrame aParentFrame,
                                      String aDialogTitle,
                                      PrefsMediator med,
                                      File aStyleMapFile,
                                      String aPerformanceStats,
                                      TypeSystem aTypeSystem,
                                      String[] aTypesToDisplay,
                                      String interactiveTempFN,
                                      boolean javaViewerRBisSelected,
                                      boolean javaViewerUCRBisSelected,
                                      boolean xmlRBisSelected,
                                      CAS cas)
        Create an AnnotationViewer Dialog
        Parameters:
        aParentFrame - frame containing this panel
        aDialogTitle - title to display for the dialog
        med -
        aStyleMapFile - filename of style map to be used to view files in HTML
        aPerformanceStats - string representaiton of performance statistics, optional.
        aTypeSystem - the CAS Type System to which the XCAS files must conform.
        aTypesToDisplay - array of types that should be highlighted in the viewer. This can be set to the output types of the Analysis Engine. A value of null means to display all types.
        interactiveTempFN -
        javaViewerRBisSelected -
        javaViewerUCRBisSelected -
        xmlRBisSelected -
        cas -
    • Method Detail

      • getDefaultCasViewName

        public String getDefaultCasViewName()
        Gets the name of the CAS View that will be displayed first in the annotation viewer.
      • setDefaultCasViewName

        public void setDefaultCasViewName​(String defaultCasViewName)
        Sets the name of the CAS View that will be displayed first in the annotation viewer. It not set, defaults to CAS.NAME_DEFAULT_SOFA.
      • launchThatViewer

        public void launchThatViewer​(String inputDirPath,
                                     String fileName,
                                     TypeSystem typeSystem,
                                     String[] aTypesToDisplay,
                                     boolean javaViewerRBisSelected,
                                     boolean javaViewerUCRBisSelected,
                                     boolean xmlRBisSelected,
                                     File styleMapFile,
                                     File viewerDirectory)
      • getTextValue

        public static String getTextValue​(Node node)
        Assumes node has a text field and extracts its value. JMP
      • getFirstChildByName

        public static Node getFirstChildByName​(Node node,
                                               String name)
        Gets the first child with a given name. JMP
      • getColorsForTypesFromFile

        public void getColorsForTypesFromFile​(CasAnnotationViewer viewer,
                                              File aStyleMapFile)
        Reads in annotation-color associations from stylemap file. JMP Also reads checked value if present.
      • displayError

        public void displayError​(String aErrorString)
        Displays an error message to the user.
        Parameters:
        aErrorString - error message to display
      • displayError

        public void displayError​(Throwable aThrowable)
        Displays an error message to the user.
        Parameters:
        aThrowable - Throwable whose message is to be displayed.