org.osgi.service.indexer
public interface ResourceIndexer
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
LICENSE_URL
Name of the configuration variable for the license URL of the repository
|
static java.lang.String |
PRETTY
Name of the configuration variable to enable pretty-printing:
non-gzipped, indented XML
|
static java.lang.String |
REPOSITORY_NAME
Name of the configuration variable for the repository name
|
static java.lang.String |
REPOSITORYNAME_DEFAULT
the default repository name
|
static java.lang.String |
ROOT_URL
Name of the configuration variable for the root (directory) URL of the
repository
|
static java.lang.String |
STYLESHEET
Name of the configuration variable for the stylesheet of the XML
representation
|
static java.lang.String |
STYLESHEET_DEFAULT
the default stylesheet for the XML representation
|
static java.lang.String |
URL_TEMPLATE
Name of the configuration variable for the template for the URLs in the
XML representation.
|
static java.lang.String |
VERBOSE
Name of the configuration variable for the verbose mode
|
| Modifier and Type | Method and Description |
|---|---|
void |
index(java.util.Set<java.io.File> files,
java.io.OutputStream out,
java.util.Map<java.lang.String,java.lang.String> config)
Index a set of input files and write the Repository XML representation to
the stream
|
void |
indexFragment(java.util.Set<java.io.File> files,
java.io.Writer out,
java.util.Map<java.lang.String,java.lang.String> config)
Index a set of input files and write a Repository XML fragment to the
given writer.
|
static final java.lang.String PRETTY
static final java.lang.String REPOSITORYNAME_DEFAULT
static final java.lang.String REPOSITORY_NAME
static final java.lang.String STYLESHEET_DEFAULT
static final java.lang.String STYLESHEET
static final java.lang.String URL_TEMPLATE
static final java.lang.String ROOT_URL
static final java.lang.String LICENSE_URL
static final java.lang.String VERBOSE
void index(java.util.Set<java.io.File> files,
java.io.OutputStream out,
java.util.Map<java.lang.String,java.lang.String> config)
throws java.lang.Exception
files - a set of input filesout - the stream to write the XML representation toconfig - a set of optional parameters (use the interface constants as
keys)java.lang.Exception - in case of an errorvoid indexFragment(java.util.Set<java.io.File> files,
java.io.Writer out,
java.util.Map<java.lang.String,java.lang.String> config)
throws java.lang.Exception
Index a set of input files and write a Repository XML fragment to the given writer.
Note that the result will be one or more XML resource
elements without a top-level surrounding repository
element. The resulting XML is therefore not well-formed.
This method may be useful for repository managers that wish to (re-)index individual resources and assemble the XML fragments into a complete repository document later.
files - a set of input filesout - the writer to write the Repository XML representation toconfig - a set of optional parameter (use the interface constants as
keys)java.lang.Exception - in case of an error