Menu

[r1]: / src / activityscript / controller / Main.java  Maximize  Restore  History

Download this file

68 lines (59 with data), 1.3 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/*
* Main.java
*
* Created on 15 March 2006, 16:52
*
*/
package activityscript.controller;
import activityscript.controller.transform.Transform;
import activityscript.model.local.Script;
import java.util.Calendar;
/**
*
* @author w78075
*/
public class Main
{
private Args argsObj = null;
/**
* Constructor
* @param args
* @throws Exception
*/
public Main(String[] args) throws Exception
{
argsObj = new Args(args);
}
public Main()
{
}
/**
* main
* @param args
* @throws Exception
*/
public static void main(String[] args) throws Exception
{
if (args.length != 1)
{
System.out.println("Specify script doc as argument");
System.exit(1);
}
new Main().run(args[0]);
}
public void run(String xmlFileName) throws Exception
{
if (xmlFileName.endsWith(".uad"))
{
String newFileName = System.getProperty("java.io.tmpdir") +
"activityscript-" +
Long.toString(Calendar.getInstance().getTimeInMillis()) +
".xml";
Transform.run(xmlFileName, "xsl/from-uad.xsl", newFileName);
xmlFileName = newFileName;
}
Script script = new Script();
script.readFromXml(xmlFileName);
new Shell().run(script);
}
}
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.