Package aQute.bnd.osgi.repository
Class SimpleIndexer
- java.lang.Object
-
- aQute.bnd.osgi.repository.SimpleIndexer
-
public class SimpleIndexer extends java.lang.Object
Simple program to generate an index from a set of bundles.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
SimpleIndexer.FileAnalyzer
A functional interface providing an entry point for performing additional analysis of indexed files.
-
Constructor Summary
Constructors Constructor Description SimpleIndexer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SimpleIndexer
analyzer(SimpleIndexer.FileAnalyzer analyzer)
SimpleIndexer
base(java.net.URI base)
SimpleIndexer
compress(boolean compress)
SimpleIndexer
files(java.util.Collection<java.io.File> files)
Adds files to be indexed.java.util.List<org.osgi.resource.Resource>
getResources()
Return the resources so far.SimpleIndexer
increment(long increment)
void
index(java.io.File file)
Generate the index to the specified file.void
index(java.io.OutputStream outputStream)
Generate the index to the specified output stream.SimpleIndexer
name(java.lang.String name)
SimpleIndexer
reporter(aQute.service.reporter.Reporter reporter)
-
-
-
Method Detail
-
files
public SimpleIndexer files(java.util.Collection<java.io.File> files)
Adds files to be indexed.- Parameters:
files
- the files to include in the index
-
base
public SimpleIndexer base(java.net.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(java.lang.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(java.io.OutputStream outputStream) throws java.io.IOException
Generate the index to the specified output stream.- Parameters:
outputStream
- the output stream to write the index file- Throws:
java.io.IOException
- if a file cannot be indexed
-
index
public void index(java.io.File file) throws java.io.IOException
Generate the index to the specified file.- Parameters:
file
- the file to write the index file- Throws:
java.io.IOException
- if a file cannot be indexed
-
getResources
public java.util.List<org.osgi.resource.Resource> getResources()
Return the resources so far.- Returns:
- the set of resources handled so far.
-
reporter
public SimpleIndexer reporter(aQute.service.reporter.Reporter reporter)
-
-