Package aQute.bnd.osgi.repository
Class SimpleIndexer
java.lang.Object
aQute.bnd.osgi.repository.SimpleIndexer
Simple program to generate an index from a set of bundles.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
A functional interface providing an entry point for performing additional analysis of indexed files. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionanalyzer
(SimpleIndexer.FileAnalyzer analyzer) compress
(boolean compress) files
(Collection<File> files) Adds files to be indexed.List<org.osgi.resource.Resource>
Return the resources so far.increment
(long increment) void
Generate the index to the specified file.void
index
(OutputStream outputStream) Generate the index to the specified output stream.private org.osgi.resource.Resource
private URI
relativize
(File file) private XMLResourceGenerator
-
Field Details
-
files
-
base
-
compress
private boolean compress -
name
-
increment
private long increment -
analyzer
-
reporter
-
-
Constructor Details
-
SimpleIndexer
public SimpleIndexer()
-
-
Method Details
-
files
Adds files to be indexed.- Parameters:
files
- the files to include in the index
-
base
- Parameters:
base
- the base URI from which the index urls are relative
-
compress
- Parameters:
compress
- compress with GZIP when true
-
name
- Parameters:
name
- an optional name for the index
-
analyzer
- Parameters:
analyzer
- a resource analyzer
-
increment
- Parameters:
increment
- the timestamp of the index
-
index
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
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
Return the resources so far.- Returns:
- the set of resources handled so far.
-
reporter
-
repository
-
indexFile
-
relativize
-