From cdba069b02b0da8b9cce038a11a0cfdee77a8963 Mon Sep 17 00:00:00 2001 From: Geraldine Van der Auwera Date: Fri, 15 Aug 2014 01:04:26 -0400 Subject: [PATCH] changed the GATKDocs format to PHP --- .../help/DocumentedGATKFeatureHandler.java | 2 +- .../gatk/utils/help/GATKDocUtils.java | 8 +-- .../gatk/utils/help/GATKDoclet.java | 9 +-- .../help/GenericDocumentationHandler.java | 4 +- .../gatk/utils/help/HelpConstants.java | 4 +- .../gatk/utils/help/HelpUtils.java | 2 +- settings/helpTemplates/common.html | 67 +------------------ .../helpTemplates/generic.index.template.html | 25 ++++++- settings/helpTemplates/generic.template.html | 19 +++++- 9 files changed, 55 insertions(+), 85 deletions(-) diff --git a/public/gatk-tools-public/src/main/java/org/broadinstitute/gatk/utils/help/DocumentedGATKFeatureHandler.java b/public/gatk-tools-public/src/main/java/org/broadinstitute/gatk/utils/help/DocumentedGATKFeatureHandler.java index c2c6e5bc2..e81ab21e9 100644 --- a/public/gatk-tools-public/src/main/java/org/broadinstitute/gatk/utils/help/DocumentedGATKFeatureHandler.java +++ b/public/gatk-tools-public/src/main/java/org/broadinstitute/gatk/utils/help/DocumentedGATKFeatureHandler.java @@ -72,7 +72,7 @@ public abstract class DocumentedGATKFeatureHandler { * @return */ public String getDestinationFilename(ClassDoc doc, Class clazz) { - return GATKDocUtils.htmlFilenameForClass(clazz); + return GATKDocUtils.phpFilenameForClass(clazz); } /** diff --git a/public/gatk-tools-public/src/main/java/org/broadinstitute/gatk/utils/help/GATKDocUtils.java b/public/gatk-tools-public/src/main/java/org/broadinstitute/gatk/utils/help/GATKDocUtils.java index 2ca7656d2..72aba4da7 100644 --- a/public/gatk-tools-public/src/main/java/org/broadinstitute/gatk/utils/help/GATKDocUtils.java +++ b/public/gatk-tools-public/src/main/java/org/broadinstitute/gatk/utils/help/GATKDocUtils.java @@ -40,7 +40,7 @@ public class GATKDocUtils { public final static String URL_ROOT_FOR_UNSTABLE_GATKDOCS = "http://iwww.broadinstitute.org/gsa/gatkdocs/unstable/"; /** - * Return the filename of the GATKDoc HTML that would be generated for Class. This + * Return the filename of the GATKDoc PHP that would be generated for Class. This * does not guarantee that the docs exist, or that docs would actually be generated * for class (might not be annotated for documentation, for example). But if * this class is documented, GATKDocs will write the docs to a file named as returned @@ -49,8 +49,8 @@ public class GATKDocUtils { * @param c * @return */ - public static String htmlFilenameForClass(Class c) { - return c.getName().replace(".", "_") + ".html"; + public static String phpFilenameForClass(Class c) { + return c.getName().replace(".", "_") + ".php"; } /** @@ -61,7 +61,7 @@ public class GATKDocUtils { * @return */ public static String helpLinksToGATKDocs(Class c) { - String classPath = htmlFilenameForClass(c); + String classPath = phpFilenameForClass(c); StringBuilder b = new StringBuilder(); b.append(URL_ROOT_FOR_RELEASE_GATKDOCS).append(classPath); //b.append("stable version: ").append(URL_ROOT_FOR_STABLE_GATKDOCS).append(classPath).append("\n"); diff --git a/public/gatk-tools-public/src/main/java/org/broadinstitute/gatk/utils/help/GATKDoclet.java b/public/gatk-tools-public/src/main/java/org/broadinstitute/gatk/utils/help/GATKDoclet.java index 88469dbaf..432d11844 100644 --- a/public/gatk-tools-public/src/main/java/org/broadinstitute/gatk/utils/help/GATKDoclet.java +++ b/public/gatk-tools-public/src/main/java/org/broadinstitute/gatk/utils/help/GATKDoclet.java @@ -205,9 +205,6 @@ public class GATKDoclet { try { // basic setup destinationDir.mkdirs(); - FileUtils.copyFile(new File(settingsDir + "/bootstrap.min.css"), new File(destinationDir + "/bootstrap.min.css")); - FileUtils.copyFile(new File(settingsDir + "/bootstrap.min.js"), new File(destinationDir + "/bootstrap.min.js")); - FileUtils.copyFile(new File(settingsDir + "/jquery.min.js"), new File(destinationDir + "/jquery.min.js")); // print the Version number FileUtils.writeByteArrayToFile(new File(destinationDir + "/current.version.txt"), getSimpleVersion(absoluteVersion).getBytes()); @@ -383,7 +380,7 @@ public class GATKDoclet { } /** - * Create the html index listing all of the GATKDocs features + * Create the php index listing all of the GATKDocs features * * @param cfg * @param indexData @@ -394,7 +391,7 @@ public class GATKDoclet { Template temp = cfg.getTemplate("generic.index.template.html"); /* Merge data-model with template */ - Writer out = new OutputStreamWriter(new FileOutputStream(new File(destinationDir + "/index.html"))); + Writer out = new OutputStreamWriter(new FileOutputStream(new File(destinationDir + "/index.php"))); try { temp.process(groupIndexData(indexData), out); out.flush(); @@ -404,7 +401,7 @@ public class GATKDoclet { } /** - * Helpful function to create the html index. Given all of the already run GATKDocWorkUnits, + * Helpful function to create the php index. Given all of the already run GATKDocWorkUnits, * create the high-level grouping data listing individual features by group. * * @param indexData diff --git a/public/gatk-tools-public/src/main/java/org/broadinstitute/gatk/utils/help/GenericDocumentationHandler.java b/public/gatk-tools-public/src/main/java/org/broadinstitute/gatk/utils/help/GenericDocumentationHandler.java index a53e9119f..0fc995314 100644 --- a/public/gatk-tools-public/src/main/java/org/broadinstitute/gatk/utils/help/GenericDocumentationHandler.java +++ b/public/gatk-tools-public/src/main/java/org/broadinstitute/gatk/utils/help/GenericDocumentationHandler.java @@ -566,7 +566,7 @@ public class GenericDocumentationHandler extends DocumentedGATKFeatureHandler { // make hashmap of simplename and url final HashMap nugget = new HashMap(); nugget.put("name", filter.getSimpleName()); - nugget.put("filename", GATKDocUtils.htmlFilenameForClass(filter)); + nugget.put("filename", GATKDocUtils.phpFilenameForClass(filter)); bucket.add(nugget); } } @@ -863,7 +863,7 @@ public class GenericDocumentationHandler extends DocumentedGATKFeatureHandler { List rodTypes = new ArrayList(); for (FeatureManager.FeatureDescriptor descriptor : manager.getByFeature(featureClass)) { rodTypes.add(String.format("%s", - GATKDocUtils.htmlFilenameForClass(descriptor.getCodecClass()), + GATKDocUtils.phpFilenameForClass(descriptor.getCodecClass()), descriptor.getName())); } diff --git a/public/gatk-tools-public/src/main/java/org/broadinstitute/gatk/utils/help/HelpConstants.java b/public/gatk-tools-public/src/main/java/org/broadinstitute/gatk/utils/help/HelpConstants.java index a5ee420c7..16257c6de 100644 --- a/public/gatk-tools-public/src/main/java/org/broadinstitute/gatk/utils/help/HelpConstants.java +++ b/public/gatk-tools-public/src/main/java/org/broadinstitute/gatk/utils/help/HelpConstants.java @@ -28,7 +28,7 @@ package org.broadinstitute.gatk.utils.help; public class HelpConstants { public final static String BASE_GATK_URL = "http://www.broadinstitute.org/gatk"; - public final static String GATK_DOCS_URL = BASE_GATK_URL + "/gatkdocs/"; + public final static String GATK_DOCS_URL = BASE_GATK_URL + "/tooldocs/"; public final static String GATK_FORUM_URL = "http://gatkforums.broadinstitute.org/"; public final static String GATK_FORUM_API_URL = "https://gatkforums.broadinstitute.org/api/v1/"; @@ -37,7 +37,7 @@ public class HelpConstants { */ public final static String ARG_TREEREDUCIBLE = "-nt"; public final static String ARG_NANOSCHEDULABLE = "-nct"; - public final static String CMDLINE_GATK_URL = GATK_DOCS_URL + "org_broadinstitute_sting_gatk_CommandLineGATK.html"; + public final static String CMDLINE_GATK_URL = GATK_DOCS_URL + "org_broadinstitute_gatk_engine_CommandLineGATK.php"; /** * Definition of the group names / categories of tools. diff --git a/public/gatk-tools-public/src/main/java/org/broadinstitute/gatk/utils/help/HelpUtils.java b/public/gatk-tools-public/src/main/java/org/broadinstitute/gatk/utils/help/HelpUtils.java index 0efca21f4..1011a4935 100644 --- a/public/gatk-tools-public/src/main/java/org/broadinstitute/gatk/utils/help/HelpUtils.java +++ b/public/gatk-tools-public/src/main/java/org/broadinstitute/gatk/utils/help/HelpUtils.java @@ -44,7 +44,7 @@ public class HelpUtils { */ public static void listAnnotations() { System.out.println("\nThis is a list of available Variant Annotations for use with tools such as UnifiedGenotyper, HaplotypeCaller and VariantAnnotator. Please see the Technical Documentation for more details about these annotations:"); - System.out.println("http://www.broadinstitute.org/gatk/gatkdocs/"); + System.out.println("http://www.broadinstitute.org/gatk/tooldocs/"); System.out.println("\nStandard annotations in the list below are marked with a '*'."); List> infoAnnotationClasses = new PluginManager(InfoFieldAnnotation.class).getPlugins(); System.out.println("\nAvailable annotations for the VCF INFO field:"); diff --git a/settings/helpTemplates/common.html b/settings/helpTemplates/common.html index 874f354ba..54001626d 100644 --- a/settings/helpTemplates/common.html +++ b/settings/helpTemplates/common.html @@ -32,65 +32,13 @@ <#global guideIndex = "http://www.broadinstitute.org/gatk/guide/" /> <#global forum = "http://gatkforums.broadinstitute.org/" /> - <#macro makeHeader title isIndex> - - - - - - ${title} documentation - - - - - - - - - - - - - - - -
- - -
- <#if isIndex> - -
- - - - <#macro footerInfo> +
+

Return to top


See also Guide Index | - Tool Documentation Index | + Tool Documentation Index | Support Forum

@@ -103,15 +51,6 @@

- <#macro pageFooter> -
-
- - - - <#macro getCategories groups>