Examples of DocumentCover


Examples of org.apache.maven.doxia.document.DocumentCover

        if ( this.docModel == null )
        {
            return;
        }

        DocumentCover cover = docModel.getCover();
        DocumentMeta meta = docModel.getMeta();

        if ( cover == null && meta == null )
        {
            return; // no information for cover page: ignore
View Full Code Here

Examples of org.apache.maven.doxia.document.DocumentCover

     */
    public void testSpecialCharacters()
        throws IOException, TransformerException
    {
        DocumentModel model = new DocumentModel();
        DocumentCover cover = new DocumentCover();

        cover.setCompanyName( "Partner & Friends" );
        cover.setCoverTitle( "A Masterpice in Encoding Theory <>&" );
        cover.setCoverSubTitle( "Some nice Encodings & <METHODS>" );
        cover.setProjectName( "A Masterpice in Encoding Theory <>&" );
        cover.setAuthor( "Partner & Friends" );
        model.setCover( cover );

        File foFile = File.createTempFile( "fo-test", ".fo" );
        File pdfFile = File.createTempFile( "fo-test", ".pdf" );
        try
View Full Code Here

Examples of org.apache.maven.doxia.document.DocumentCover

     *
     * @return a DocumentCover object. Always non-null.
     */
    private static DocumentCover getDocumentCover( MavenProject project, Date date )
    {
        final DocumentCover cover = new DocumentCover();

        cover.setAuthors( getAuthors( project ) );
        //cover.setCompanyLogo( companyLogo );
        cover.setCompanyName( getProjectOrganizationName( project ) );
        cover.setCoverDate( date );
        cover.setCoverSubTitle( project == null ? null : "v. " + project.getVersion() );
        cover.setCoverTitle( getProjectName( project ) );
        //cover.setCoverType( type );
        cover.setCoverVersion( project == null ? null : project.getVersion() );
        //cover.setProjectLogo( projectLogo );
        cover.setProjectName( getProjectName( project ) );

        return cover;
    }
View Full Code Here

Examples of org.apache.maven.doxia.document.DocumentCover

        // cover parameter
        boolean hasNullCover = false;
        if ( documentModel.getCover() == null )
        {
            hasNullCover = true;
            documentModel.setCover( new DocumentCover() );
        }
        addTransformerParameter( transformer, "cover.author", documentModel.getCover().getAllAuthorNames(),
                                 System.getProperty( "user.name", "null" ) );
        String companyLogo = getLogoURL( documentModel.getCover().getCompanyLogo(), iTextFile.getParentFile() );
        addTransformerParameter( transformer, "cover.companyLogo", companyLogo );
View Full Code Here

Examples of org.apache.maven.doxia.document.DocumentCover

     *
     * @return a DocumentCover object. Always non-null.
     */
    private static DocumentCover getDocumentCover( MavenProject project, Date date )
    {
        final DocumentCover cover = new DocumentCover();

        cover.setAuthors( getAuthors( project ) );
        //cover.setCompanyLogo( companyLogo );
        cover.setCompanyName( getProjectOrganizationName( project ) );
        cover.setCoverDate( date );
        cover.setCoverSubTitle( project == null ? null : "v. " + project.getVersion() );
        cover.setCoverTitle( getProjectName( project ) );
        //cover.setCoverType( type );
        cover.setCoverVersion( project == null ? null : project.getVersion() );
        //cover.setProjectLogo( projectLogo );
        cover.setProjectName( getProjectName( project ) );

        return cover;
    }
View Full Code Here

Examples of org.apache.maven.doxia.document.DocumentCover

        DocumentModel model = new DocumentModelBuilder( new ModelBuilderMavenProjectStub() ).getDocumentModel();

        assertEquals( "ISO-8859-1", model.getModelEncoding() );
        assertEquals( "Test ArtifactId", model.getOutputName() );

        DocumentCover cover = model.getCover();
        assertEquals( "Test Version", cover.getCoverVersion() );
        assertEquals( "Test Name", cover.getProjectName() );
        assertEquals( "Test Name", cover.getCoverTitle() );
        assertEquals( "v. Test Version", cover.getCoverSubTitle() );
        assertEquals( "Test Organization", cover.getCompanyName() );
        assertEquals( 2, cover.getAuthors().size() );
        assertFirstDocumentAuthor( (DocumentAuthor) cover.getAuthors().get( 0 ) );

        DocumentMeta meta = model.getMeta();
        assertEquals( "Test Description", meta.getDescription() );
        assertEquals( 2, meta.getAuthors().size() );
        assertFirstDocumentAuthor( (DocumentAuthor) meta.getAuthors().get( 0 ) );
View Full Code Here

Examples of org.apache.maven.doxia.document.DocumentCover

     */
    public void testSpecialCharacters()
        throws IOException, TransformerException
    {
        DocumentModel model = new DocumentModel();
        DocumentCover cover = new DocumentCover();

        cover.setCompanyName( "Partner & Friends" );
        cover.setCoverTitle( "A Masterpice in Encoding Theory <>&" );
        cover.setCoverSubTitle( "Some nice Encodings & <METHODS>" );
        cover.setProjectName( "A Masterpice in Encoding Theory <>&" );
        cover.setAuthor( "Partner & Friends" );
        model.setCover( cover );

        File foFile = File.createTempFile( "fo-test", ".fo" );
        File pdfFile = File.createTempFile( "fo-test", ".pdf" );
        try
View Full Code Here

Examples of org.apache.maven.doxia.document.DocumentCover

     *
     * @return a DocumentCover object. Always non-null.
     */
    private static DocumentCover getDocumentCover( MavenProject project, Date date )
    {
        final DocumentCover cover = new DocumentCover();

        cover.setAuthors( getAuthors( project ) );
        //cover.setCompanyLogo( companyLogo );
        cover.setCompanyName( getProjectOrganizationName( project ) );
        cover.setCoverDate( date );
        cover.setCoverSubTitle( project == null ? null : "v. " + project.getVersion() );
        cover.setCoverTitle( getProjectName( project ) );
        //cover.setCoverType( type );
        cover.setCoverVersion( project == null ? null : project.getVersion() );
        //cover.setProjectLogo( projectLogo );
        cover.setProjectName( getProjectName( project ) );

        return cover;
    }
View Full Code Here

Examples of org.apache.maven.doxia.document.DocumentCover

        DocumentModel model = new DocumentModelBuilder( new ModelBuilderMavenProjectStub() ).getDocumentModel();

        assertEquals( "ISO-8859-1", model.getModelEncoding() );
        assertEquals( "Test ArtifactId", model.getOutputName() );

        DocumentCover cover = model.getCover();
        assertEquals( "Test Version", cover.getCoverVersion() );
        assertEquals( "Test Name", cover.getProjectName() );
        assertEquals( "Test Name", cover.getCoverTitle() );
        assertEquals( "v. Test Version", cover.getCoverSubTitle() );
        assertEquals( "Test Organization", cover.getCompanyName() );
        assertEquals( 2, cover.getAuthors().size() );
        assertFirstDocumentAuthor(cover.getAuthors().get( 0 ));

        DocumentMeta meta = model.getMeta();
        assertEquals( "Test Description", meta.getDescription() );
        assertEquals( 2, meta.getAuthors().size() );
        assertFirstDocumentAuthor(meta.getAuthors().get( 0 ));
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.