Class SimpleIndexer

java.lang.Object
aQute.bnd.osgi.repository.SimpleIndexer

public class SimpleIndexer extends Object
Simple program to generate an index from a set of bundles.
  • Field Details

  • Constructor Details

    • SimpleIndexer

      public SimpleIndexer()
  • Method Details

    • files

      public SimpleIndexer files(Collection<File> files)
      Adds files to be indexed.
      Parameters:
      files - the files to include in the index
    • base

      public SimpleIndexer base(URI base)
      Parameters:
      base - the base URI from which the index urls are relative
    • compress

      public SimpleIndexer compress(boolean compress)
      Parameters:
      compress - compress with GZIP when true
    • name

      public SimpleIndexer name(String name)
      Parameters:
      name - an optional name for the index
    • analyzer

      public SimpleIndexer analyzer(SimpleIndexer.FileAnalyzer analyzer)
      Parameters:
      analyzer - a resource analyzer
    • increment

      public SimpleIndexer increment(long increment)
      Parameters:
      increment - the timestamp of the index
    • index

      public void index(OutputStream outputStream) throws IOException
      Generate the index to the specified output stream.
      Parameters:
      outputStream - the output stream to write the index file
      Throws:
      IOException - if a file cannot be indexed
    • index

      public void index(File file) throws IOException
      Generate the index to the specified file.
      Parameters:
      file - the file to write the index file
      Throws:
      IOException - if a file cannot be indexed
    • getResources

      public List<org.osgi.resource.Resource> getResources()
      Return the resources so far.
      Returns:
      the set of resources handled so far.
    • reporter

      public SimpleIndexer reporter(Reporter reporter)
    • repository

      private XMLResourceGenerator repository()
    • indexFile

      private org.osgi.resource.Resource indexFile(File file)
    • relativize

      private URI relativize(File file)