jmartin 01/02/04 16:25:05
Modified: src/java/org/apache/alexandria AlexandriaTask.java
src/java/org/apache/alexandria/jxr CodeTransform.java
DirectoryIndexer.java
src/java/org/apache/alexandria/util MetaData.java
Log:
Changed package imports and class names use use new workspace packages
rather then the old cvs packages
Revision Changes Path
1.2 +30 -63
jakarta-alexandria/src/java/org/apache/alexandria/AlexandriaTask.java
Index: AlexandriaTask.java
===================================================================
RCS file:
/home/cvs/jakarta-alexandria/src/java/org/apache/alexandria/AlexandriaTask.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- AlexandriaTask.java 2000/12/18 16:01:38 1.1
+++ AlexandriaTask.java 2001/02/05 00:25:05 1.2
@@ -55,7 +55,7 @@
import org.apache.alexandria.jxr.*;
import org.apache.alexandria.jxr.pacman.*;
import org.apache.alexandria.util.*;
-import org.apache.alexandria.xml.api.cvs.*;
+import org.apache.alexandria.xml.api.workspace.*;
import org.apache.tools.ant.*;
@@ -85,7 +85,7 @@
@author <a href="mailto:[EMAIL PROTECTED]">Kevin A. Burton</a>
-@version $Id: AlexandriaTask.java,v 1.1 2000/12/18 16:01:38 martinj Exp $
+@version $Id: AlexandriaTask.java,v 1.2 2001/02/05 00:25:05 jmartin Exp $
*/
public class AlexandriaTask extends Task {
@@ -95,7 +95,7 @@
private File imageFile = null;
private File cvsDir = null;
- private Cvs cvs = null;
+ private Workspace workspace = null;
/**
* CVS Markup file
@@ -143,7 +143,7 @@
try {
log( "Parsing out CVS markup..." );
- this.cvs = getMarkup( markup );
+ this.workspace = getMarkup( markup );
} catch ( Exception e ) {
e.printStackTrace();
return;
@@ -164,11 +164,11 @@
<javasrc> directories with the latest revision (latest="true")
@author <a href="mailto:[EMAIL PROTECTED]">Kevin A. Burton</a>
- @version $Id: AlexandriaTask.java,v 1.1 2000/12/18 16:01:38 martinj Exp $
+ @version $Id: AlexandriaTask.java,v 1.2 2001/02/05 00:25:05 jmartin Exp $
*/
private String[] getModuleSourceDirectories( MetaData metadata ) {
- String[] javasrc = metadata.getModule().getJavasrc();
+ String[] javasrc = metadata.getProject().getJavasrc();
Vector v = new Vector();
@@ -184,25 +184,13 @@
} else {
dir = cvsDir.toString();
- //use the latest tag or just the whatever the last was.
- String tag = "";
- Revision[] revs = metadata.getModule().getRevision();
- for ( int j = 0; j < revs.length; ++j ) {
+ String tag = metadata.getProject().getTag();
- tag = revs[j].getTag();
-
- if ( revs[j].getLatest() == true ) {
- break; //cause this is the latest tag;
- }
-
- }
-
-
//now add the module name, revision and then module again
dir += "/" +
- metadata.getModule().getCvsModuleName() + "/" +
+ metadata.getProject().getModule() + "/" +
tag + "/" +
- metadata.getModule().getCvsModuleName();
+ metadata.getProject().getModule();
}
@@ -224,16 +212,16 @@
Use Castor to unmarshal an XML file
@author <a href="mailto:[EMAIL PROTECTED]">Kevin A. Burton</a>
- @version $Id: AlexandriaTask.java,v 1.1 2000/12/18 16:01:38 martinj Exp $
+ @version $Id: AlexandriaTask.java,v 1.2 2001/02/05 00:25:05 jmartin Exp $
*/
- private Cvs getMarkup( File file ) throws Exception {
- Cvs cvs = Cvs.unmarshal( new FileReader( file ) );
- return cvs;
+ private Workspace getMarkup( File file ) throws Exception {
+ Workspace workspace = Workspace.unmarshal( new FileReader( file ) );
+ return workspace;
}
/**
@author <a href="mailto:[EMAIL PROTECTED]">Kevin A. Burton</a>
- @version $Id: AlexandriaTask.java,v 1.1 2000/12/18 16:01:38 martinj Exp $
+ @version $Id: AlexandriaTask.java,v 1.2 2001/02/05 00:25:05 jmartin Exp $
*/
public static String getOption(String option, String[] args) throws Exception {
@@ -254,7 +242,7 @@
Log a string with a basic loggin mechanism.
@author <a href="mailto:[EMAIL PROTECTED]">Kevin A. Burton</a>
- @version $Id: AlexandriaTask.java,v 1.1 2000/12/18 16:01:38 martinj Exp $
+ @version $Id: AlexandriaTask.java,v 1.2 2001/02/05 00:25:05 jmartin Exp $
*/
public static void print( String message ) {
System.out.println( " Alexandria -> " + message );
@@ -298,41 +286,28 @@
}
- Repository[] repos = cvs.getRepository();
+ Repository[] repos = workspace.getRepository();
for ( int i = 0; i < repos.length; ++i ) {
-
- if ( repos[i].getOpensource() == true ) {
+ org.apache.alexandria.xml.api.workspace.Project[] projects =
workspace.getProject();
- Module[] modules = repos[i].getModule();
+ for( int j = 0; j < projects.length; ++j ) {
- for( int j = 0; j < modules.length; ++j ) {
+ if ( projects[i].getOpensource() == true ) {
//determine source roots to generate from...
- MetaData metadata = new MetaData( repos[i], modules[j] );
+ MetaData metadata = new MetaData( repos[i], projects[j] );
//now index the source dir for this module...
String[] javasrc = getModuleSourceDirectories( metadata );
//get the latest revision
-
- String revision = "";
-
- Revision[] revs = modules[j].getRevision();
-
- for( int r = 0; r < revs.length; ++r ) {
-
- if ( revs[r].getLatest() ) {
- revision = revs[r].getTag();
- }
-
- }
+ String revision = projects[j].getTag();
-
for ( int k = 0; k < javasrc.length; ++k ) {
String source = javasrc[k];
@@ -347,30 +322,22 @@
null );
}
-
+ } else {
+ log( "Ignoring CVSROOT... not Open Source -> " +
repos[i].getRoot() );
}
-
- } else {
- log( "Ignoring CVSROOT... not Open Source -> " +
repos[i].getRoot() );
}
-
+
}
-
-
//run the directory indexer on the CVS dir so that users can browse
//everything with the Alexandria indexer.
- //new DirectoryIndexer( "./content/cvs",
new DirectoryIndexer(
cvsDir.toString(),
imageFolder.toString(),
imageFile.toString(),
DirectoryIndexer.MODE_DEFAULT );
-
-
-
//Index out all the JXR destniation folders
new DirectoryIndexer( dest.toString(),
@@ -391,21 +358,21 @@
*/
private String[] getSourceDirectories() {
- Repository[] repos = cvs.getRepository();
+ Repository[] repos = workspace.getRepository();
Vector v = new Vector();
for ( int i = 0; i < repos.length; ++i ) {
- if ( repos[i].getOpensource() == true ) {
- Module[] modules = repos[i].getModule();
-
- for( int j = 0; j < modules.length; ++j ) {
+ org.apache.alexandria.xml.api.workspace.Project[] projects =
workspace.getProject();
+
+ for( int j = 0; j < projects.length; ++j ) {
+ if ( projects[i].getOpensource() == true ) {
//determine source roots to generate from...
- MetaData metadata = new MetaData( repos[i], modules[j] );
+ MetaData metadata = new MetaData( repos[i], projects[j] );
//now index the source dir for this module...
String[] javasrc = getModuleSourceDirectories( metadata );
1.17 +10 -6
jakarta-alexandria/src/java/org/apache/alexandria/jxr/CodeTransform.java
Index: CodeTransform.java
===================================================================
RCS file:
/home/cvs/jakarta-alexandria/src/java/org/apache/alexandria/jxr/CodeTransform.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- CodeTransform.java 2000/12/18 16:01:40 1.16
+++ CodeTransform.java 2001/02/05 00:25:05 1.17
@@ -630,7 +630,7 @@
StringBuffer javadocURI = new StringBuffer()
.append( getPackageRoot() )
.append( "../javadoc/" )
- .append( this.metadata.getModule().getCvsModuleName() )
+ .append( this.metadata.getProject().getModule() )
.append( "/" )
.append( this.getRevision() );
@@ -640,7 +640,11 @@
javadocURI.append( "/" );
javadocURI.append( Util.replace( jf.getPackageType().getName(), ".",
"/" ) );
javadocURI.append( "/" );
- javadocURI.append( jf.getClassType().getName() );
+ if(jf.getClassType()!=null){
+ javadocURI.append( jf.getClassType().getName() );
+ }else{
+ System.out.println(this.getCurrentFilename());
+ }
javadocURI.append( ".html" );
} catch ( IOException e ) {
@@ -689,8 +693,8 @@
String home = "";
- if( this.metadata.getModule().getHome() != null ) {
- home = this.metadata.getModule().getHome();
+ if( this.metadata.getProject().getHome() != null ) {
+ home = this.metadata.getProject().getHome();
} else if ( this.metadata.getRepository().getHome() != null ) {
home = this.metadata.getRepository().getHome();
}
@@ -699,9 +703,9 @@
overview.append( getOverviewEntry( "Home: ", home ) );
- overview.append( getOverviewEntry( "License: " ,
this.metadata.getModule().getLicense() ) );
+ overview.append( getOverviewEntry( "License: " ,
this.metadata.getProject().getLicense() ) );
overview.append( getOverviewEntry( "CVSROOT: ",
this.metadata.getRepository().getRoot() ) );
- overview.append( getOverviewEntry( "Module: ",
this.metadata.getModule().getCvsModuleName() ) );
+ overview.append( getOverviewEntry( "Module: ",
this.metadata.getProject().getModule() ) );
overview.append( "</table>" );
1.9 +13 -13
jakarta-alexandria/src/java/org/apache/alexandria/jxr/DirectoryIndexer.java
Index: DirectoryIndexer.java
===================================================================
RCS file:
/home/cvs/jakarta-alexandria/src/java/org/apache/alexandria/jxr/DirectoryIndexer.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- DirectoryIndexer.java 2000/09/15 13:51:40 1.8
+++ DirectoryIndexer.java 2001/02/05 00:25:05 1.9
@@ -62,7 +62,7 @@
Handles building a directory index of files and directories.
@author <a href="mailto:[EMAIL PROTECTED]">Kevin A. Burton</a>
-@version $Id: DirectoryIndexer.java,v 1.8 2000/09/15 13:51:40 martinj Exp $
+@version $Id: DirectoryIndexer.java,v 1.9 2001/02/05 00:25:05 jmartin Exp $
*/
public class DirectoryIndexer {
@@ -93,7 +93,7 @@
/**
@see DirectoryIndexer
@author <a href="mailto:[EMAIL PROTECTED]">Kevin A. Burton</a>
- @version $Id: DirectoryIndexer.java,v 1.8 2000/09/15 13:51:40 martinj Exp $
+ @version $Id: DirectoryIndexer.java,v 1.9 2001/02/05 00:25:05 jmartin Exp $
*/
public DirectoryIndexer( String directory,
String image_folder,
@@ -107,7 +107,7 @@
Create a given DirectoryIndexer with the given dir, images, etc
@author <a href="mailto:[EMAIL PROTECTED]">Kevin A. Burton</a>
- @version $Id: DirectoryIndexer.java,v 1.8 2000/09/15 13:51:40 martinj Exp $
+ @version $Id: DirectoryIndexer.java,v 1.9 2001/02/05 00:25:05 jmartin Exp $
*/
public DirectoryIndexer( String directory,
String image_folder,
@@ -138,9 +138,9 @@
/**
@author <a href="mailto:[EMAIL PROTECTED]">Kevin A. Burton</a>
- @version $Id: DirectoryIndexer.java,v 1.8 2000/09/15 13:51:40 martinj Exp $
+ @version $Id: DirectoryIndexer.java,v 1.9 2001/02/05 00:25:05 jmartin Exp $
*/
- private void process() throws IOException {
+ private final void process() throws IOException {
if ( ! directory.isDirectory() ) {
throw new IOException("Not a directory");
@@ -151,7 +151,7 @@
System.getProperty( "file.separator" ) +
INDEX;
- System.out.println("\tWriting index file -> " + index);
+ //System.out.println("\tWriting index file -> " + index);
PrintWriter out = new PrintWriter( new FileOutputStream( index ) );
@@ -253,9 +253,9 @@
Make an href for a file
@author <a href="mailto:[EMAIL PROTECTED]">Kevin A. Burton</a>
- @version $Id: DirectoryIndexer.java,v 1.8 2000/09/15 13:51:40 martinj Exp $
+ @version $Id: DirectoryIndexer.java,v 1.9 2001/02/05 00:25:05 jmartin Exp $
*/
- private String getItem(File item) {
+ private final String getItem(File item) {
String image = IMAGE_FILE;
String href = item.getName();
@@ -291,9 +291,9 @@
/**
@author <a href="mailto:[EMAIL PROTECTED]">Kevin A. Burton</a>
- @version $Id: DirectoryIndexer.java,v 1.8 2000/09/15 13:51:40 martinj Exp $
+ @version $Id: DirectoryIndexer.java,v 1.9 2001/02/05 00:25:05 jmartin Exp $
*/
- private String[] getDirs() throws IOException {
+ private final String[] getDirs() throws IOException {
Vector v = new Vector();
@@ -320,9 +320,9 @@
/**
@author <a href="mailto:[EMAIL PROTECTED]">Kevin A. Burton</a>
- @version $Id: DirectoryIndexer.java,v 1.8 2000/09/15 13:51:40 martinj Exp $
+ @version $Id: DirectoryIndexer.java,v 1.9 2001/02/05 00:25:05 jmartin Exp $
*/
- private String[] getFiles() throws IOException {
+ private final String[] getFiles() throws IOException {
Vector v = new Vector();
String[] list = directory.list();
@@ -373,7 +373,7 @@
Copy one file to another file
@author <A HREF="mailto:[EMAIL PROTECTED]">Kevin A. Burton</A>
- @version $Id: DirectoryIndexer.java,v 1.8 2000/09/15 13:51:40 martinj Exp $
+ @version $Id: DirectoryIndexer.java,v 1.9 2001/02/05 00:25:05 jmartin Exp $
*/
public void copy(String source, String dest) throws IOException {
1.2 +8 -8
jakarta-alexandria/src/java/org/apache/alexandria/util/MetaData.java
Index: MetaData.java
===================================================================
RCS file:
/home/cvs/jakarta-alexandria/src/java/org/apache/alexandria/util/MetaData.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- MetaData.java 2000/04/10 05:33:09 1.1
+++ MetaData.java 2001/02/05 00:25:05 1.2
@@ -52,32 +52,32 @@
package org.apache.alexandria.util;
-import org.apache.alexandria.xml.api.cvs.*;
+import org.apache.alexandria.xml.api.workspace.*;
/**
- * Contains MetaData about this CVS..
+ * Contains MetaData about this Workspace..
*
* @author <a href="mailto:[EMAIL PROTECTED]">Kevin A. Burton</a>
- * @version $Id: MetaData.java,v 1.1 2000/04/10 05:33:09 burton Exp $
+ * @version $Id: MetaData.java,v 1.2 2001/02/05 00:25:05 jmartin Exp $
*/
public class MetaData {
private Repository repository;
- private Module module;
+ private Project project;
public MetaData( Repository repository,
- Module module ) {
+ Project project ) {
this.repository = repository;
- this.module = module;
+ this.project = project;
}
public Repository getRepository() {
return repository;
}
- public Module getModule() {
- return this.module;
+ public Project getProject() {
+ return this.project;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]