You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by al...@apache.org on 2007/01/30 23:38:05 UTC
svn commit: r501613 - in /incubator/uima/uimaj/trunk/uimaj-tools/src/main:
java/org/apache/uima/tools/ java/org/apache/uima/tools/docanalyzer/
resources/org/apache/uima/tools/migration/
Author: alally
Date: Tue Jan 30 14:38:04 2007
New Revision: 501613
URL: http://svn.apache.org/viewvc?view=rev&rev=501613
Log:
XCasAnnotationViewer renamed to AnnotationViewer
https://issues.apache.org/jira/browse/UIMA-247
Added:
incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/AnnotationViewerMain.java
- copied, changed from r501575, incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/XCasAnnotationViewerMain.java
incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/docanalyzer/AnnotationViewerDialog.java
- copied, changed from r501575, incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/docanalyzer/XCasAnnotationViewerDialog.java
Removed:
incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/XCasAnnotationViewerMain.java
incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/docanalyzer/XCasAnnotationViewerDialog.java
Modified:
incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/docanalyzer/DocumentAnalyzer.java
incubator/uima/uimaj/trunk/uimaj-tools/src/main/resources/org/apache/uima/tools/migration/stringReplacements.txt
Copied: incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/AnnotationViewerMain.java (from r501575, incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/XCasAnnotationViewerMain.java)
URL: http://svn.apache.org/viewvc/incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/AnnotationViewerMain.java?view=diff&rev=501613&p1=incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/XCasAnnotationViewerMain.java&r1=501575&p2=incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/AnnotationViewerMain.java&r2=501613
==============================================================================
--- incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/XCasAnnotationViewerMain.java (original)
+++ incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/AnnotationViewerMain.java Tue Jan 30 14:38:04 2007
@@ -57,7 +57,7 @@
import org.apache.uima.resource.metadata.FsIndexDescription;
import org.apache.uima.resource.metadata.TypeSystemDescription;
import org.apache.uima.tools.docanalyzer.PrefsMediator;
-import org.apache.uima.tools.docanalyzer.XCasAnnotationViewerDialog;
+import org.apache.uima.tools.docanalyzer.AnnotationViewerDialog;
import org.apache.uima.tools.images.Images;
import org.apache.uima.tools.util.gui.Caption;
import org.apache.uima.tools.util.gui.FileSelector;
@@ -69,21 +69,21 @@
import org.apache.uima.util.XMLInputSource;
/**
- * Main XCAS Annotation Viewer GUI. Allows user to choose directory of XCAS or XMI files, then
- * launches the XCasAnnotationViewerDialog.
+ * Main Annotation Viewer GUI. Allows user to choose directory of XCAS or XMI files, then
+ * launches the AnnotationViewerDialog.
*
*
*/
-public class XCasAnnotationViewerMain extends JFrame {
+public class AnnotationViewerMain extends JFrame {
private static final long serialVersionUID = -3201723535833938833L;
- private static final String HELP_MESSAGE = "Instructions for using XCAS Annotation Viewer:\n\n"
+ private static final String HELP_MESSAGE = "Instructions for using Annotation Viewer:\n\n"
+ "1) In the \"Input Directory\" field, either type or use the browse\n"
+ "button to select a directory containing the analyzed documents\n "
+ "(in XMI or XCAS format) that you want to view.\n\n"
+ "2) In the \"TAE Descriptor File\" field, either type or use the browse\n"
+ "button to select the TAE descriptor for the TAE that generated the\n"
- + "XCAS files. (This is needed for type system infornation only.\n"
+ + "XMI or XCAS files. (This is needed for type system infornation only.\n"
+ "Analysis will not be redone.)\n\n"
+ "3) Click the \"View\" button at the buttom of the window.\n\n"
+ "A list of the analyzed documents will be displayed.\n\n\n"
@@ -107,8 +107,8 @@
/**
* Constructor. Sets up the GUI.
*/
- public XCasAnnotationViewerMain() {
- super("XCAS Annotation Viewer");
+ public AnnotationViewerMain() {
+ super("Annotation Viewer");
// set UIMA home dir
uimaHomeDir = new File(System.getProperty("uima.home", "C:/Program Files/apache-uima"));
@@ -134,7 +134,7 @@
this.getContentPane().setBackground(Color.WHITE);
// create about dialog
- aboutDialog = new AboutDialog(this, "About XCAS Annotation Viewer");
+ aboutDialog = new AboutDialog(this, "About Annotation Viewer");
// Create Menu Bar
JMenuBar menuBar = new JMenuBar();
@@ -207,7 +207,7 @@
// Event Handlling of "Help" Menu Item
helpMenuItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ae) {
- JOptionPane.showMessageDialog(XCasAnnotationViewerMain.this, HELP_MESSAGE,
+ JOptionPane.showMessageDialog(AnnotationViewerMain.this, HELP_MESSAGE,
"Annotation Viewer Help", JOptionPane.PLAIN_MESSAGE);
}
});
@@ -286,7 +286,7 @@
// PrefsMediator is also used in DocumentAnalyzer, where the
// output dir is the directory containing XCAS files.
prefsMed.setOutputDir(inputDir.toString());
- XCasAnnotationViewerDialog viewerDialog = new XCasAnnotationViewerDialog(this,
+ AnnotationViewerDialog viewerDialog = new AnnotationViewerDialog(this,
"Analyzed Documents", prefsMed, styleMapFile, null, cas.getTypeSystem(), null, false,
cas);
viewerDialog.pack();
@@ -350,7 +350,7 @@
}
public static void main(String[] args) {
- final XCasAnnotationViewerMain frame = new XCasAnnotationViewerMain();
+ final AnnotationViewerMain frame = new AnnotationViewerMain();
frame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
@@ -413,7 +413,7 @@
}
}
- JOptionPane.showMessageDialog(XCasAnnotationViewerMain.this, buf.toString(), "Error",
+ JOptionPane.showMessageDialog(AnnotationViewerMain.this, buf.toString(), "Error",
JOptionPane.ERROR_MESSAGE);
}
Copied: incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/docanalyzer/AnnotationViewerDialog.java (from r501575, incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/docanalyzer/XCasAnnotationViewerDialog.java)
URL: http://svn.apache.org/viewvc/incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/docanalyzer/AnnotationViewerDialog.java?view=diff&rev=501613&p1=incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/docanalyzer/XCasAnnotationViewerDialog.java&r1=501575&p2=incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/docanalyzer/AnnotationViewerDialog.java&r2=501613
==============================================================================
--- incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/docanalyzer/XCasAnnotationViewerDialog.java (original)
+++ incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/docanalyzer/AnnotationViewerDialog.java Tue Jan 30 14:38:04 2007
@@ -98,7 +98,7 @@
* inline XML format.
*
*/
-public class XCasAnnotationViewerDialog extends JDialog implements ActionListener {
+public class AnnotationViewerDialog extends JDialog implements ActionListener {
private static final long serialVersionUID = -7259891069111863433L;
@@ -195,7 +195,7 @@
* 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.
*/
- public XCasAnnotationViewerDialog(JFrame aParentFrame, String aDialogTitle, PrefsMediator med,
+ public AnnotationViewerDialog(JFrame aParentFrame, String aDialogTitle, PrefsMediator med,
File aStyleMapFile, String aPerformanceStats, TypeSystem aTypeSystem,
final String[] aTypesToDisplay, String interactiveTempFN, boolean javaViewerRBisSelected,
boolean javaViewerUCRBisSelected, boolean xmlRBisSelected, CAS cas) {
@@ -224,7 +224,7 @@
}
}
- public XCasAnnotationViewerDialog(JFrame aParentFrame, String aDialogTitle, PrefsMediator med,
+ public AnnotationViewerDialog(JFrame aParentFrame, String aDialogTitle, PrefsMediator med,
File aStyleMapFile, String aPerformanceStats, TypeSystem aTypeSystem,
final String[] aTypesToDisplay, boolean generatedStyleMap, CAS cas) {
@@ -348,7 +348,7 @@
// event for the closeButton button
closeButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ae) {
- XCasAnnotationViewerDialog.this.setVisible(false);
+ AnnotationViewerDialog.this.setVisible(false);
}
});
@@ -427,7 +427,7 @@
viewer.setHiddenTypes(new String[] { "uima.cpm.FileLocation" });
// launch viewer in a new dialog
viewer.setCAS(cas);
- JDialog dialog = new JDialog(XCasAnnotationViewerDialog.this, "Annotation Results for "
+ JDialog dialog = new JDialog(AnnotationViewerDialog.this, "Annotation Results for "
+ fileName + " in " + inputDirPath); // JMP
dialog.getContentPane().add(viewer);
dialog.setSize(850, 630);
@@ -476,27 +476,7 @@
}
}
- /**
- * Create an AnnotationViewer Dialog
- *
- * @param aParentFrame
- * frame containing this panel
- * @param aTitle
- * title to display for the dialog
- * @param aInputDir
- * directory containing input files (in XCAS foramt) to read
- * @param aStyleMapFile
- * filename of style map to be used to view files in HTML
- * @param aPerformanceStats
- * string representaiton of performance statistics, optional.
- * @param aTypeSystem
- * the CAS Type System to which the XCAS files must conform.
- */
- /*
- * public XCasAnnotationViewerDialog(JFrame aParentFrame, String aDialogTitle, File aInputDir,
- * File aStyleMapFile, String aPerformanceStats, TypeSystem aTypeSystem) { this(aParentFrame,
- * aDialogTitle, aInputDir, aStyleMapFile, aPerformanceStats, aTypeSystem, null); }
- */
+
/**
* Assumes node has a text field and extracts its value. JMP
*/
@@ -640,7 +620,7 @@
}
}
- JOptionPane.showMessageDialog(XCasAnnotationViewerDialog.this, buf.toString(), "Error",
+ JOptionPane.showMessageDialog(AnnotationViewerDialog.this, buf.toString(), "Error",
JOptionPane.ERROR_MESSAGE);
}
Modified: incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/docanalyzer/DocumentAnalyzer.java
URL: http://svn.apache.org/viewvc/incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/docanalyzer/DocumentAnalyzer.java?view=diff&rev=501613&r1=501612&r2=501613
==============================================================================
--- incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/docanalyzer/DocumentAnalyzer.java (original)
+++ incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/docanalyzer/DocumentAnalyzer.java Tue Jan 30 14:38:04 2007
@@ -752,7 +752,7 @@
// Not sure if the following code makes sense... If a style map file exists,
// this restricts the set of types displayed by the viewer to only the types
// in that file. But why is this only done in "View" mode? It seems like this
- // belongs in XCasAnnotationViewerDialog with the other code that sets up the
+ // belongs in AnnotationViewerDialog with the other code that sets up the
// viewer (e.g., the colors) from the style map file.
if (prefsMed.getStylemapFile().exists()) {
StyleMapEditor sedit = new StyleMapEditor(this, cas);
@@ -813,15 +813,15 @@
// create Annotation Viewer Main Panel. Depends on interactive setting.
// JMP
if (interactive) {
- // this version of the XCasAnnotationViewerDialog automatically
+ // this version of the AnnotationViewerDialog automatically
// calls setVisible(true) to make the dialog visible
- new XCasAnnotationViewerDialog(this, "Analysis Results", prefsMed, styleMapFile, statsString,
+ new AnnotationViewerDialog(this, "Analysis Results", prefsMed, styleMapFile, statsString,
currentTypeSystem, currentTaeOutputTypes, interactiveTempFN + ".xmi",
javaViewerRBisSelected, javaViewerUCRBisSelected, xmlRB.isSelected(), cas);
} else {
- // this version of the XCasAnnotationViewerDialog constructor does
+ // this version of the AnnotationViewerDialog constructor does
// not automatically launch the viewer.
- XCasAnnotationViewerDialog viewerDialog = new XCasAnnotationViewerDialog(this,
+ AnnotationViewerDialog viewerDialog = new AnnotationViewerDialog(this,
"Analysis Results", prefsMed, styleMapFile, statsString, currentTypeSystem,
currentTaeOutputTypes, useGeneratedStyleMap, cas);
if (usingXmlDetagger) {
Modified: incubator/uima/uimaj/trunk/uimaj-tools/src/main/resources/org/apache/uima/tools/migration/stringReplacements.txt
URL: http://svn.apache.org/viewvc/incubator/uima/uimaj/trunk/uimaj-tools/src/main/resources/org/apache/uima/tools/migration/stringReplacements.txt?view=diff&rev=501613&r1=501612&r2=501613
==============================================================================
--- incubator/uima/uimaj/trunk/uimaj-tools/src/main/resources/org/apache/uima/tools/migration/stringReplacements.txt (original)
+++ incubator/uima/uimaj/trunk/uimaj-tools/src/main/resources/org/apache/uima/tools/migration/stringReplacements.txt Tue Jan 30 14:38:04 2007
@@ -33,3 +33,5 @@
uima_tools.jar uima-tools.jar
uima_jcas_builtin_types.jar uima-document-annotation.jar
vinci(/|\\)jVinci.jar jVinci.jar
+XCasAnnotationViewer AnnotationViewer
+xcasAnnotationViewer annotationViewer