org.apache.maven.index.creator
Class OsgiArtifactIndexCreator

java.lang.Object
  extended by org.codehaus.plexus.logging.AbstractLogEnabled
      extended by org.apache.maven.index.creator.AbstractIndexCreator
          extended by org.apache.maven.index.creator.OsgiArtifactIndexCreator
All Implemented Interfaces:
IndexCreator, org.codehaus.plexus.logging.LogEnabled

@Component(role=IndexCreator.class,
           hint="osgi-metadatas")
public class OsgiArtifactIndexCreator
extends AbstractIndexCreator

This indexCreator will index some OSGI metadatas.
All jars are indexed and not only the ones with packaging bundle.

OSGI metadatas indexed :

Since:
4.1.2
Author:
Olivier Lamy

Field Summary
static IndexerField FLD_BUNDLE_DESCRIPTION
           
static IndexerField FLD_BUNDLE_DOCURL
           
static IndexerField FLD_BUNDLE_EXPORT_PACKAGE
           
static IndexerField FLD_BUNDLE_EXPORT_SERVIVE
           
static IndexerField FLD_BUNDLE_IMPORT_PACKAGE
           
static IndexerField FLD_BUNDLE_LICENSE
           
static IndexerField FLD_BUNDLE_NAME
           
static IndexerField FLD_BUNDLE_REQUIRE_BUNDLE
           
static IndexerField FLD_BUNDLE_SYMBOLIC_NAME
           
static IndexerField FLD_BUNDLE_VERSION
           
static String ID
           
 
Constructor Summary
OsgiArtifactIndexCreator()
           
 
Method Summary
 Collection<IndexerField> getIndexerFields()
          Returns the indexer fields that this IndexCreator introduces to index.
 void populateArtifactInfo(ArtifactContext artifactContext)
          Populate an ArtifactContext with information about corresponding artifact.
 String toString()
           
 boolean updateArtifactInfo(org.apache.lucene.document.Document document, ArtifactInfo artifactInfo)
          Update an ArtifactInfo from given Lucene Document.
 void updateDocument(ArtifactInfo artifactInfo, org.apache.lucene.document.Document document)
          Update Lucene Document from a given ArtifactInfo.
 
Methods inherited from class org.apache.maven.index.creator.AbstractIndexCreator
bos, getCreatorDependencies, getId, sob
 
Methods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ID

public static final String ID
See Also:
Constant Field Values

FLD_BUNDLE_SYMBOLIC_NAME

public static final IndexerField FLD_BUNDLE_SYMBOLIC_NAME

FLD_BUNDLE_VERSION

public static final IndexerField FLD_BUNDLE_VERSION

FLD_BUNDLE_EXPORT_PACKAGE

public static final IndexerField FLD_BUNDLE_EXPORT_PACKAGE

FLD_BUNDLE_EXPORT_SERVIVE

public static final IndexerField FLD_BUNDLE_EXPORT_SERVIVE

FLD_BUNDLE_DESCRIPTION

public static final IndexerField FLD_BUNDLE_DESCRIPTION

FLD_BUNDLE_NAME

public static final IndexerField FLD_BUNDLE_NAME

FLD_BUNDLE_LICENSE

public static final IndexerField FLD_BUNDLE_LICENSE

FLD_BUNDLE_DOCURL

public static final IndexerField FLD_BUNDLE_DOCURL

FLD_BUNDLE_IMPORT_PACKAGE

public static final IndexerField FLD_BUNDLE_IMPORT_PACKAGE

FLD_BUNDLE_REQUIRE_BUNDLE

public static final IndexerField FLD_BUNDLE_REQUIRE_BUNDLE
Constructor Detail

OsgiArtifactIndexCreator

public OsgiArtifactIndexCreator()
Method Detail

getIndexerFields

public Collection<IndexerField> getIndexerFields()
Description copied from interface: IndexCreator
Returns the indexer fields that this IndexCreator introduces to index.

Returns:

populateArtifactInfo

public void populateArtifactInfo(ArtifactContext artifactContext)
                          throws IOException
Description copied from interface: IndexCreator
Populate an ArtifactContext with information about corresponding artifact.

Throws:
IOException

updateDocument

public void updateDocument(ArtifactInfo artifactInfo,
                           org.apache.lucene.document.Document document)
Description copied from interface: IndexCreator
Update Lucene Document from a given ArtifactInfo.


updateArtifactInfo

public boolean updateArtifactInfo(org.apache.lucene.document.Document document,
                                  ArtifactInfo artifactInfo)
Description copied from interface: IndexCreator
Update an ArtifactInfo from given Lucene Document.

Returns:
true is artifact info has been updated

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.