There are 1 code examples for org.apache.uima.tools.cvd.MainFrame.
The API names are highlighted below.
You can use
button
to vote the code example(s) you like. The best code example will be ranked first next time. Thanks a lot for your feedback.
Project Name: icTAKES Package: edu.mayo.bmi.ctakes.main
Source Code: cTAKESCVDGUI.java (Click to view .java file)
Method Code:
public static void main(String[] args){
try {
CommandLineParser clp=createCmdLineParser();
clp.parseCmdLine(args);
if (!checkCmdLineSyntax(clp)) {
printUsage();
System.exit(2);
}
String lookAndFeel=null;
if (clp.isInArgsList(LOOK_AND_FEEL_PARAM)) {
lookAndFeel=clp.getParamArgument(LOOK_AND_FEEL_PARAM);
try {
UIManager.setLookAndFeel(lookAndFeel);
}
catch ( UnsupportedLookAndFeelException e) {
System.err.println(e.getMessage());
}
}
MainFrame frame=createMainFrame();
if (clp.isInArgsList(TEXT_FILE_PARAM)) {
frame.loadTextFile(new File(clp.getParamArgument(TEXT_FILE_PARAM)));
}
if (clp.isInArgsList(DATA_PATH_PARAM)) {
frame.setDataPath(clp.getParamArgument(DATA_PATH_PARAM));
}
else {
String dataProp=System.getProperty(RelativePathResolver.UIMA_DATAPATH_PROP);
if (dataProp != null) {
frame.setDataPath(dataProp);
}
}
if (clp.isInArgsList(DESC_FILE_PARAM)) {
frame.loadAEDescriptor(new File(clp.getParamArgument(DESC_FILE_PARAM)));
}
if (clp.isInArgsList(TEXT_FILE_PARAM)) {
frame.loadTextFile(new File(clp.getParamArgument(TEXT_FILE_PARAM)));
}
if (clp.isInArgsList(EXECUTE_SWITCH)) {
frame.runAE(true);
}
}
catch ( Exception e) {
e.printStackTrace();
System.exit(1);
}
}