package edu.stanford.rt; import java.io.FileInputStream; import java.io.File; import edu.stanford.rt.credential.RTContext; import edu.stanford.rt.credential.CredentialStore; import edu.stanford.rt.credential.DomainSpecification; import edu.stanford.rt.parser.RTParser; import edu.stanford.rt.util.*; /** * @author Ninghui Li, Sandra Qiu
* */ public class Test1 { public static void main(String argv[]) { if (argv.length != 1) { System.out.println("java edu.stanford.rt.Main file_name"); System.exit(1); } try { RTParser rt = new RTParser(); // System domain is created here. RTContext context = new RTContext(rt); CredentialStore store = new CredentialStore(rt); rt.parseCredentialStore( new FileInputStream(new File(argv[0])), context, store); System.out.println(context.toString(" ")); System.out.println(store.toString(" ")); } catch (Exception ex) { ex.printStackTrace(); } } }