mil.dod.th.word.htm.doclet/src/org/udri/doclet/msword/MSHTMLDoclet.java
private static void runLinkReport() {
        // Initialize writer and write out beginning HTML and CSS from template
        String brokenlinksreport = _options.getBrokenLinksReportFile();
        if (brokenlinksreport == null) {
            return;
        }

        PrintWriter pw = null;
        try {
            pw = new PrintWriter(new File(brokenlinksreport));
            pw.println("LINK NOT FOUND, Containing Element");

            for (String linkRef : _docLinkRefs.keySet()) {
                if (!_docLinks.contains(linkRef)) {
                    Doc doc = _docLinkRefs.get(linkRef);
                    String element = null;
                    if (doc.isClass()) {
                        ClassDoc c = (ClassDoc) doc;
                        element = c.qualifiedName();
                    } else if (doc.isConstructor() || doc.isMethod()
                            || doc.isField() || doc.isEnum()) {
                        MemberDoc m = (MemberDoc) doc;
                        element = m.containingClass().qualifiedName() + m.name();
                    } else {
                        element = "Unknown Link Holder JavaDoc type: "
                                + doc.toString();
                    }
                    pw.println(linkRef + "," + element);
                    System.err.println("Broken Link: Missing '" + linkRef
                            + "' in " + element);
                }
            }
            pw.flush();
            pw.close();
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if (pw != null)
                pw.close();
        }
    }
/**
     * Run the report and create the output file to write the invalid links
     * report
     */
Run the report and create the output file to write the invalid links
report
Run the report and create the output file to write the invalid links report
private static void runLinkReport() {
        String brokenlinksreport = _options.getBrokenLinksReportFile();
        if (brokenlinksreport == null) {
            return;
        }
        PrintWriter pw = null;
        try {
            pw = new PrintWriter(new File(brokenlinksreport));
            pw.println("LINK NOT FOUND, Containing Element");
            for (String linkRef : _docLinkRefs.keySet()) {
                if (!_docLinks.contains(linkRef)) {
                    Doc doc = _docLinkRefs.get(linkRef);
                    String element = null;
                    if (doc.isClass()) {
                        ClassDoc c = (ClassDoc) doc;
                        element = c.qualifiedName();
                    } else if (doc.isConstructor() || doc.isMethod()
                            || doc.isField() || doc.isEnum()) {
                        MemberDoc m = (MemberDoc) doc;
                        element = m.containingClass().qualifiedName() + m.name();
                    } else {
                        element = "Unknown Link Holder JavaDoc type: "
                                + doc.toString();
                    }
                    pw.println(linkRef + "," + element);
                    System.err.println("Broken Link: Missing '" + linkRef
                            + "' in " + element);
                }
            }
            pw.flush();
            pw.close();
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if (pw != null)
                pw.close();
        }
    }
private static void runLinkReport ( ) { String brokenlinksreport = _options . getBrokenLinksReportFile ( ) ; if ( brokenlinksreport == null ) { return ; } PrintWriter pw = null ; try { pw = new PrintWriter ( new File ( brokenlinksreport ) ) ; pw . println ( "LINK NOT FOUND, Containing Element" ) ; for ( String linkRef : _docLinkRefs . keySet ( ) ) { if ( ! _docLinks . contains ( linkRef ) ) { Doc doc = _docLinkRefs . get ( linkRef ) ; String element = null ; if ( doc . isClass ( ) ) { ClassDoc c = ( ClassDoc ) doc ; element = c . qualifiedName ( ) ; } else if ( doc . isConstructor ( ) || doc . isMethod ( ) || doc . isField ( ) || doc . isEnum ( ) ) { MemberDoc m = ( MemberDoc ) doc ; element = m . containingClass ( ) . qualifiedName ( ) + m . name ( ) ; } else { element = "Unknown Link Holder JavaDoc type: " + doc . toString ( ) ; } pw . println ( linkRef + "," + element ) ; System . err . println ( "Broken Link: Missing '" + linkRef + "' in " + element ) ; } } pw . flush ( ) ; pw . close ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } finally { if ( pw != null ) pw . close ( ) ; } }
Run the report and create the output file to write the invalid links
 report
Run the report and create the output file to write the invalid links report
// Initialize writer and write out beginning HTML and CSS from template