Package org.apache.maven.doxia.document

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


        {
            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


        return model;
    }

    private DocumentMeta getMeta()
    {
        DocumentMeta meta = new DocumentMeta();
        meta.setAuthor( "The Apache Maven Project" );
        meta.setTitle( "Doxia FO Sink" );
        return meta;
    }
View Full Code Here

            throw new MojoExecutionException( "Error opening DocumentDescriptor!", io );
        }

        if ( model.getMeta() == null )
        {
            model.setMeta( new DocumentMeta() );
        }

        if ( StringUtils.isEmpty( model.getMeta().getLanguage() ) )
        {
            model.getMeta().setLanguage( locale.getLanguage() );
View Full Code Here

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

        meta.setAuthors( getAuthors( project ) );
        meta.setCreationDate( date );
        meta.setCreator( System.getProperty( "user.name" ) );
        meta.setDate( date );
        meta.setDescription( project == null ? null : project.getDescription() );
        //meta.setGenerator( generator );
        meta.setInitialCreator( System.getProperty( "user.name" ) );
        //meta.setLanguage( locale == null ? null : locale.getLanguage() );
        //meta.setPageSize( pageSize );
        meta.setSubject( getProjectName( project ) );
        meta.setTitle( getProjectName( project ) );

        return meta;
    }
View Full Code Here

        // Meta parameters
        boolean hasNullMeta = false;
        if ( documentModel.getMeta() == null )
        {
            hasNullMeta = true;
            documentModel.setMeta( new DocumentMeta() );
        }
        addTransformerParameter( transformer, "meta.author", documentModel.getMeta().getAllAuthorNames(),
                                 System.getProperty( "user.name", "null" ) );
        addTransformerParameter( transformer, "meta.creator", documentModel.getMeta().getCreator(),
                                 System.getProperty( "user.name", "null" ) );
View Full Code Here

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

        meta.setAuthors( getAuthors( project ) );
        meta.setCreationDate( date );
        meta.setCreator( System.getProperty( "user.name" ) );
        meta.setDate( date );
        meta.setDescription( project == null ? null : project.getDescription() );
        //meta.setGenerator( generator );
        meta.setInitialCreator( System.getProperty( "user.name" ) );
        //meta.setLanguage( locale == null ? null : locale.getLanguage() );
        //meta.setPageSize( pageSize );
        meta.setSubject( getProjectName( project ) );
        meta.setTitle( getProjectName( project ) );

        return meta;
    }
View Full Code Here

        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 ) );
        assertEquals( "Test Name", meta.getSubject() );
        assertEquals( "Test Name", meta.getTitle() );

        DocumentTOC toc = model.getToc();
        assertEquals( 0, toc.getItems().size() );
    }
View Full Code Here

        return model;
    }

    private DocumentMeta getMeta()
    {
        DocumentMeta meta = new DocumentMeta();
        meta.setAuthor( "The Apache Maven Project" );
        meta.setTitle( "Doxia FO Sink" );
        return meta;
    }
View Full Code Here

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

        meta.setAuthors( getAuthors( project ) );
        meta.setCreationDate( date );
        meta.setCreator( System.getProperty( "user.name" ) );
        meta.setDate( date );
        meta.setDescription( project == null ? null : project.getDescription() );
        //meta.setGenerator( generator );
        meta.setInitialCreator( System.getProperty( "user.name" ) );
        //meta.setLanguage( locale == null ? null : locale.getLanguage() );
        //meta.setPageSize( pageSize );
        meta.setSubject( getProjectName( project ) );
        meta.setTitle( getProjectName( project ) );

        return meta;
    }
View Full Code Here

        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 ));
        assertEquals( "Test Name", meta.getSubject() );
        assertEquals( "Test Name", meta.getTitle() );

        DocumentTOC toc = model.getToc();
        assertEquals( 0, toc.getItems().size() );
    }
View Full Code Here

TOP

Related Classes of org.apache.maven.doxia.document.DocumentMeta

Copyright © 2018 www.massapicom. 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.