You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ep...@apache.org on 2006/01/10 04:12:43 UTC

svn commit: r367470 - in /maven/repository-manager/trunk/maven-repository-indexer/src: main/java/org/apache/maven/repository/indexing/ main/java/org/apache/maven/repository/indexing/query/ test/java/org/apache/maven/repository/indexing/

Author: epunzalan
Date: Mon Jan  9 19:12:17 2006
New Revision: 367470

URL: http://svn.apache.org/viewcvs?rev=367470&view=rev
Log:
Added javadocs

Modified:
    maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/AbstractRepositoryIndex.java
    maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/AbstractRepositoryIndexSearcher.java
    maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/ArtifactRepositoryIndex.java
    maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/ArtifactRepositoryIndexSearcher.java
    maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/DefaultRepositoryIndexingFactory.java
    maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/PomRepositoryIndex.java
    maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/PomRepositoryIndexSearcher.java
    maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/RepositoryIndex.java
    maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/RepositoryIndexSearcher.java
    maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/RepositoryIndexingFactory.java
    maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/query/AbstractCompoundQueryTerm.java
    maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/query/AndQueryTerm.java
    maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/query/CompoundQuery.java
    maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/query/CompoundQueryTerm.java
    maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/query/NotQueryTerm.java
    maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/query/OrQueryTerm.java
    maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/query/Query.java
    maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/query/SinglePhraseQuery.java
    maven/repository-manager/trunk/maven-repository-indexer/src/test/java/org/apache/maven/repository/indexing/ArtifactRepositoryIndexingTest.java

Modified: maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/AbstractRepositoryIndex.java
URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/AbstractRepositoryIndex.java?rev=367470&r1=367469&r2=367470&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/AbstractRepositoryIndex.java (original)
+++ maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/AbstractRepositoryIndex.java Mon Jan  9 19:12:17 2006
@@ -40,6 +40,14 @@
 
     protected ArtifactRepository repository;
 
+    /**
+     * Class constructor
+     *
+     * @param indexPath
+     * @param repository
+     * @param indexFields
+     * @throws RepositoryIndexException
+     */
     protected AbstractRepositoryIndex( String indexPath, ArtifactRepository repository, String[] indexFields )
         throws RepositoryIndexException
     {
@@ -57,7 +65,7 @@
     }
 
     /**
-     * method to encapsulate the optimize() method for lucene
+     * @see org.apache.maven.repository.indexing.RepositoryIndex#optimize()
      */
     public void optimize()
         throws RepositoryIndexException
@@ -78,9 +86,7 @@
     }
 
     /**
-     * method used to query the index status
-     *
-     * @return true if the index is open.
+     * @see org.apache.maven.repository.indexing.RepositoryIndex#isOpen()
      */
     public boolean isOpen()
     {
@@ -88,7 +94,7 @@
     }
 
     /**
-     * method used to close all open streams to the index directory
+     * @see org.apache.maven.repository.indexing.RepositoryIndex#close()
      */
     public void close()
         throws RepositoryIndexException
@@ -109,11 +115,20 @@
         }
     }
 
+    /**
+     * @see org.apache.maven.repository.indexing.RepositoryIndex#getIndexPath()
+     */
     public String getIndexPath()
     {
         return indexPath;
     }
 
+    /**
+     * Method to retrieve the lucene IndexWriter used in creating/updating the index
+     *
+     * @return the lucene IndexWriter object used to update the index
+     * @throws IOException
+     */
     protected IndexWriter getIndexWriter()
         throws IOException
     {
@@ -173,6 +188,9 @@
         indexOpen = true;
     }
 
+    /**
+     * @see org.apache.maven.repository.indexing.RepositoryIndex#getRepository()
+     */
     public ArtifactRepository getRepository()
     {
         return repository;

Modified: maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/AbstractRepositoryIndexSearcher.java
URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/AbstractRepositoryIndexSearcher.java?rev=367470&r1=367469&r2=367470&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/AbstractRepositoryIndexSearcher.java (original)
+++ maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/AbstractRepositoryIndexSearcher.java Mon Jan  9 19:12:17 2006
@@ -36,7 +36,7 @@
 import java.util.List;
 
 /**
- *
+ * Abstract Class to hold common codes for the different RepositoryIndexSearcher
  */
 public abstract class AbstractRepositoryIndexSearcher
     extends AbstractLogEnabled
@@ -55,12 +55,7 @@
     }
 
     /**
-     * Search the artifact based on the search criteria specified in the query
-     * object. Returns a list of artifact objects
-     *
-     * @param query the query object that contains the search criteria
-     * @return List
-     * @throws RepositoryIndexSearchException
+     * @see RepositoryIndexSearcher#search(org.apache.maven.repository.indexing.query.Query)
      */
     public List search( Query query )
         throws RepositoryIndexSearchException
@@ -111,6 +106,14 @@
         return docs;
     }
 
+    /**
+     * Method to create a lucene Query object from a single query phrase
+     *
+     * @param field the index field name to search into
+     * @param value the index field value to match the field with
+     * @return a lucene Query object representing the query phrase field = value
+     * @throws ParseException
+     */
     private org.apache.lucene.search.Query createLuceneQuery( String field, String value )
         throws ParseException
     {
@@ -128,6 +131,13 @@
         return qry;
     }
 
+    /**
+     * Method to create a lucene Query object by converting a prepared Query object
+     *
+     * @param query the prepared Query object to be converted into a lucene Query object
+     * @return a lucene Query object to represent the passed Query object
+     * @throws ParseException
+     */
     private org.apache.lucene.search.Query createLuceneQuery( Query query )
         throws ParseException
     {

Modified: maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/ArtifactRepositoryIndex.java
URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/ArtifactRepositoryIndex.java?rev=367470&r1=367469&r2=367470&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/ArtifactRepositoryIndex.java (original)
+++ maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/ArtifactRepositoryIndex.java Mon Jan  9 19:12:17 2006
@@ -34,7 +34,7 @@
 
 
 /**
- * Class used to index Artifact objects in a specified repository
+ * Class used to index Artifact objects in a specific repository
  *
  * @author Edwin Punzalan
  */
@@ -66,6 +66,14 @@
 
     private Digester digester;
 
+    /**
+     * Class constructor
+     *
+     * @param indexPath the path where the lucene index will be created/updated.
+     * @param repository the repository where the indexed artifacts are located
+     * @param digester the digester object to generate the checksum strings
+     * @throws RepositoryIndexException
+     */
     public ArtifactRepositoryIndex( String indexPath, ArtifactRepository repository, Digester digester )
         throws RepositoryIndexException
     {
@@ -74,9 +82,7 @@
     }
 
     /**
-     * method to get the Analyzer used to create indices
-     *
-     * @return the Analyzer object used to create the artifact indices
+     * @see org.apache.maven.repository.indexing.RepositoryIndex#getAnalyzer()
      */
     public Analyzer getAnalyzer()
     {
@@ -89,9 +95,10 @@
     }
 
     /**
-     * method to index a given artifact
+     * Method to index a given artifact
      *
      * @param artifact the Artifact object to be indexed
+     * @throws RepositoryIndexException
      */
     public void indexArtifact( Artifact artifact )
         throws RepositoryIndexException
@@ -174,11 +181,21 @@
         }
     }
 
+    /**
+     * @see RepositoryIndex#isKeywordField(String)
+     */
     public boolean isKeywordField( String field )
     {
         return false;
     }
 
+    /**
+     * Method to test a zip entry if it is a java class, and adds it to the classes buffer
+     *
+     * @param entry the zip entry to test for java class
+     * @param classes the String buffer to add the java class if the test result as true
+     * @return true if the zip entry is a java class and was successfully added to the buffer
+     */
     private boolean addIfClassEntry( ZipEntry entry, StringBuffer classes )
     {
         boolean isAdded = false;
@@ -203,6 +220,13 @@
         return isAdded;
     }
 
+    /**
+     * Method to add a class package to the buffer of packages
+     *
+     * @param name the complete path name of the class
+     * @param packages the packages buffer
+     * @return true if the package is successfully added
+     */
     private boolean addClassPackage( String name, StringBuffer packages )
     {
         boolean isAdded = false;
@@ -221,6 +245,13 @@
         return isAdded;
     }
 
+    /**
+     * Method to add the zip entry as a file list
+     *
+     * @param entry the zip entry to be added
+     * @param files the buffer of files to update
+     * @return true if the file was successfully added
+     */
     private boolean addFile( ZipEntry entry, StringBuffer files )
     {
         String name = entry.getName();

Modified: maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/ArtifactRepositoryIndexSearcher.java
URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/ArtifactRepositoryIndexSearcher.java?rev=367470&r1=367469&r2=367470&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/ArtifactRepositoryIndexSearcher.java (original)
+++ maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/ArtifactRepositoryIndexSearcher.java Mon Jan  9 19:12:17 2006
@@ -26,7 +26,6 @@
  * This class searches the index for existing artifacts that contains the
  * specified query string.
  *
- * @author Maria Odea Ching
  */
 public class ArtifactRepositoryIndexSearcher
     extends AbstractRepositoryIndexSearcher
@@ -45,6 +44,9 @@
         this.factory = factory;
     }
 
+    /**
+     * @see AbstractRepositoryIndexSearcher#createSearchedObjectFromIndexDocument(org.apache.lucene.document.Document)
+     */
     protected Object createSearchedObjectFromIndexDocument( Document doc )
     {
         String groupId = doc.get( ArtifactRepositoryIndex.FLD_GROUPID );

Modified: maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/DefaultRepositoryIndexingFactory.java
URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/DefaultRepositoryIndexingFactory.java?rev=367470&r1=367469&r2=367470&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/DefaultRepositoryIndexingFactory.java (original)
+++ maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/DefaultRepositoryIndexingFactory.java Mon Jan  9 19:12:17 2006
@@ -38,23 +38,35 @@
      */
     private ArtifactFactory artifactFactory;
 
+    /**
+     * @see RepositoryIndexingFactory#createArtifactRepositoryIndexSearcher(ArtifactRepositoryIndex)
+     */
     public ArtifactRepositoryIndexSearcher createArtifactRepositoryIndexSearcher( ArtifactRepositoryIndex index )
     {
         return new ArtifactRepositoryIndexSearcher( index, artifactFactory );
     }
 
+    /**
+     * @see RepositoryIndexingFactory#createArtifactRepositoryIndex(String, org.apache.maven.artifact.repository.ArtifactRepository)
+     */
     public ArtifactRepositoryIndex createArtifactRepositoryIndex( String indexPath, ArtifactRepository repository )
         throws RepositoryIndexException
     {
         return new ArtifactRepositoryIndex( indexPath, repository, digester );
     }
 
+    /**
+     * @see RepositoryIndexingFactory#createPomRepositoryIndex(String, org.apache.maven.artifact.repository.ArtifactRepository)
+     */
     public PomRepositoryIndex createPomRepositoryIndex( String indexPath, ArtifactRepository repository )
         throws RepositoryIndexException
     {
         return new PomRepositoryIndex( indexPath, repository, digester, artifactFactory );
     }
 
+    /**
+     * @see RepositoryIndexingFactory#createPomRepositoryIndexSearcher(PomRepositoryIndex) 
+     */
     public PomRepositoryIndexSearcher createPomRepositoryIndexSearcher( PomRepositoryIndex index )
     {
         return new PomRepositoryIndexSearcher( index, artifactFactory );

Modified: maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/PomRepositoryIndex.java
URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/PomRepositoryIndex.java?rev=367470&r1=367469&r2=367470&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/PomRepositoryIndex.java (original)
+++ maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/PomRepositoryIndex.java Mon Jan  9 19:12:17 2006
@@ -40,6 +40,8 @@
 import java.util.List;
 
 /**
+ * Class to create index entries for a given pom in a repository
+ *
  * @author Edwin Punzalan
  */
 public class PomRepositoryIndex
@@ -79,6 +81,15 @@
     private static final List KEYWORD_FIELDS = Arrays.asList(
         new String[]{FLD_LICENSE_URLS, FLD_DEPENDENCIES, FLD_PLUGINS_BUILD, FLD_PLUGINS_REPORT, FLD_PLUGINS_ALL} );
 
+    /**
+     * Class Constructor
+     *
+     * @param indexPath the path where the index is available or will be made available
+     * @param repository the repository where objects indexed by this class resides
+     * @param digester the digester to be used for generating checksums
+     * @param artifactFactory the factory for building artifact objects
+     * @throws RepositoryIndexException
+     */
     public PomRepositoryIndex( String indexPath, ArtifactRepository repository, Digester digester,
                                ArtifactFactory artifactFactory )
         throws RepositoryIndexException
@@ -88,6 +99,9 @@
         this.artifactFactory = artifactFactory;
     }
 
+    /**
+     * @see org.apache.maven.repository.indexing.RepositoryIndex#getAnalyzer()
+     */
     public Analyzer getAnalyzer()
     {
         if ( analyzer == null )
@@ -98,6 +112,12 @@
         return analyzer;
     }
 
+    /**
+     * Method to create the index fields for a Model object into the index
+     *
+     * @param pom the Model object to be indexed
+     * @throws RepositoryIndexException
+     */
     public void indexPom( Model pom )
         throws RepositoryIndexException
     {
@@ -160,11 +180,20 @@
         }
     }
 
+    /**
+     * @see RepositoryIndex#isKeywordField(String) 
+     */
     public boolean isKeywordField( String field )
     {
         return KEYWORD_FIELDS.contains( field );
     }
 
+    /**
+     * Method to index license urls found inside the passed pom
+     *
+     * @param doc the index object to create the fields for the license urls
+     * @param pom the Model object to be indexed
+     */
     private void indexLicenseUrls( Document doc, Model pom )
     {
         List licenseList = pom.getLicenses();
@@ -187,6 +216,12 @@
         }
     }
 
+    /**
+     * Method to index declared dependencies found inside the passed pom
+     *
+     * @param doc the index object to create the fields for the dependencies
+     * @param pom the Model object to be indexed
+     */
     private void indexDependencies( Document doc, Model pom )
     {
         List dependencyList = pom.getDependencies();
@@ -206,6 +241,13 @@
         }
     }
 
+    /**
+     * Method to index plugins to a specified index field
+     *
+     * @param doc the index object to create the fields for the plugins
+     * @param field the index field to store the passed plugin
+     * @param plugins the iterator to the list of plugins to be indexed
+     */
     private void indexPlugins( Document doc, String field, Iterator plugins )
     {
         while ( plugins.hasNext() )
@@ -216,6 +258,13 @@
         }
     }
 
+    /**
+     * Method to index report plugins to a specified index field
+     *
+     * @param doc the index object to create the fields for the report plugins
+     * @param field the index field to store the passed report plugin
+     * @param plugins the iterator to the list of report plugins to be indexed
+     */
     private void indexReportPlugins( Document doc, String field, Iterator plugins )
     {
         while ( plugins.hasNext() )
@@ -226,6 +275,14 @@
         }
     }
 
+    /**
+     * Method to generate the computed checksum of an existing file using the specified algorithm.
+     *
+     * @param algorithm the algorithm to be used to generate the checksum
+     * @param file the file to match the generated checksum
+     * @return a string representing the checksum
+     * @throws RepositoryIndexException
+     */
     private String getChecksum( String algorithm, String file )
         throws RepositoryIndexException
     {
@@ -243,6 +300,14 @@
         }
     }
 
+    /**
+     * Method to create the unique artifact id to represent the artifact in the repository
+     *
+     * @param groupId the artifact groupId
+     * @param artifactId the artifact artifactId
+     * @param version the artifact version
+     * @return the String id to uniquely represent the artifact
+     */
     private String getId( String groupId, String artifactId, String version )
     {
         return groupId + ":" + artifactId + ":" + version;

Modified: maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/PomRepositoryIndexSearcher.java
URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/PomRepositoryIndexSearcher.java?rev=367470&r1=367469&r2=367470&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/PomRepositoryIndexSearcher.java (original)
+++ maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/PomRepositoryIndexSearcher.java Mon Jan  9 19:12:17 2006
@@ -20,6 +20,8 @@
 import org.apache.maven.artifact.factory.ArtifactFactory;
 
 /**
+ * The PomRepositoryIndexSearcher is used to search for artifacts in the index created by a PomRepositoryIndex class.
+ *
  * @author Edwin Punzalan
  */
 public class PomRepositoryIndexSearcher
@@ -27,12 +29,20 @@
 {
     private ArtifactFactory factory;
 
+    /**
+     *
+     * @param index the PomRepositoryIndex
+     * @param artifactFactory
+     */
     public PomRepositoryIndexSearcher( RepositoryIndex index, ArtifactFactory artifactFactory )
     {
         super( index );
         this.factory = artifactFactory;
     }
 
+    /**
+     * @see AbstractRepositoryIndexSearcher#createSearchedObjectFromIndexDocument(org.apache.lucene.document.Document) 
+     */
     protected Object createSearchedObjectFromIndexDocument( Document doc )
     {
         String groupId = doc.get( PomRepositoryIndex.FLD_GROUPID );

Modified: maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/RepositoryIndex.java
URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/RepositoryIndex.java?rev=367470&r1=367469&r2=367470&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/RepositoryIndex.java (original)
+++ maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/RepositoryIndex.java Mon Jan  9 19:12:17 2006
@@ -24,19 +24,46 @@
  */
 public interface RepositoryIndex
 {
+    /**
+     * Method used to query the index status
+     *
+     * @return true if the index is open.
+     */
     boolean isOpen();
 
+    /**
+     * Method to close open streams to the index directory
+     */
     void close()
         throws RepositoryIndexException;
 
     ArtifactRepository getRepository();
 
+    /**
+     * Method to encapsulate the optimize() method for lucene
+     */
     void optimize()
         throws RepositoryIndexException;
 
+    /**
+     * Method to retrieve the lucene analyzer object used in creating the document fields for this index
+     *
+     * @return lucene Analyzer object used in creating the index fields
+     */
     Analyzer getAnalyzer();
 
+    /**
+     * Method to retrieve the path where the index is made available
+     *
+     * @return the path where the index resides
+     */
     String getIndexPath();
 
+    /**
+     * Tests an index field if it is a keyword field
+     *
+     * @param field the name of the index field to test
+     * @return true if the index field passed is a keyword, otherwise its false
+     */
     boolean isKeywordField( String field );
 }

Modified: maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/RepositoryIndexSearcher.java
URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/RepositoryIndexSearcher.java?rev=367470&r1=367469&r2=367470&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/RepositoryIndexSearcher.java (original)
+++ maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/RepositoryIndexSearcher.java Mon Jan  9 19:12:17 2006
@@ -21,7 +21,7 @@
 import java.util.List;
 
 /**
- * @author Maria Odea Ching
+ * 
  */
 public interface RepositoryIndexSearcher
 {

Modified: maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/RepositoryIndexingFactory.java
URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/RepositoryIndexingFactory.java?rev=367470&r1=367469&r2=367470&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/RepositoryIndexingFactory.java (original)
+++ maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/RepositoryIndexingFactory.java Mon Jan  9 19:12:17 2006
@@ -27,13 +27,41 @@
 {
     String ROLE = RepositoryIndexingFactory.class.getName();
 
+    /**
+     * Method to create an instance of the ArtifactRepositoryIndexSearcher
+     *
+     * @param index the ArtifactRepositoryIndex instance that the returned searcher will be searching into
+     * @return the ArtifactRepositoryIndexSearcher instance
+     */
     ArtifactRepositoryIndexSearcher createArtifactRepositoryIndexSearcher( ArtifactRepositoryIndex index );
 
+    /**
+     * Method to create an instance of the ArtifactRepositoryIndex
+     *
+     * @param indexPath the path where the index will be created/updated
+     * @param repository the repository where the indexed artifacts are located
+     * @return the ArtifactRepositoryIndex instance
+     * @throws RepositoryIndexException
+     */
     ArtifactRepositoryIndex createArtifactRepositoryIndex( String indexPath, ArtifactRepository repository )
         throws RepositoryIndexException;
 
+    /**
+     * Method to create an instance of the PomRepositoryIndex
+     *
+     * @param indexPath the path where the index will be created/updated
+     * @param repository the repository where the indexed poms are located
+     * @return the PomRepositoryIndex instance
+     * @throws RepositoryIndexException
+     */
     PomRepositoryIndex createPomRepositoryIndex( String indexPath, ArtifactRepository repository )
         throws RepositoryIndexException;
 
+    /**
+     * Method to create an instance of the PomRepositoryIndexSearcher
+     *
+     * @param index the PomRepositoryIndex instance that the returned searcher will be searching into
+     * @return the PomRepositoryIndexSearcher instance
+     */
     PomRepositoryIndexSearcher createPomRepositoryIndexSearcher( PomRepositoryIndex index );
 }

Modified: maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/query/AbstractCompoundQueryTerm.java
URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/query/AbstractCompoundQueryTerm.java?rev=367470&r1=367469&r2=367470&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/query/AbstractCompoundQueryTerm.java (original)
+++ maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/query/AbstractCompoundQueryTerm.java Mon Jan  9 19:12:17 2006
@@ -29,21 +29,35 @@
      */
     private Query query;
 
+    /**
+     * Class constructor
+     *
+     * @param query the query represented by this object
+     */
     protected AbstractCompoundQueryTerm( Query query )
     {
         this.query = query;
     }
 
+    /**
+     * @see CompoundQueryTerm#isRequired()
+     */
     public boolean isRequired()
     {
         return false;
     }
 
+    /**
+     * @see CompoundQueryTerm#isProhibited()
+     */
     public boolean isProhibited()
     {
         return false;
     }
 
+    /**
+     * @see CompoundQueryTerm#getQuery() 
+     */
     public Query getQuery()
     {
         return query;

Modified: maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/query/AndQueryTerm.java
URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/query/AndQueryTerm.java?rev=367470&r1=367469&r2=367470&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/query/AndQueryTerm.java (original)
+++ maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/query/AndQueryTerm.java Mon Jan  9 19:12:17 2006
@@ -24,11 +24,19 @@
 public class AndQueryTerm
     extends AbstractCompoundQueryTerm
 {
+    /**
+     * Class constructor
+     *
+     * @param query the Query object represented by this object
+     */
     public AndQueryTerm( Query query )
     {
         super( query );
     }
 
+    /**
+     * @see AbstractCompoundQueryTerm#isRequired()
+     */
     public boolean isRequired()
     {
         return true;

Modified: maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/query/CompoundQuery.java
URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/query/CompoundQuery.java?rev=367470&r1=367469&r2=367470&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/query/CompoundQuery.java (original)
+++ maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/query/CompoundQuery.java Mon Jan  9 19:12:17 2006
@@ -20,6 +20,8 @@
 import java.util.List;
 
 /**
+ * Class to hold multiple SinglePhraseQueries and/or other CompoundQueries.
+ *
  * @author Edwin Punzalan
  */
 public class CompoundQuery
@@ -27,26 +29,52 @@
 {
     protected List queries;
 
+    /**
+     * Class constructor
+     */
     public CompoundQuery()
     {
         queries = new ArrayList();
     }
 
+    /**
+     * Appends a required Query object to this Query object. The Query object will be encapsulated inside an
+     *     AndQueryTerm object.
+     *
+     * @param query the Query object to be appended to this Query object
+     */
     public void and( Query query )
     {
         queries.add( new AndQueryTerm( query ) );
     }
 
+    /**
+     * Appends an optional Query object to this Query object. The Query object will be encapsulated inside an
+     *     OrQueryTerm object.
+     *
+     * @param query the Query object to be appended to this Query object
+     */
     public void or( Query query )
     {
         queries.add( new OrQueryTerm( query ) );
     }
 
+    /**
+     * Appends a prohibited Query object to this Query object. The Query object will be encapsulated inside an
+     *     NotQueryTerm object.
+     *
+     * @param query the Query object to be appended to this Query object
+     */
     public void not( Query query )
     {
         queries.add( new NotQueryTerm( query ) );
     }
 
+    /**
+     * Method to get the List of Queries appended into this
+     *
+     * @return List of all Queries added to this Query
+     */
     public List getQueries()
     {
         return queries;

Modified: maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/query/CompoundQueryTerm.java
URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/query/CompoundQueryTerm.java?rev=367470&r1=367469&r2=367470&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/query/CompoundQueryTerm.java (original)
+++ maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/query/CompoundQueryTerm.java Mon Jan  9 19:12:17 2006
@@ -23,9 +23,24 @@
  */
 public interface CompoundQueryTerm
 {
+    /**
+     * Method to test if the Query is a search requirement
+     *
+     * @return true if this Query is a search requirement, otherwise returns false
+     */
     boolean isRequired();
 
+    /**
+     * Method to test if the Query is prohibited in the search result
+     *
+     * @return true if this Query is prohibited in the search result
+     */
     boolean isProhibited();
 
+    /**
+     * Method to get the Query object represented by this object
+     *
+     * @return the Query object represented by this object
+     */
     Query getQuery();
 }

Modified: maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/query/NotQueryTerm.java
URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/query/NotQueryTerm.java?rev=367470&r1=367469&r2=367470&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/query/NotQueryTerm.java (original)
+++ maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/query/NotQueryTerm.java Mon Jan  9 19:12:17 2006
@@ -24,11 +24,19 @@
 public class NotQueryTerm
     extends AbstractCompoundQueryTerm
 {
+    /**
+     * Class constructor
+     *
+     * @param query the Query object represented by this Query object
+     */
     public NotQueryTerm( Query query )
     {
         super( query );
     }
 
+    /**
+     * @see CompoundQueryTerm#isProhibited()
+     */
     public boolean isProhibited()
     {
         return true;

Modified: maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/query/OrQueryTerm.java
URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/query/OrQueryTerm.java?rev=367470&r1=367469&r2=367470&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/query/OrQueryTerm.java (original)
+++ maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/query/OrQueryTerm.java Mon Jan  9 19:12:17 2006
@@ -24,6 +24,11 @@
 public class OrQueryTerm
     extends AbstractCompoundQueryTerm
 {
+    /**
+     * Class constructor
+     *
+     * @param query the Query object represented by this Query object
+     */
     public OrQueryTerm( Query query )
     {
         super( query );

Modified: maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/query/Query.java
URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/query/Query.java?rev=367470&r1=367469&r2=367470&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/query/Query.java (original)
+++ maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/query/Query.java Mon Jan  9 19:12:17 2006
@@ -18,6 +18,8 @@
  */
 
 /**
+ * Interface to label the query classes
+ *
  * @author Edwin Punzalan
  */
 public interface Query

Modified: maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/query/SinglePhraseQuery.java
URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/query/SinglePhraseQuery.java?rev=367470&r1=367469&r2=367470&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/query/SinglePhraseQuery.java (original)
+++ maven/repository-manager/trunk/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/query/SinglePhraseQuery.java Mon Jan  9 19:12:17 2006
@@ -18,6 +18,8 @@
  */
 
 /**
+ * Class to hold a single field search condition
+ *
  * @author Edwin Punzalan
  */
 public class SinglePhraseQuery
@@ -27,17 +29,33 @@
 
     private String value;
 
+    /**
+     * Class constructor
+     *
+     * @param field the index field to search
+     * @param value the index value requirement
+     */
     public SinglePhraseQuery( String field, String value )
     {
         this.field = field;
         this.value = value;
     }
 
+    /**
+     * Method to retrieve the name of the index field searched
+     *
+     * @return the name of the index field
+     */
     public String getField()
     {
         return field;
     }
 
+    /**
+     * Method to retrieve the value used in searching the index field
+     *
+     * @return the value to corresspond the index field
+     */
     public String getValue()
     {
         return value;

Modified: maven/repository-manager/trunk/maven-repository-indexer/src/test/java/org/apache/maven/repository/indexing/ArtifactRepositoryIndexingTest.java
URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-indexer/src/test/java/org/apache/maven/repository/indexing/ArtifactRepositoryIndexingTest.java?rev=367470&r1=367469&r2=367470&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-indexer/src/test/java/org/apache/maven/repository/indexing/ArtifactRepositoryIndexingTest.java (original)
+++ maven/repository-manager/trunk/maven-repository-indexer/src/test/java/org/apache/maven/repository/indexing/ArtifactRepositoryIndexingTest.java Mon Jan  9 19:12:17 2006
@@ -34,7 +34,7 @@
 import java.util.List;
 
 /**
- * @author Edwin Punzalan/Maria Odea Ching
+ * @author Edwin Punzalan
  */
 public class ArtifactRepositoryIndexingTest
     extends PlexusTestCase