You are viewing a plain text version of this content. The canonical link for it is here.
Posted to doxia-commits@maven.apache.org by br...@apache.org on 2005/11/24 02:03:48 UTC
svn commit: r348605 [8/9] - in /maven/doxia/trunk: ./ doxia-core/
doxia-core/src/main/java/org/apache/
doxia-core/src/main/java/org/apache/maven/
doxia-core/src/main/java/org/apache/maven/doxia/
doxia-core/src/main/java/org/apache/maven/doxia/macro/ do...
Modified: maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/sink/manager/DefaultSinkManager.java
URL: http://svn.apache.org/viewcvs/maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/sink/manager/DefaultSinkManager.java?rev=348605&r1=348596&r2=348605&view=diff
==============================================================================
--- maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/sink/manager/DefaultSinkManager.java (original)
+++ maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/sink/manager/DefaultSinkManager.java Wed Nov 23 17:02:44 2005
@@ -1,23 +1,36 @@
-package org.codehaus.doxia.sink.manager;
+package org.apache.maven.doxia.sink.manager;
-import org.codehaus.doxia.sink.Sink;
+/*
+ * Copyright 2004-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.maven.doxia.sink.Sink;
-import java.util.Map;
import java.util.Collection;
+import java.util.Map;
/**
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
* @version $Id$
- *
- * @plexus.component
- * role="org.codehaus.doxia.sink.manager.SinkManager"
+ * @plexus.component role="org.apache.maven.doxia.sink.manager.SinkManager"
*/
public class DefaultSinkManager
implements SinkManager
{
/**
- * @plexus.requirement
- * role="org.codehaus.doxia.sink.Sink"
+ * @plexus.requirement role="org.apache.maven.doxia.sink.Sink"
*/
private Map sinks;
Modified: maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/sink/manager/SinkManager.java
URL: http://svn.apache.org/viewcvs/maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/sink/manager/SinkManager.java?rev=348605&r1=348596&r2=348605&view=diff
==============================================================================
--- maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/sink/manager/SinkManager.java (original)
+++ maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/sink/manager/SinkManager.java Wed Nov 23 17:02:44 2005
@@ -1,9 +1,22 @@
+package org.apache.maven.doxia.sink.manager;
+
/*
- * Copyright (c) 2004 Your Corporation. All Rights Reserved.
+ * Copyright 2004-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-package org.codehaus.doxia.sink.manager;
-import org.codehaus.doxia.sink.Sink;
+import org.apache.maven.doxia.sink.Sink;
import java.util.Collection;
Modified: maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/sink/manager/SinkNotFoundException.java
URL: http://svn.apache.org/viewcvs/maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/sink/manager/SinkNotFoundException.java?rev=348605&r1=348596&r2=348605&view=diff
==============================================================================
--- maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/sink/manager/SinkNotFoundException.java (original)
+++ maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/sink/manager/SinkNotFoundException.java Wed Nov 23 17:02:44 2005
@@ -1,4 +1,18 @@
-package org.codehaus.doxia.sink.manager;
+package org.apache.maven.doxia.sink.manager;/*
+ * Copyright 2004-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
/**
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
Modified: maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/site/module/AbstractSiteModule.java
URL: http://svn.apache.org/viewcvs/maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/site/module/AbstractSiteModule.java?rev=348605&r1=348596&r2=348605&view=diff
==============================================================================
--- maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/site/module/AbstractSiteModule.java (original)
+++ maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/site/module/AbstractSiteModule.java Wed Nov 23 17:02:44 2005
@@ -1,4 +1,18 @@
-package org.codehaus.doxia.site.module;
+package org.apache.maven.doxia.site.module;/*
+ * Copyright 2004-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
/**
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
Modified: maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/site/module/SiteModule.java
URL: http://svn.apache.org/viewcvs/maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/site/module/SiteModule.java?rev=348605&r1=348596&r2=348605&view=diff
==============================================================================
--- maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/site/module/SiteModule.java (original)
+++ maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/site/module/SiteModule.java Wed Nov 23 17:02:44 2005
@@ -1,4 +1,18 @@
-package org.codehaus.doxia.site.module;
+package org.apache.maven.doxia.site.module;/*
+ * Copyright 2004-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
/**
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
Modified: maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/site/module/manager/DefaultSiteModuleManager.java
URL: http://svn.apache.org/viewcvs/maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/site/module/manager/DefaultSiteModuleManager.java?rev=348605&r1=348596&r2=348605&view=diff
==============================================================================
--- maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/site/module/manager/DefaultSiteModuleManager.java (original)
+++ maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/site/module/manager/DefaultSiteModuleManager.java Wed Nov 23 17:02:44 2005
@@ -1,6 +1,22 @@
-package org.codehaus.doxia.site.module.manager;
+package org.apache.maven.doxia.site.module.manager;
-import org.codehaus.doxia.site.module.SiteModule;
+/*
+ * Copyright 2004-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.maven.doxia.site.module.SiteModule;
import java.util.Collection;
import java.util.Map;
@@ -8,16 +24,13 @@
/**
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
* @version $Id$
- *
- * @plexus.component
- * role="org.codehaus.doxia.site.module.manager.SiteModuleManager"
+ * @plexus.component role="org.apache.maven.doxia.site.module.manager.SiteModuleManager"
*/
public class DefaultSiteModuleManager
implements SiteModuleManager
{
/**
- * @plexus.requirement
- * role="org.codehaus.doxia.site.module.SiteModule"
+ * @plexus.requirement role="org.apache.maven.doxia.site.module.SiteModule"
*/
private Map siteModules;
Modified: maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/site/module/manager/SiteModuleManager.java
URL: http://svn.apache.org/viewcvs/maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/site/module/manager/SiteModuleManager.java?rev=348605&r1=348596&r2=348605&view=diff
==============================================================================
--- maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/site/module/manager/SiteModuleManager.java (original)
+++ maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/site/module/manager/SiteModuleManager.java Wed Nov 23 17:02:44 2005
@@ -1,6 +1,22 @@
-package org.codehaus.doxia.site.module.manager;
+package org.apache.maven.doxia.site.module.manager;
-import org.codehaus.doxia.site.module.SiteModule;
+/*
+ * Copyright 2004-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.maven.doxia.site.module.SiteModule;
import java.util.Collection;
Modified: maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/site/module/manager/SiteModuleNotFoundException.java
URL: http://svn.apache.org/viewcvs/maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/site/module/manager/SiteModuleNotFoundException.java?rev=348605&r1=348596&r2=348605&view=diff
==============================================================================
--- maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/site/module/manager/SiteModuleNotFoundException.java (original)
+++ maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/site/module/manager/SiteModuleNotFoundException.java Wed Nov 23 17:02:44 2005
@@ -1,7 +1,18 @@
-/*
- * Copyright (c) 2004 Your Corporation. All Rights Reserved.
+package org.apache.maven.doxia.site.module.manager;/*
+ * Copyright 2004-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-package org.codehaus.doxia.site.module.manager;
/**
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
Modified: maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/site/renderer/DefaultSiteRenderer.java
URL: http://svn.apache.org/viewcvs/maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/site/renderer/DefaultSiteRenderer.java?rev=348605&r1=348596&r2=348605&view=diff
==============================================================================
--- maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/site/renderer/DefaultSiteRenderer.java (original)
+++ maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/site/renderer/DefaultSiteRenderer.java Wed Nov 23 17:02:44 2005
@@ -1,14 +1,30 @@
-package org.codehaus.doxia.site.renderer;
+package org.apache.maven.doxia.site.renderer;
-import org.codehaus.doxia.Doxia;
-import org.codehaus.doxia.module.xhtml.SinkDescriptorReader;
-import org.codehaus.doxia.module.xhtml.XhtmlSink;
-import org.codehaus.doxia.module.xhtml.decoration.model.DecorationModel;
-import org.codehaus.doxia.module.xhtml.decoration.model.DecorationModelReader;
-import org.codehaus.doxia.module.xhtml.decoration.render.RenderingContext;
-import org.codehaus.doxia.sink.Sink;
-import org.codehaus.doxia.site.module.SiteModule;
-import org.codehaus.doxia.site.module.manager.SiteModuleManager;
+/*
+ * Copyright 2004-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.maven.doxia.Doxia;
+import org.apache.maven.doxia.module.xhtml.SinkDescriptorReader;
+import org.apache.maven.doxia.module.xhtml.XhtmlSink;
+import org.apache.maven.doxia.module.xhtml.decoration.model.DecorationModel;
+import org.apache.maven.doxia.module.xhtml.decoration.model.DecorationModelReader;
+import org.apache.maven.doxia.module.xhtml.decoration.render.RenderingContext;
+import org.apache.maven.doxia.sink.Sink;
+import org.apache.maven.doxia.site.module.SiteModule;
+import org.apache.maven.doxia.site.module.manager.SiteModuleManager;
import org.codehaus.plexus.util.FileUtils;
import org.codehaus.plexus.util.IOUtil;
@@ -29,9 +45,7 @@
/**
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
* @version $Id$
- *
- * @plexus.component
- * role="org.codehaus.doxia.site.renderer.SiteRenderer"
+ * @plexus.component role="org.apache.maven.doxia.site.renderer.SiteRenderer"
*/
public class DefaultSiteRenderer
implements SiteRenderer
@@ -91,8 +105,8 @@
throw new Exception( "The site descriptor is not present!" );
}
- DecorationModel decorationModel = decorationModelReader.createNavigation(
- new InputStreamReader( siteDescriptor ) );
+ DecorationModel decorationModel =
+ decorationModelReader.createNavigation( new InputStreamReader( siteDescriptor ) );
render( siteDirectory, generatedSiteDirectory, outputDirectory, flavour, decorationModel, resourcesDirectory );
}
@@ -241,8 +255,8 @@
{
DecorationModelReader decorationModelReader = new DecorationModelReader();
- DecorationModel decorationModel = decorationModelReader.createNavigation(
- new InputStreamReader( siteDescriptor ) );
+ DecorationModel decorationModel =
+ decorationModelReader.createNavigation( new InputStreamReader( siteDescriptor ) );
return createSink( moduleBasedir, doc, outputDirectory, decorationModel, flavour );
}
Modified: maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/site/renderer/SiteRenderer.java
URL: http://svn.apache.org/viewcvs/maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/site/renderer/SiteRenderer.java?rev=348605&r1=348596&r2=348605&view=diff
==============================================================================
--- maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/site/renderer/SiteRenderer.java (original)
+++ maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/site/renderer/SiteRenderer.java Wed Nov 23 17:02:44 2005
@@ -1,6 +1,22 @@
-package org.codehaus.doxia.site.renderer;
+package org.apache.maven.doxia.site.renderer;
-import org.codehaus.doxia.module.xhtml.XhtmlSink;
+/*
+ * Copyright 2004-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.maven.doxia.module.xhtml.XhtmlSink;
import java.io.File;
import java.io.InputStream;
@@ -13,8 +29,7 @@
{
String ROLE = SiteRenderer.class.getName();
- void render( String siteDirectory, String generatedSiteDirectory, String outputDirectory,
- File resourcesDirectory )
+ void render( String siteDirectory, String generatedSiteDirectory, String outputDirectory, File resourcesDirectory )
throws Exception;
void render( String siteDirectory, String generatedSiteDirectory, String outputDirectory, String flavour,
Modified: maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/util/FileUtil.java
URL: http://svn.apache.org/viewcvs/maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/util/FileUtil.java?rev=348605&r1=348596&r2=348605&view=diff
==============================================================================
--- maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/util/FileUtil.java (original)
+++ maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/util/FileUtil.java Wed Nov 23 17:02:44 2005
@@ -1,12 +1,20 @@
+package org.apache.maven.doxia.util;
+
/*
- * Copyright (c) 1998,1999,2000-2001 Pixware.
+ * Copyright 2004-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * Author: Hussein Shafie
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * This file is part of the Pixware Java utilities.
- * For conditions of distribution and use, see the accompanying legal.txt file.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-package org.codehaus.doxia.util;
import java.io.BufferedInputStream;
import java.io.ByteArrayOutputStream;
@@ -41,12 +49,16 @@
public static File urlToFile( URL url )
{
if ( !url.getProtocol().equals( "file" ) )
+ {
return null;
+ }
String fileName = url.getFile();
if ( File.separatorChar != '/' )
+ {
fileName = fileName.replace( '/', File.separatorChar );
+ }
return new File( fileName );
}
@@ -89,7 +101,7 @@
/**
* Converts a File to a <tt>file:</tt> URL.
- *
+ *
* @param file the file to be converted
* @return the result of the conversion
*/
@@ -98,13 +110,19 @@
String fileName = file.getAbsolutePath();
if ( File.separatorChar != '/' )
+ {
fileName = fileName.replace( File.separatorChar, '/' );
+ }
if ( !fileName.startsWith( "/" ) )
+ {
fileName = "/" + fileName;
+ }
if ( !fileName.endsWith( "/" ) && file.isDirectory() )
+ {
fileName = fileName + "/";
+ }
URL url;
try
@@ -121,7 +139,7 @@
/**
* Converts a file name to a <tt>file:</tt> URL.
- *
+ *
* @param fileName the file name to be converted
* @return the result of the conversion
*/
@@ -132,7 +150,7 @@
/**
* Converts a file name to a <tt>file:</tt> URL name.
- *
+ *
* @param fileName the file name to be converted
* @return the result of the conversion
*/
@@ -162,7 +180,7 @@
* <td>FileUtil.java
* <td>. (dot)
* </table>
- *
+ *
* @param fileName a file path name
* @return the directory part
*/
@@ -190,7 +208,9 @@
{
name = fileName.substring( 0, slash );
if ( separ != File.separatorChar )
+ {
name = name.replace( separ, File.separatorChar );
+ }
}
return name;
}
@@ -212,7 +232,7 @@
* <td>FileUtil.java
* <td>FileUtil.java
* </table>
- *
+ *
* @param fileName a file path name
* @return the base name part
*/
@@ -221,13 +241,19 @@
int slash = fileName.lastIndexOf( File.separatorChar );
if ( slash < 0 && File.separatorChar == '\\' )
// On Windows, '/' is an alternate fileName separator.
+ {
slash = fileName.lastIndexOf( '/' );
+ }
String name;
if ( slash < 0 )
+ {
name = fileName;
+ }
else
+ {
name = fileName.substring( slash + 1 );
+ }
return name;
}
@@ -262,18 +288,28 @@
int slash = fileName.lastIndexOf( File.separatorChar );
if ( slash < 0 && File.separatorChar == '\\' )
// On Windows, '/' is an alternate fileName separator.
+ {
slash = fileName.lastIndexOf( '/' );
+ }
if ( slash < 0 )
+ {
slash = 0;
+ }
else
+ {
++slash;
+ }
int dot = fileName.lastIndexOf( '.' );
if ( dot <= slash )
// '.profile' has no extension!
+ {
return "";
+ }
else
+ {
return fileName.substring( dot + 1 );
+ }
}
/**
@@ -295,7 +331,7 @@
* <td>/home/hussein/.profile
* <td>/home/hussein/.profile
* </table>
- *
+ *
* @param fileName a file path name
* @return the file path without extension part if any
*/
@@ -304,18 +340,28 @@
int slash = fileName.lastIndexOf( File.separatorChar );
if ( slash < 0 && File.separatorChar == '\\' )
// On Windows, '/' is an alternate fileName separator.
+ {
slash = fileName.lastIndexOf( '/' );
+ }
if ( slash < 0 )
+ {
slash = 0;
+ }
else
+ {
++slash;
+ }
int dot = fileName.lastIndexOf( '.' );
if ( dot <= slash )
// '.profile' has no extension!
+ {
return fileName;
+ }
else
+ {
return fileName.substring( 0, dot );
+ }
}
/**
@@ -379,14 +425,16 @@
public static boolean removeFile( File file, boolean force )
{
if ( file.isDirectory() && force )
+ {
emptyDirectory( file );
+ }
return file.delete();
}
/**
* Recursively deletes all the entries of a directory.
- *
+ *
* @param dirName the name of the directory to be emptied
*/
public static void emptyDirectory( String dirName )
@@ -396,7 +444,7 @@
/**
* Recursively deletes all the entries of a directory.
- *
+ *
* @param dir the directory to be emptied
*/
public static void emptyDirectory( File dir )
@@ -408,9 +456,13 @@
File child = new File( dir, children[i] );
if ( child.isDirectory() )
+ {
removeFile( child, /*force*/ true );
+ }
else
+ {
child.delete();
+ }
}
}
@@ -431,7 +483,9 @@
int count;
while ( ( count = src.read( bytes ) ) != -1 )
+ {
dst.write( bytes, 0, count );
+ }
src.close();
dst.flush();
@@ -460,7 +514,8 @@
* @return the loaded String
* @throws IOException if there is an IO problem
*/
- public static String loadString( URL url ) throws IOException
+ public static String loadString( URL url )
+ throws IOException
{
URLConnection connection = url.openConnection();
connection.setDefaultUseCaches( false );
@@ -476,7 +531,8 @@
* @return the loaded String
* @throws IOException if there is an IO problem
*/
- public static String loadString( InputStream stream ) throws IOException
+ public static String loadString( InputStream stream )
+ throws IOException
{
InputStreamReader in = new InputStreamReader( stream );
@@ -489,7 +545,9 @@
while ( ( count = in.read( chars, 0, chars.length ) ) != -1 )
{
if ( count > 0 )
+ {
buffer.append( chars, 0, count );
+ }
}
}
finally
@@ -540,7 +598,8 @@
* @return the loaded bytes
* @throws IOException if there is an IO problem
*/
- public static byte[] loadBytes( String fileName ) throws IOException
+ public static byte[] loadBytes( String fileName )
+ throws IOException
{
return loadBytes( new FileInputStream( fileName ) );
}
@@ -552,7 +611,8 @@
* @return the loaded bytes
* @throws IOException if there is an IO problem
*/
- public static byte[] loadBytes( URL url ) throws IOException
+ public static byte[] loadBytes( URL url )
+ throws IOException
{
URLConnection connection = url.openConnection();
connection.setDefaultUseCaches( false );
@@ -568,7 +628,8 @@
* @return the loaded bytes
* @throws IOException if there is an IO problem
*/
- public static byte[] loadBytes( InputStream source ) throws IOException
+ public static byte[] loadBytes( InputStream source )
+ throws IOException
{
BufferedInputStream in = new BufferedInputStream( source );
ByteArrayOutputStream out = new ByteArrayOutputStream();
@@ -576,7 +637,9 @@
int count;
while ( ( count = in.read( bytes ) ) >= 0 )
+ {
out.write( bytes, 0, count );
+ }
return out.toByteArray();
}
@@ -591,7 +654,8 @@
* <code>false</code> otherwise
* @throws IOException if there is an IO problem
*/
- public static boolean isGzipped( String fileName ) throws IOException
+ public static boolean isGzipped( String fileName )
+ throws IOException
{
InputStream in = new FileInputStream( fileName );
int magic1 = in.read();
@@ -625,7 +689,8 @@
* @throws IOException if there is an IO problem
* @see #defaultEncoding
*/
- public static String loadGzippedString( URL url ) throws IOException
+ public static String loadGzippedString( URL url )
+ throws IOException
{
return loadGzippedString( url.openStream(), null );
}
@@ -639,15 +704,15 @@
* @return the loaded String
* @throws IOException if there is an IO problem
*/
- public static String loadGzippedString( InputStream source,
- String encoding )
+ public static String loadGzippedString( InputStream source, String encoding )
throws IOException
{
if ( encoding == null )
+ {
encoding = defaultEncoding();
+ }
- Reader in = new InputStreamReader( new GZIPInputStream( source ),
- encoding );
+ Reader in = new InputStreamReader( new GZIPInputStream( source ), encoding );
char[] chars = new char[8192];
StringBuffer buffer = new StringBuffer( chars.length );
int count;
@@ -657,7 +722,9 @@
while ( ( count = in.read( chars, 0, chars.length ) ) != -1 )
{
if ( count > 0 )
+ {
buffer.append( chars, 0, count );
+ }
}
}
finally
@@ -674,13 +741,12 @@
static
{
- platformDefaultEncoding =
- ( new OutputStreamWriter( System.out ) ).getEncoding();
+ platformDefaultEncoding = ( new OutputStreamWriter( System.out ) ).getEncoding();
}
/**
* Returns the default character encoding for this platform.
- *
+ *
* @return default character encoding for this platform
*/
public static String defaultEncoding()
Modified: maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/util/LineBreaker.java
URL: http://svn.apache.org/viewcvs/maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/util/LineBreaker.java?rev=348605&r1=348596&r2=348605&view=diff
==============================================================================
--- maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/util/LineBreaker.java (original)
+++ maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/util/LineBreaker.java Wed Nov 23 17:02:44 2005
@@ -1,12 +1,20 @@
+package org.apache.maven.doxia.util;
+
/*
- * Copyright (c) 1999,2000 Pixware.
+ * Copyright 2004-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * Author: Hussein Shafie
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * This file is part of the Pixware APT tools.
- * For conditions of distribution and use, see the accompanying legal.txt file.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-package org.codehaus.doxia.util;
import org.codehaus.plexus.util.IOUtil;
@@ -19,9 +27,13 @@
public static final int DEFAULT_MAX_LINE_LENGTH = 78;
private Writer destination;
+
private BufferedWriter writer;
+
private int maxLineLength;
+
private int lineLength = 0;
+
private StringBuffer word = new StringBuffer( 1024 );
public LineBreaker( Writer out )
@@ -32,7 +44,9 @@
public LineBreaker( Writer out, int maxLineLength )
{
if ( maxLineLength <= 0 )
+ {
throw new IllegalArgumentException( "maxLineLength<=0" );
+ }
destination = out;
this.maxLineLength = maxLineLength;
@@ -44,7 +58,8 @@
return destination;
}
- public void write( String text ) throws IOException
+ public void write( String text )
+ throws IOException
{
write( text, /*preserveSpace*/ false );
}
@@ -62,9 +77,13 @@
{
case ' ':
if ( preserveSpace )
+ {
word.append( c );
+ }
else
+ {
writeWord();
+ }
break;
case '\n':
@@ -97,7 +116,8 @@
}
}
- private void writeWord() throws IOException
+ private void writeWord()
+ throws IOException
{
int length = word.length();
if ( length > 0 )
Modified: maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/util/StringUtil.java
URL: http://svn.apache.org/viewcvs/maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/util/StringUtil.java?rev=348605&r1=348596&r2=348605&view=diff
==============================================================================
--- maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/util/StringUtil.java (original)
+++ maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/util/StringUtil.java Wed Nov 23 17:02:44 2005
@@ -1,12 +1,18 @@
-/*
- * Copyright (c) 1998,1999,2000-2002 Pixware.
+package org.apache.maven.doxia.util;/*
+ * Copyright 2004-2005 The Apache Software Foundation.
*
- * Author: Hussein Shafie
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This file is part of the Pixware Java utilities.
- * For conditions of distribution and use, see the accompanying legal.txt file.
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-package org.codehaus.doxia.util;
/**
* A collection of utility functions (static methods) operating on Strings and
@@ -33,7 +39,9 @@
{
// string can be null, strings[i] cannot.
if ( strings[i].equals( string ) )
+ {
return i;
+ }
}
return -1;
}
@@ -52,7 +60,9 @@
{
// string can be null, strings[i] cannot.
if ( strings[i].equals( string ) )
+ {
return true;
+ }
}
return false;
}
@@ -66,17 +76,20 @@
* @return a list containing all the items of list <code>strings</code>
* plus String <code>string</code> inserted at position <code>index</code>
*/
- public static String[] insertAt( String[] strings, String string,
- int index )
+ public static String[] insertAt( String[] strings, String string, int index )
{
String[] newStrings = new String[strings.length + 1];
if ( index > 0 )
+ {
System.arraycopy( strings, 0, newStrings, 0, index );
+ }
int tail = strings.length - index;
if ( tail > 0 )
+ {
System.arraycopy( strings, index, newStrings, index + 1, tail );
+ }
newStrings[index] = string;
@@ -132,9 +145,13 @@
{
int index = indexOf( strings, string );
if ( index < 0 )
+ {
return strings;
+ }
else
+ {
return removeAt( strings, index );
+ }
}
/**
@@ -151,12 +168,16 @@
String[] newStrings = new String[strings.length - 1];
if ( index > 0 )
+ {
System.arraycopy( strings, 0, newStrings, 0, index );
+ }
int first = index + 1;
int tail = strings.length - first;
if ( tail > 0 )
+ {
System.arraycopy( strings, first, newStrings, index, tail );
+ }
return newStrings;
}
@@ -268,11 +289,14 @@
{
int length = string.length();
- if ( length >= 2 &&
- string.charAt( 0 ) == '\"' && string.charAt( length - 1 ) == '\"' )
+ if ( length >= 2 && string.charAt( 0 ) == '\"' && string.charAt( length - 1 ) == '\"' )
+ {
return unescape( string, 1, length - 2 );
+ }
else
+ {
return unescape( string, 0, length );
+ }
}
/**
@@ -346,9 +370,7 @@
{
try
{
- int escaped =
- Integer.parseInt( string.substring( i + 2, i + 6 ),
- 16 );
+ int escaped = Integer.parseInt( string.substring( i + 2, i + 6 ), 16 );
buffer.append( (char) escaped );
i += 5;
}
@@ -405,12 +427,17 @@
int length = string.length();
if ( length == 0 )
+ {
return string;
+ }
else if ( length == 1 )
+ {
return string.toUpperCase();
+ }
else
- return ( Character.toUpperCase( string.charAt( 0 ) ) +
- string.substring( 1 ) );
+ {
+ return ( Character.toUpperCase( string.charAt( 0 ) ) + string.substring( 1 ) );
+ }
}
/**
@@ -426,12 +453,17 @@
int length = string.length();
if ( length == 0 )
+ {
return string;
+ }
else if ( length == 1 )
+ {
return string.toLowerCase();
+ }
else
- return ( Character.toLowerCase( string.charAt( 0 ) ) +
- string.substring( 1 ) );
+ {
+ return ( Character.toLowerCase( string.charAt( 0 ) ) + string.substring( 1 ) );
+ }
}
// -----------------------------------------------------------------------
@@ -471,8 +503,7 @@
int nextSep;
while ( ( nextSep = string.indexOf( separatorChar, sep ) ) >= 0 )
{
- elements[elementCount++] =
- ( sep == nextSep ) ? "" : string.substring( sep, nextSep );
+ elements[elementCount++] = ( sep == nextSep ) ? "" : string.substring( sep, nextSep );
sep = nextSep + 1;
}
elements[elementCount++] = string.substring( sep );
@@ -537,15 +568,14 @@
/**
* Replaces substring <code>oldSub</code> by substring <code>newSub</code>
* inside String <code>string</code>.
- *
+ *
* @param string the String where replacements are to be performed
* @param oldSub the substring to replace
* @param newSub the replacement substring
* @return a string where all replacements have been performed
- * @see java.lang.String#replace
+ * @see String#replace
*/
- public static String replaceAll( String string,
- String oldSub, String newSub )
+ public static String replaceAll( String string, String oldSub, String newSub )
{
StringBuffer replaced = new StringBuffer();
int oldSubLength = oldSub.length();
@@ -555,12 +585,16 @@
while ( ( end = string.indexOf( oldSub, begin ) ) >= 0 )
{
if ( end > begin )
+ {
replaced.append( string.substring( begin, end ) );
+ }
replaced.append( newSub );
begin = end + oldSubLength;
}
if ( begin < string.length() )
+ {
replaced.append( string.substring( begin ) );
+ }
return replaced.toString();
}
Modified: maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/util/WrappedException.java
URL: http://svn.apache.org/viewcvs/maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/util/WrappedException.java?rev=348605&r1=348596&r2=348605&view=diff
==============================================================================
--- maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/util/WrappedException.java (original)
+++ maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/util/WrappedException.java Wed Nov 23 17:02:44 2005
@@ -1,19 +1,26 @@
-/*
- * Copyright (c) 1999,2000-2001 Pixware.
+package org.apache.maven.doxia.util;/*
+ * Copyright 2004-2005 The Apache Software Foundation.
*
- * Author: Hussein Shafie
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This file is part of the Pixware Java utilities.
- * For conditions of distribution and use, see the accompanying legal.txt file.
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-package org.codehaus.doxia.util;
/**
* Base class for exceptions which are wrappers around other exceptions. This
* type of exception keep a record of the <em>original</em> exception, that
* is, the one which was used to actually report a problem.
*/
-public abstract class WrappedException extends Exception
+public abstract class WrappedException
+ extends Exception
{
private Exception rootException;
@@ -29,7 +36,7 @@
/**
* Constructs an exception with a detail message but no original
* exception.
- *
+ *
* @param message the detail message
*/
public WrappedException( String message )
@@ -40,7 +47,7 @@
/**
* Constucts an exception with an original exception but no detail
* message.
- *
+ *
* @param e the original exception
*/
public WrappedException( Exception e )
@@ -65,7 +72,7 @@
/**
* Returns the original exception.
- *
+ *
* @return the original exception if any or <code>null</code> otherwise
*/
public Exception getRootException()
@@ -87,9 +94,13 @@
{
rootEx = e;
if ( e instanceof WrappedException )
+ {
e = ( (WrappedException) e ).getRootException();
+ }
else
+ {
break;
+ }
}
return rootEx;
Modified: maven/doxia/trunk/doxia-core/src/site/site.xml
URL: http://svn.apache.org/viewcvs/maven/doxia/trunk/doxia-core/src/site/site.xml?rev=348605&r1=348604&r2=348605&view=diff
==============================================================================
--- maven/doxia/trunk/doxia-core/src/site/site.xml (original)
+++ maven/doxia/trunk/doxia-core/src/site/site.xml Wed Nov 23 17:02:44 2005
@@ -2,21 +2,23 @@
<project name="Doxia">
<bannerLeft>
<name>Doxia</name>
- <href>http://doxia.codehaus.org</href>
+ <src>http://maven.apache.org/images/apache-maven-project-2.png</src>
+ <href>http://maven.apache.org/doxia/</href>
</bannerLeft>
<bannerRight>
- <name>Codehaus</name>
- <src>http://codehaus.org/codehaus-small.png</src>
- <href>http://www.codehaus.org</href>
+ <src>http://maven.apache.org/images/maven-logo-2.gif</src>
</bannerRight>
<body>
<links>
- <item name="Plexus" href="http://plexus.codehaus.org"/>
- <item name="The Codehaus" href="http://www.codehaus.org"/>
+ <item name="Apache" href="http://www.apache.org/"/>
+ <item name="Maven 1.x" href="http://maven.apache.org/maven-1.x"/>
+ <item name="Maven 2.x" href="http://maven.apache.org/"/>
+ <item name="Continuum" href="http://maven.apache.org/continuum"/>
+ <item name="SCM" href="http://maven.apache.org/scm"/>
+ <item name="Wagon" href="http://maven.apache.org/wagon"/>
+ <item name="JXR" href="http://maven.apache.org/jxr"/>
+ <item name="Doxia" href="http://maven.apache.org/doxia"/>
</links>
- <menu name="Quick Links">
- <item name="APT Reference" href="format.html"/>
- </menu>
${reports}
</body>
</project>
Modified: maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/AbstractSinkTestCase.java
URL: http://svn.apache.org/viewcvs/maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/AbstractSinkTestCase.java?rev=348605&r1=348596&r2=348605&view=diff
==============================================================================
--- maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/AbstractSinkTestCase.java (original)
+++ maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/AbstractSinkTestCase.java Wed Nov 23 17:02:44 2005
@@ -1,7 +1,23 @@
-package org.codehaus.doxia;
+package org.apache.maven.doxia;
-import org.codehaus.doxia.module.apt.AptParser;
-import org.codehaus.doxia.sink.Sink;
+/*
+ * Copyright 2004-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.maven.doxia.module.apt.AptParser;
+import org.apache.maven.doxia.sink.Sink;
import org.codehaus.plexus.PlexusTestCase;
import java.io.File;
Modified: maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/DocBookSinkTest.java
URL: http://svn.apache.org/viewcvs/maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/DocBookSinkTest.java?rev=348605&r1=348596&r2=348605&view=diff
==============================================================================
--- maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/DocBookSinkTest.java (original)
+++ maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/DocBookSinkTest.java Wed Nov 23 17:02:44 2005
@@ -1,10 +1,23 @@
+package org.apache.maven.doxia;
+
/*
- * CopyrightPlugin (c) 2004 Your Corporation. All Rights Reserved.
+ * Copyright 2004-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-package org.codehaus.doxia;
-import org.codehaus.doxia.module.docbook.DocBookSink;
-import org.codehaus.doxia.sink.Sink;
+import org.apache.maven.doxia.module.docbook.DocBookSink;
+import org.apache.maven.doxia.sink.Sink;
/**
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
@@ -18,7 +31,8 @@
return "docbook";
}
- protected Sink createSink() throws Exception
+ protected Sink createSink()
+ throws Exception
{
return new DocBookSink( getTestWriter() );
}
Modified: maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/DoxiaTest.java
URL: http://svn.apache.org/viewcvs/maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/DoxiaTest.java?rev=348605&r1=348596&r2=348605&view=diff
==============================================================================
--- maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/DoxiaTest.java (original)
+++ maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/DoxiaTest.java Wed Nov 23 17:02:44 2005
@@ -1,4 +1,20 @@
-package org.codehaus.doxia;
+package org.apache.maven.doxia;
+
+/*
+ * Copyright 2004-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
import org.codehaus.plexus.PlexusTestCase;
Modified: maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/FmlParserTest.java
URL: http://svn.apache.org/viewcvs/maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/FmlParserTest.java?rev=348605&r1=348596&r2=348605&view=diff
==============================================================================
--- maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/FmlParserTest.java (original)
+++ maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/FmlParserTest.java Wed Nov 23 17:02:44 2005
@@ -1,8 +1,25 @@
-package org.codehaus.doxia;
+package org.apache.maven.doxia;
+
+/*
+ * Copyright 2004-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.maven.doxia.module.fml.FmlParser;
+import org.apache.maven.doxia.parser.AbstractParserTestCase;
+import org.apache.maven.doxia.parser.Parser;
-import org.codehaus.doxia.module.fml.FmlParser;
-import org.codehaus.doxia.parser.Parser;
-import org.codehaus.doxia.parser.AbstractParserTestCase;
/**
* @author <a href="mailto:evenisse@codehaus.org">Jason van Zyl</a>
* @version $Id$
Modified: maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/LatexSinkTest.java
URL: http://svn.apache.org/viewcvs/maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/LatexSinkTest.java?rev=348605&r1=348596&r2=348605&view=diff
==============================================================================
--- maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/LatexSinkTest.java (original)
+++ maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/LatexSinkTest.java Wed Nov 23 17:02:44 2005
@@ -1,10 +1,23 @@
+package org.apache.maven.doxia;
+
/*
- * CopyrightPlugin (c) 2004 Your Corporation. All Rights Reserved.
+ * Copyright 2004-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-package org.codehaus.doxia;
-import org.codehaus.doxia.module.latex.LatexSink;
-import org.codehaus.doxia.sink.Sink;
+import org.apache.maven.doxia.module.latex.LatexSink;
+import org.apache.maven.doxia.sink.Sink;
/**
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
@@ -18,7 +31,8 @@
return "tex";
}
- protected Sink createSink() throws Exception
+ protected Sink createSink()
+ throws Exception
{
return new LatexSink( getTestWriter() );
}
Modified: maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/RtfSinkTest.java
URL: http://svn.apache.org/viewcvs/maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/RtfSinkTest.java?rev=348605&r1=348596&r2=348605&view=diff
==============================================================================
--- maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/RtfSinkTest.java (original)
+++ maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/RtfSinkTest.java Wed Nov 23 17:02:44 2005
@@ -1,7 +1,23 @@
-package org.codehaus.doxia;
+package org.apache.maven.doxia;
-import org.codehaus.doxia.module.rtf.RtfSink;
-import org.codehaus.doxia.sink.Sink;
+/*
+ * Copyright 2004-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.maven.doxia.module.rtf.RtfSink;
+import org.apache.maven.doxia.sink.Sink;
import java.io.File;
import java.io.FileOutputStream;
@@ -18,7 +34,8 @@
return "tex";
}
- protected Sink createSink() throws Exception
+ protected Sink createSink()
+ throws Exception
{
return new RtfSink( new FileOutputStream( new File( getBasedirFile(), "target/output/test.rtf" ) ) );
}
Modified: maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/SinkDescriptorReaderTest.java
URL: http://svn.apache.org/viewcvs/maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/SinkDescriptorReaderTest.java?rev=348605&r1=348596&r2=348605&view=diff
==============================================================================
--- maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/SinkDescriptorReaderTest.java (original)
+++ maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/SinkDescriptorReaderTest.java Wed Nov 23 17:02:44 2005
@@ -1,13 +1,27 @@
-package org.codehaus.doxia;
+package org.apache.maven.doxia;
-import org.codehaus.doxia.module.xhtml.SinkDescriptorReader;
+/*
+ * Copyright 2004-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import junit.framework.TestCase;
+import org.apache.maven.doxia.module.xhtml.SinkDescriptorReader;
import java.io.File;
import java.io.FileReader;
import java.util.Map;
-import java.util.Iterator;
-
-import junit.framework.TestCase;
/**
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
Modified: maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/SiteRenderingTest.java
URL: http://svn.apache.org/viewcvs/maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/SiteRenderingTest.java?rev=348605&r1=348596&r2=348605&view=diff
==============================================================================
--- maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/SiteRenderingTest.java (original)
+++ maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/SiteRenderingTest.java Wed Nov 23 17:02:44 2005
@@ -1,6 +1,22 @@
-package org.codehaus.doxia;
+package org.apache.maven.doxia;
-import org.codehaus.doxia.site.renderer.SiteRenderer;
+/*
+ * Copyright 2004-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.maven.doxia.site.renderer.SiteRenderer;
import org.codehaus.plexus.PlexusTestCase;
import java.io.File;
@@ -30,9 +46,7 @@
File resourcesDirectory = new File( siteDirectory, "resources" );
- r.render( siteDirectory.getPath(),
- generatedSiteDirectory.getPath(),
- outputDirectory.getPath(),
+ r.render( siteDirectory.getPath(), generatedSiteDirectory.getPath(), outputDirectory.getPath(),
resourcesDirectory );
}
}
Modified: maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/WellformednessCheckingSink.java
URL: http://svn.apache.org/viewcvs/maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/WellformednessCheckingSink.java?rev=348605&r1=348596&r2=348605&view=diff
==============================================================================
--- maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/WellformednessCheckingSink.java (original)
+++ maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/WellformednessCheckingSink.java Wed Nov 23 17:02:44 2005
@@ -1,10 +1,26 @@
-package org.codehaus.doxia;
+package org.apache.maven.doxia;
-import java.util.Stack;
-import java.util.List;
-import java.util.LinkedList;
+/*
+ * Copyright 2004-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.maven.doxia.sink.Sink;
-import org.codehaus.doxia.sink.Sink;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Stack;
/**
* This sink is used for testing purposes in order to check wether
@@ -22,371 +38,371 @@
public void head()
{
- startElement("head");
+ startElement( "head" );
}
public void head_()
{
- checkWellformedness("head");
+ checkWellformedness( "head" );
}
public void body()
{
- startElement("body");
+ startElement( "body" );
}
public void body_()
{
- checkWellformedness("body");
+ checkWellformedness( "body" );
}
public void section1()
{
- startElement("section1");
+ startElement( "section1" );
}
public void section1_()
{
- checkWellformedness("section1");
+ checkWellformedness( "section1" );
}
public void section2()
{
- startElement("section2");
+ startElement( "section2" );
}
public void section2_()
{
- checkWellformedness("section2");
+ checkWellformedness( "section2" );
}
public void section3()
{
- startElement("section3");
+ startElement( "section3" );
}
public void section3_()
{
- checkWellformedness("section3");
+ checkWellformedness( "section3" );
}
public void section4()
{
- startElement("section4");
+ startElement( "section4" );
}
public void section4_()
{
- checkWellformedness("section4");
+ checkWellformedness( "section4" );
}
public void section5()
{
- startElement("section5");
+ startElement( "section5" );
}
public void section5_()
{
- checkWellformedness("section5");
+ checkWellformedness( "section5" );
}
public void list()
{
- startElement("list");
+ startElement( "list" );
}
public void list_()
{
- checkWellformedness("list");
+ checkWellformedness( "list" );
}
public void listItem()
{
- startElement("listItem");
+ startElement( "listItem" );
}
public void listItem_()
{
- checkWellformedness("listItem");
+ checkWellformedness( "listItem" );
}
public void numberedList( int numbering )
{
- startElement("numberedList");
+ startElement( "numberedList" );
}
public void numberedList_()
{
- checkWellformedness("numberedList");
+ checkWellformedness( "numberedList" );
}
public void numberedListItem()
{
- startElement("numberedListItem");
+ startElement( "numberedListItem" );
}
public void numberedListItem_()
{
- checkWellformedness("numberedListItem");
+ checkWellformedness( "numberedListItem" );
}
public void definitionList()
{
- startElement("definitionList");
+ startElement( "definitionList" );
}
public void definitionList_()
{
- checkWellformedness("definitionList");
+ checkWellformedness( "definitionList" );
}
public void definitionListItem()
{
- startElement("definitionListItem");
+ startElement( "definitionListItem" );
}
public void definitionListItem_()
{
- checkWellformedness("definitionListItem");
+ checkWellformedness( "definitionListItem" );
}
public void definition()
{
- startElement("definition");
+ startElement( "definition" );
}
public void definition_()
{
- checkWellformedness("definition");
+ checkWellformedness( "definition" );
}
public void figure()
{
- startElement("figure");
+ startElement( "figure" );
}
public void figure_()
{
- checkWellformedness("figure");
+ checkWellformedness( "figure" );
}
public void table()
{
- startElement("table");
+ startElement( "table" );
}
public void table_()
{
- checkWellformedness("table");
+ checkWellformedness( "table" );
}
public void tableRows( int[] justification, boolean grid )
{
- startElement("tableRows");
+ startElement( "tableRows" );
}
public void tableRows_()
{
- checkWellformedness("tableRows");
+ checkWellformedness( "tableRows" );
}
public void tableRow()
{
- startElement("tableRow");
+ startElement( "tableRow" );
}
public void tableRow_()
{
- checkWellformedness("tableRow");
+ checkWellformedness( "tableRow" );
}
public void title()
{
- startElement("title");
+ startElement( "title" );
}
public void title_()
{
- checkWellformedness("title");
+ checkWellformedness( "title" );
}
public void author()
{
- startElement("author");
+ startElement( "author" );
}
public void author_()
{
- checkWellformedness("author");
+ checkWellformedness( "author" );
}
public void date()
{
- startElement("date");
+ startElement( "date" );
}
public void date_()
{
- checkWellformedness("date");
+ checkWellformedness( "date" );
}
public void sectionTitle()
{
- startElement("sectionTitle");
+ startElement( "sectionTitle" );
}
public void sectionTitle_()
{
- checkWellformedness("sectionTitle");
+ checkWellformedness( "sectionTitle" );
}
public void sectionTitle1()
{
- startElement("sectionTitle1");
+ startElement( "sectionTitle1" );
}
public void sectionTitle1_()
{
- checkWellformedness("sectionTitle1");
+ checkWellformedness( "sectionTitle1" );
}
public void sectionTitle2()
{
- startElement("sectionTitle2");
+ startElement( "sectionTitle2" );
}
public void sectionTitle2_()
{
- checkWellformedness("sectionTitle2");
+ checkWellformedness( "sectionTitle2" );
}
public void sectionTitle3()
{
- startElement("sectionTitle3");
+ startElement( "sectionTitle3" );
}
public void sectionTitle3_()
{
- checkWellformedness("sectionTitle3");
+ checkWellformedness( "sectionTitle3" );
}
public void sectionTitle4()
{
- startElement("sectionTitle4");
+ startElement( "sectionTitle4" );
}
public void sectionTitle4_()
{
- checkWellformedness("sectionTitle4");
+ checkWellformedness( "sectionTitle4" );
}
public void sectionTitle5()
{
- startElement("sectionTitle5");
+ startElement( "sectionTitle5" );
}
public void sectionTitle5_()
{
- checkWellformedness("sectionTitle5");
+ checkWellformedness( "sectionTitle5" );
}
public void paragraph()
{
- startElement("paragraph");
+ startElement( "paragraph" );
}
public void paragraph_()
{
- checkWellformedness("paragraph");
+ checkWellformedness( "paragraph" );
}
public void verbatim( boolean boxed )
{
- startElement("verbatim");
+ startElement( "verbatim" );
}
public void verbatim_()
{
- checkWellformedness("verbatim");
+ checkWellformedness( "verbatim" );
}
public void definedTerm()
{
- startElement("definedTerm");
+ startElement( "definedTerm" );
}
public void definedTerm_()
{
- checkWellformedness("definedTerm");
+ checkWellformedness( "definedTerm" );
}
public void figureCaption()
{
- startElement("figureCaption");
+ startElement( "figureCaption" );
}
public void figureCaption_()
{
- checkWellformedness("figureCaption");
+ checkWellformedness( "figureCaption" );
}
public void tableCell()
{
- startElement("tableCell");
+ startElement( "tableCell" );
}
public void tableCell( String width )
{
- startElement("tableCell");
+ startElement( "tableCell" );
}
public void tableCell_()
{
- checkWellformedness("tableCell");
+ checkWellformedness( "tableCell" );
}
public void tableHeaderCell()
{
- startElement("tableHeaderCell");
+ startElement( "tableHeaderCell" );
}
public void tableHeaderCell( String width )
{
- startElement("tableHeaderCell");
+ startElement( "tableHeaderCell" );
}
public void tableHeaderCell_()
{
- checkWellformedness("tableHeaderCell");
+ checkWellformedness( "tableHeaderCell" );
}
public void tableCaption()
{
- startElement("tableCaption");
+ startElement( "tableCaption" );
}
public void tableCaption_()
{
- checkWellformedness("tableCaption");
+ checkWellformedness( "tableCaption" );
}
public void figureGraphics( String name )
@@ -403,52 +419,52 @@
public void anchor( String name )
{
- startElement("anchor");
+ startElement( "anchor" );
}
public void anchor_()
{
- checkWellformedness("anchor");
+ checkWellformedness( "anchor" );
}
public void link( String name )
{
- startElement("link");
+ startElement( "link" );
}
public void link_()
{
- checkWellformedness("link");
+ checkWellformedness( "link" );
}
public void italic()
{
- startElement("italic");
+ startElement( "italic" );
}
public void italic_()
{
- checkWellformedness("italic");
+ checkWellformedness( "italic" );
}
public void bold()
{
- startElement("bold");
+ startElement( "bold" );
}
public void bold_()
{
- checkWellformedness("bold");
+ checkWellformedness( "bold" );
}
public void monospaced()
{
- startElement("monospaced");
+ startElement( "monospaced" );
}
public void monospaced_()
{
- checkWellformedness("monospaced");
+ checkWellformedness( "monospaced" );
}
public void lineBreak()
@@ -478,6 +494,7 @@
/**
* Finds out wether the wellformedness-contraints of the model have been
* violated.
+ *
* @return false for non-wellformed models
*/
public boolean isWellformed()
@@ -488,6 +505,7 @@
/**
* Gets the offending element that breaks the wellformedness as well
* as the exepected element.
+ *
* @return the expected and acual elements
*/
public String getOffender()
@@ -502,6 +520,7 @@
/**
* Gets the list of errors found during wellformedness-check
+ *
* @return a list of String of error messages
*/
public List getOffenders()
@@ -512,6 +531,7 @@
/**
* Checks wether a newly encountered end-tag breaks the wellformedness
* of the model.
+ *
* @param actual the local-name of the encountered element
*/
private void checkWellformedness( String actual )
@@ -527,10 +547,11 @@
/**
* Starts a new element and puts it on the stack in order to calculate
* wellformedness of the model at a later point of time.
+ *
* @param string the local-name of the start-tag
*/
private void startElement( String string )
{
- elements.push(string);
+ elements.push( string );
}
}
Modified: maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/XdocParserTest.java
URL: http://svn.apache.org/viewcvs/maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/XdocParserTest.java?rev=348605&r1=348596&r2=348605&view=diff
==============================================================================
--- maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/XdocParserTest.java (original)
+++ maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/XdocParserTest.java Wed Nov 23 17:02:44 2005
@@ -1,8 +1,24 @@
-package org.codehaus.doxia;
+package org.apache.maven.doxia;
-import org.codehaus.doxia.module.xdoc.XdocParser;
-import org.codehaus.doxia.parser.Parser;
-import org.codehaus.doxia.parser.AbstractParserTestCase;
+/*
+ * Copyright 2004-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.maven.doxia.module.xdoc.XdocParser;
+import org.apache.maven.doxia.parser.AbstractParserTestCase;
+import org.apache.maven.doxia.parser.Parser;
/**
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
Modified: maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/XdocSinkTest.java
URL: http://svn.apache.org/viewcvs/maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/XdocSinkTest.java?rev=348605&r1=348596&r2=348605&view=diff
==============================================================================
--- maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/XdocSinkTest.java (original)
+++ maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/XdocSinkTest.java Wed Nov 23 17:02:44 2005
@@ -1,10 +1,23 @@
+package org.apache.maven.doxia;
+
/*
- * CopyrightPlugin (c) 2004 Your Corporation. All Rights Reserved.
+ * Copyright 2004-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-package org.codehaus.doxia;
-import org.codehaus.doxia.module.xdoc.XdocSink;
-import org.codehaus.doxia.sink.Sink;
+import org.apache.maven.doxia.module.xdoc.XdocSink;
+import org.apache.maven.doxia.sink.Sink;
/**
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
@@ -18,7 +31,8 @@
return "xml";
}
- protected Sink createSink() throws Exception
+ protected Sink createSink()
+ throws Exception
{
return new XdocSink( getTestWriter() );
}
Modified: maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/XhtmlSinkTest.java
URL: http://svn.apache.org/viewcvs/maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/XhtmlSinkTest.java?rev=348605&r1=348596&r2=348605&view=diff
==============================================================================
--- maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/XhtmlSinkTest.java (original)
+++ maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/XhtmlSinkTest.java Wed Nov 23 17:02:44 2005
@@ -1,11 +1,27 @@
-package org.codehaus.doxia;
+package org.apache.maven.doxia;
-import org.codehaus.doxia.module.xhtml.decoration.model.DecorationModelReader;
-import org.codehaus.doxia.module.xhtml.decoration.model.DecorationModel;
-import org.codehaus.doxia.module.xhtml.decoration.render.RenderingContext;
-import org.codehaus.doxia.module.xhtml.SinkDescriptorReader;
-import org.codehaus.doxia.module.xhtml.XhtmlSink;
-import org.codehaus.doxia.sink.Sink;
+/*
+ * Copyright 2004-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.maven.doxia.module.xhtml.SinkDescriptorReader;
+import org.apache.maven.doxia.module.xhtml.XhtmlSink;
+import org.apache.maven.doxia.module.xhtml.decoration.model.DecorationModel;
+import org.apache.maven.doxia.module.xhtml.decoration.model.DecorationModelReader;
+import org.apache.maven.doxia.module.xhtml.decoration.render.RenderingContext;
+import org.apache.maven.doxia.sink.Sink;
import java.io.File;
import java.io.FileReader;
@@ -25,7 +41,8 @@
// START SNIPPET: foo
- protected Sink createSink() throws Exception
+ protected Sink createSink()
+ throws Exception
{
String xdoc = "test.apt";
@@ -33,9 +50,8 @@
DecorationModel navigation = b.createNavigation( "site.xml" );
- RenderingContext renderingContext = new RenderingContext( getBasedirFile(),
- new File( getBasedirFile(), xdoc ).getPath(),
- navigation );
+ RenderingContext renderingContext =
+ new RenderingContext( getBasedirFile(), new File( getBasedirFile(), xdoc ).getPath(), navigation );
FileReader reader = new FileReader( new File( getBasedirFile(), "src/main/resources/codehaus.dst" ) );
Modified: maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/module/docbook/DocBookParserTest.java
URL: http://svn.apache.org/viewcvs/maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/module/docbook/DocBookParserTest.java?rev=348605&r1=348596&r2=348605&view=diff
==============================================================================
--- maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/module/docbook/DocBookParserTest.java (original)
+++ maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/module/docbook/DocBookParserTest.java Wed Nov 23 17:02:44 2005
@@ -1,7 +1,23 @@
-package org.codehaus.doxia.module.docbook;
+package org.apache.maven.doxia.module.docbook;
-import org.codehaus.doxia.parser.AbstractParserTestCase;
-import org.codehaus.doxia.parser.Parser;
+/*
+ * Copyright 2004-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.maven.doxia.parser.AbstractParserTestCase;
+import org.apache.maven.doxia.parser.Parser;
/**
* @author <a href="mailto:lars@trieloff.net">Lars Trieloff</a>
Modified: maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/module/xhtml/XhtmlParserTest.java
URL: http://svn.apache.org/viewcvs/maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/module/xhtml/XhtmlParserTest.java?rev=348605&r1=348596&r2=348605&view=diff
==============================================================================
--- maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/module/xhtml/XhtmlParserTest.java (original)
+++ maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/module/xhtml/XhtmlParserTest.java Wed Nov 23 17:02:44 2005
@@ -1,12 +1,28 @@
-package org.codehaus.doxia.module.xhtml;
+package org.apache.maven.doxia.module.xhtml;
+
+/*
+ * Copyright 2004-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.maven.doxia.WellformednessCheckingSink;
+import org.apache.maven.doxia.parser.AbstractParserTestCase;
+import org.apache.maven.doxia.parser.Parser;
import java.io.FileReader;
import java.io.Reader;
-import org.codehaus.doxia.WellformednessCheckingSink;
-import org.codehaus.doxia.parser.AbstractParserTestCase;
-import org.codehaus.doxia.parser.Parser;
-
/**
* @author <a href="mailto:lars@trieloff.net">Lars Trieloff</a>
* @version $Id: SinkDescriptorReaderTest.java 131 2005-10-25 05:16:26Z trygvis $
@@ -23,17 +39,17 @@
{
return "src/test/site/xhtml/fun.html";
}
-
+
public void testParser()
throws Exception
{
//use the new wellformedness checking sink.
WellformednessCheckingSink sink = new WellformednessCheckingSink();
-
+
Reader reader = new FileReader( getTestFile( getBasedir(), getDocument() ) );
-
+
getParser().parse( reader, sink );
-
- assertTrue("Input not wellformed, offending element: " + sink.getOffender() , sink.isWellformed());
+
+ assertTrue( "Input not wellformed, offending element: " + sink.getOffender(), sink.isWellformed() );
}
}
Modified: maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/parser/AbstractParserTestCase.java
URL: http://svn.apache.org/viewcvs/maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/parser/AbstractParserTestCase.java?rev=348605&r1=348596&r2=348605&view=diff
==============================================================================
--- maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/parser/AbstractParserTestCase.java (original)
+++ maven/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/parser/AbstractParserTestCase.java Wed Nov 23 17:02:44 2005
@@ -1,7 +1,23 @@
-package org.codehaus.doxia.parser;
+package org.apache.maven.doxia.parser;
-import org.codehaus.doxia.sink.Sink;
-import org.codehaus.doxia.sink.SinkAdapter;
+/*
+ * Copyright 2004-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.maven.doxia.sink.Sink;
+import org.apache.maven.doxia.sink.SinkAdapter;
import org.codehaus.plexus.PlexusTestCase;
import java.io.FileReader;
Modified: maven/doxia/trunk/doxia-sink-api/pom.xml
URL: http://svn.apache.org/viewcvs/maven/doxia/trunk/doxia-sink-api/pom.xml?rev=348605&r1=348604&r2=348605&view=diff
==============================================================================
--- maven/doxia/trunk/doxia-sink-api/pom.xml (original)
+++ maven/doxia/trunk/doxia-sink-api/pom.xml Wed Nov 23 17:02:44 2005
@@ -1,7 +1,7 @@
<project>
<parent>
<artifactId>doxia</artifactId>
- <groupId>org.codehaus.doxia</groupId>
+ <groupId>org.apache.maven.doxia</groupId>
<version>1.0-alpha-6-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: maven/doxia/trunk/doxia-sink-api/src/main/java/org/apache/maven/doxia/sink/Sink.java
URL: http://svn.apache.org/viewcvs/maven/doxia/trunk/doxia-sink-api/src/main/java/org/apache/maven/doxia/sink/Sink.java?rev=348605&r1=348596&r2=348605&view=diff
==============================================================================
--- maven/doxia/trunk/doxia-sink-api/src/main/java/org/apache/maven/doxia/sink/Sink.java (original)
+++ maven/doxia/trunk/doxia-sink-api/src/main/java/org/apache/maven/doxia/sink/Sink.java Wed Nov 23 17:02:44 2005
@@ -1,21 +1,31 @@
-/*
- * Copyright (c) 1999,2000-01 Pixware.
+package org.apache.maven.doxia.sink;/*
+ * Copyright 2004-2005 The Apache Software Foundation.
*
- * Author: Hussein Shafie
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This file is part of the Pixware APT tools.
- * For conditions of distribution and use, see the accompanying legal.txt file.
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-package org.codehaus.doxia.sink;
public interface Sink
{
String ROLE = Sink.class.getName();
static final int NUMBERING_DECIMAL = 0;
+
static final int NUMBERING_LOWER_ALPHA = 1;
+
static final int NUMBERING_UPPER_ALPHA = 2;
+
static final int NUMBERING_LOWER_ROMAN = 3;
+
static final int NUMBERING_UPPER_ROMAN = 4;
void head();
@@ -143,14 +153,14 @@
void figureCaption_();
void tableCell();
-
- void tableCell(String width);
+
+ void tableCell( String width );
void tableCell_();
void tableHeaderCell();
-
- void tableHeaderCell(String width);
+
+ void tableHeaderCell( String width );
void tableHeaderCell_();
Modified: maven/doxia/trunk/doxia-site-renderer/pom.xml
URL: http://svn.apache.org/viewcvs/maven/doxia/trunk/doxia-site-renderer/pom.xml?rev=348605&r1=348604&r2=348605&view=diff
==============================================================================
--- maven/doxia/trunk/doxia-site-renderer/pom.xml (original)
+++ maven/doxia/trunk/doxia-site-renderer/pom.xml Wed Nov 23 17:02:44 2005
@@ -1,7 +1,7 @@
<project>
<parent>
<artifactId>doxia</artifactId>
- <groupId>org.codehaus.doxia</groupId>
+ <groupId>org.apache.maven.doxia</groupId>
<version>1.0-alpha-6-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -19,7 +19,7 @@
<version>1.1.2</version>
</dependency>
<dependency>
- <groupId>org.codehaus.doxia</groupId>
+ <groupId>org.apache.maven.doxia</groupId>
<artifactId>doxia-core</artifactId>
<version>1.0-alpha-6-SNAPSHOT</version>
</dependency>
Modified: maven/doxia/trunk/doxia-site-renderer/src/main/java/org/codehaus/plexus/siterenderer/DefaultSiteRenderer.java
URL: http://svn.apache.org/viewcvs/maven/doxia/trunk/doxia-site-renderer/src/main/java/org/codehaus/plexus/siterenderer/DefaultSiteRenderer.java?rev=348605&r1=348604&r2=348605&view=diff
==============================================================================
--- maven/doxia/trunk/doxia-site-renderer/src/main/java/org/codehaus/plexus/siterenderer/DefaultSiteRenderer.java (original)
+++ maven/doxia/trunk/doxia-site-renderer/src/main/java/org/codehaus/plexus/siterenderer/DefaultSiteRenderer.java Wed Nov 23 17:02:44 2005
@@ -16,13 +16,13 @@
* limitations under the License.
*/
+import org.apache.maven.doxia.Doxia;
+import org.apache.maven.doxia.module.xhtml.decoration.render.RenderingContext;
+import org.apache.maven.doxia.site.module.SiteModule;
+import org.apache.maven.doxia.site.module.manager.SiteModuleManager;
import org.apache.velocity.Template;
import org.apache.velocity.VelocityContext;
import org.apache.velocity.context.Context;
-import org.codehaus.doxia.Doxia;
-import org.codehaus.doxia.module.xhtml.decoration.render.RenderingContext;
-import org.codehaus.doxia.site.module.SiteModule;
-import org.codehaus.doxia.site.module.manager.SiteModuleManager;
import org.codehaus.plexus.i18n.I18N;
import org.codehaus.plexus.logging.AbstractLogEnabled;
import org.codehaus.plexus.siterenderer.sink.SiteRendererSink;