Author: ltheussl
Date: Wed May 6 13:13:46 2009
New Revision: 772215
URL: http://svn.apache.org/viewvc?rev=772215&view=rev
Log:
Simplify DocumentCover, date and author are just Strings. We need to oublish a
new xsd.
Modified:
maven/doxia/doxia/trunk/doxia-core/src/main/mdo/document.mdo
maven/doxia/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/document/DocumentModelTest.java
Modified: maven/doxia/doxia/trunk/doxia-core/src/main/mdo/document.mdo
URL:
http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-core/src/main/mdo/document.mdo?rev=772215&r1=772214&r2=772215&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-core/src/main/mdo/document.mdo (original)
+++ maven/doxia/doxia/trunk/doxia-core/src/main/mdo/document.mdo Wed May 6
13:13:46 2009
@@ -27,7 +27,7 @@
<p>This is a reference for the Document model used in Doxia.</p>
<p>An XSD is available at:</p>
<ul>
- <li><a
href="http://maven.apache.org/doxia/xsd/document-1.0.0.xsd">http://maven.apache.org/doxia/xsd/document-1.0.0.xsd</a>.</li>
+ <li><a
href="http://maven.apache.org/doxia/xsd/document-1.0.1.xsd">http://maven.apache.org/doxia/xsd/document-1.0.1.xsd</a>.</li>
</ul>
]]></description>
<defaults>
@@ -354,7 +354,7 @@
<class>
<name>DocumentAuthor</name>
- <description>An author the document.</description>
+ <description>An author of the document.</description>
<version>1.0.0</version>
<fields>
<field>
@@ -764,19 +764,16 @@
The date to appear on the cover.
]]></description>
<version>1.0.0</version>
- <type>Date</type>
+ <type>String</type>
<identifier>true</identifier>
</field>
<field>
- <name>authors</name>
- <version>1.0.0</version>
+ <name>author</name>
<description><![CDATA[
- The authors that appear on the cover page.
+ The author that appears on the cover page.
]]></description>
- <association xml.itemsStyle="flat">
- <type>DocumentAuthor</type>
- <multiplicity>*</multiplicity>
- </association>
+ <version>1.0.0</version>
+ <type>String</type>
<identifier>true</identifier>
</field>
<field>
Modified:
maven/doxia/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/document/DocumentModelTest.java
URL:
http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/document/DocumentModelTest.java?rev=772215&r1=772214&r2=772215&view=diff
==============================================================================
---
maven/doxia/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/document/DocumentModelTest.java
(original)
+++
maven/doxia/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/document/DocumentModelTest.java
Wed May 6 13:13:46 2009
@@ -129,10 +129,10 @@
private DocumentCover getDocumentCover()
{
DocumentCover cover = new DocumentCover();
- cover.addAuthor( getAuthor( 1 ) );
+ cover.setAuthor( "Author" );
cover.setCompanyLogo( "companyLogo" );
cover.setCompanyName( "companyName" );
- cover.setCoverDate( new Date( 0L ) );
+ cover.setCoverDate( "coverDate" );
cover.setCoverSubTitle( "coverSubTitle" );
cover.setCoverTitle( "coverTitle" );
cover.setCoverType( "coverType" );
@@ -145,12 +145,10 @@
private void verifyDocumentCover( DocumentCover cover )
{
- List authors = cover.getAuthors();
- assertEquals( 1, authors.size() );
- verifyAuthor( (DocumentAuthor) authors.get( 0 ), 1 );
+ assertEquals( "Author", cover.getAuthor() );
assertEquals( "companyLogo", cover.getCompanyLogo() );
assertEquals( "companyName", cover.getCompanyName() );
- assertEquals( 0L, cover.getCoverDate().getTime() );
+ assertEquals( "coverDate", cover.getCoverDate() );
assertEquals( "coverSubTitle", cover.getCoverSubTitle() );
assertEquals( "coverTitle", cover.getCoverTitle() );
assertEquals( "coverType", cover.getCoverType() );