Examples of LinkcheckFileResult


Examples of org.apache.maven.doxia.linkcheck.model.LinkcheckFileResult

                sink.table();

                for ( Iterator it2 = linkcheckFile.getResults().iterator(); it2.hasNext(); )
                {
                    LinkcheckFileResult linkcheckFileResult = (LinkcheckFileResult) it2.next();

                    if ( linkcheckFileResult.getStatusLevel() == LinkcheckFileResult.VALID_LEVEL )
                    {
                        continue;
                    }

                    sink.tableRow();

                    sink.tableCell();
                    if ( linkcheckFileResult.getStatusLevel() == LinkcheckFileResult.WARNING_LEVEL )
                    {
                        iconWarning( locale, sink );
                    }
                    else if ( linkcheckFileResult.getStatusLevel() == LinkcheckFileResult.ERROR_LEVEL )
                    {
                        iconError( locale, sink );
                    }
                    sink.tableCell_();

                    sink.tableCell();
                    sink.italic();
                    if ( linkcheckFileResult.getTarget().startsWith( "#" ) )
                    {
                        sink.link( linkcheckFile.getRelativePath() + linkcheckFileResult.getTarget() );
                    }
                    else if ( linkcheckFileResult.getTarget().startsWith( "." ) )
                    {
                        // We need to calculate a correct absolute path here, because target is a relative path
                        String absolutePath = FilenameUtils.getFullPath( linkcheckFile.getRelativePath() )
                            + linkcheckFileResult.getTarget();
                        String normalizedPath = FilenameUtils.normalize( absolutePath );
                        if ( normalizedPath == null )
                        {
                            normalizedPath = absolutePath;
                        }
                        sink.link( normalizedPath );
                    }
                    else
                    {
                        sink.link( linkcheckFileResult.getTarget() );
                    }
                    // Show the link as it was written to make it easy for
                    // the author to find it in the source document
                    sink.text( linkcheckFileResult.getTarget() );
                    sink.link_();
                    sink.text( ": " );
                    sink.text( linkcheckFileResult.getErrorMessage() );
                    sink.italic_();
                    sink.tableCell_();

                    sink.tableRow_();
                }
View Full Code Here

Examples of org.apache.maven.doxia.linkcheck.model.LinkcheckFileResult

                sink.rawText("<td colspan=\"5\">");

                sink.table();

                for (Object o : linkcheckFile.getResults()) {
                    LinkcheckFileResult linkcheckFileResult = (LinkcheckFileResult) o;

                    if (linkcheckFileResult.getStatusLevel() == LinkcheckFileResult.VALID_LEVEL) {
                        continue;
                    }

                    sink.tableRow();

                    sink.tableCell();
                    if (linkcheckFileResult.getStatusLevel() == LinkcheckFileResult.WARNING_LEVEL) {
                        iconWarning(locale, sink);
                    } else if (linkcheckFileResult.getStatusLevel() == LinkcheckFileResult.ERROR_LEVEL) {
                        iconError(locale, sink);
                    }
                    sink.tableCell_();

                    sink.tableCell();
                    sink.italic();
                    if (linkcheckFileResult.getTarget().startsWith("#")) {
                        sink.link(linkcheckFile.getRelativePath() + linkcheckFileResult.getTarget());
                    } else if (linkcheckFileResult.getTarget().startsWith(".")) {
                        // We need to calculate a correct absolute path here, because target is a relative path
                        String absolutePath = FilenameUtils.getFullPath(linkcheckFile.getRelativePath())
                                + linkcheckFileResult.getTarget();
                        String normalizedPath = FilenameUtils.normalize(absolutePath);
                        if (normalizedPath == null) {
                            normalizedPath = absolutePath;
                        }
                        sink.link(normalizedPath);
                    } else {
                        sink.link(linkcheckFileResult.getTarget());
                    }
                    // Show the link as it was written to make it easy for
                    // the author to find it in the source document
                    sink.text(linkcheckFileResult.getTarget());
                    sink.link_();
                    sink.text(": ");
                    sink.text(linkcheckFileResult.getErrorMessage());
                    sink.italic_();
                    sink.tableCell_();

                    sink.tableRow_();
                }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.