package ch.tkuhn.nanolytics;

public class Run {

	public static void main(String[] args) {
		System.out.println("Hello world!");
	}

}

@@ -27,107 +27,1025 @@
 s;%0A%0A
-public class Run %7B%0A%0A%09public static void main(String%5B%5D args) %7B%0A%09%09System.out.println(%22Hello world!%22);
+import java.io.File;%0Aimport java.net.URL;%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0Aimport net.trustyuri.TrustyUriUtils;%0A%0Aimport org.nanopub.Nanopub;%0Aimport org.nanopub.NanopubImpl;%0Aimport org.nanopub.NanopubUtils;%0Aimport org.nanopub.extra.server.GetNanopub;%0Aimport org.openrdf.rio.RDFFormat;%0A%0Apublic class Run %7B%0A%0A%09public static void main(String%5B%5D args) throws Exception %7B%0A%09%09List%3CNanopub%3E nanopubs = new ArrayList%3C%3E();%0A%09%09for (String s : args) %7B%0A%09%09%09if (s.matches(%22%5Ehttps?://.*%22)) %7B%0A%09%09%09%09nanopubs.add(new NanopubImpl(new URL(s)));%0A%09%09%09%7D else if (TrustyUriUtils.isPotentialArtifactCode(s)) %7B%0A%09%09%09%09nanopubs.add(GetNanopub.get(s));%0A%09%09%09%7D else %7B%0A%09%09%09%09nanopubs.add(new NanopubImpl(new File(s)));%0A%09%09%09%7D%0A%09%09%7D%0A%09%09Run obj = new Run(nanopubs);%0A%09%09obj.run();%0A%09%7D%0A%0A%09private List%3CNanopub%3E nanopubs = new ArrayList%3C%3E();%0A%0A%09public Run(List%3CNanopub%3E nanopubs) %7B%0A%09%09this.nanopubs.addAll(nanopubs);%0A%09%7D%0A%0A%09public void run() throws Exception %7B%0A%09%09for (Nanopub np : nanopubs) %7B%0A%09%09%09NanopubUtils.writeToStream(np, System.out, RDFFormat.TRIG);%0A%09%09%7D
 %0A%09%7D%0A

Load nanopubs from arguments