|
[HepData-svn] r1423 - trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pagesblackhole at projects.hepforge.org blackhole at projects.hepforge.orgMon Nov 22 14:40:12 GMT 2010
Author: whalley Date: Mon Nov 22 14:40:12 2010 New Revision: 1423 Log: putting file extensions on plain (txt) pyroot (py) and jhepwork (py) outputs Modified: trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages/View.java Modified: trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages/View.java ============================================================================== --- trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages/View.java Mon Nov 22 14:38:42 2010 (r1422) +++ trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages/View.java Mon Nov 22 14:40:12 2010 (r1423) @@ -36,7 +36,7 @@ parseBaseViewContext(context); // Handle pattern parsing separately - Pattern patt = Pattern.compile("\\A" + "(short|long|full|plain|yoda|aida|pyroot|root|mpl|bdms|hepml|jhepwork)" + "\\Z", + Pattern patt = Pattern.compile("\\A" + "(short|long|full|plain.txt|yoda|aida|pyroot.py|root|mpl|bdms|hepml|jhepwork.py)" + "\\Z", Pattern.CASE_INSENSITIVE); for (int i = 0; i < context.getCount(); i++) { String ps = context.get(String.class, i); @@ -51,12 +51,12 @@ // Now handle the special formats (after parsing *all* context elements) String fmt = getQueryParam("format"); if (fmt != null) { - if (fmt.equals("jhepwork")) return asJhepwork(); + if (fmt.equals("jhepwork.py")) return asJhepwork(); if (fmt.equals("hepml")) return asHepML(); if (fmt.equals("bdms")) return asBDMS(); - if (fmt.equals("plain")) return asPlain(); + if (fmt.equals("plain.txt")) return asPlain(); if (fmt.equals("aida")) return asAIDA(); - if (fmt.equals("pyroot")) return asPyROOT(); + if (fmt.equals("pyroot.py")) return asPyROOT(); if (fmt.equals("yoda")) return asYODA(); if (fmt.equals("root")) return asROOT(); if (fmt.equals("mpl")) return asMatplotlib(); @@ -84,7 +84,7 @@ /////////////////////////////////////////////// // public Object getJhepworkContext() { - return formatContext("jhepwork"); + return formatContext("jhepwork.py"); } public StreamResponse asJhepwork() { Set<Dataset> ds = getDatasets(); @@ -121,7 +121,7 @@ public Object getPlainContext() { - return formatContext("plain"); + return formatContext("plain.txt"); } public StreamResponse asPlain() { Set<Dataset> ds = getDatasets(); @@ -188,7 +188,7 @@ public Object getPyRootContext() { - return formatContext("pyroot"); + return formatContext("pyroot.py"); } public StreamResponse asPyROOT() { Set<Dataset> ds = getDatasets();
More information about the HepData-svn mailing list |