Search in sources :

Example 1 with NullLogService

use of aQute.bnd.deployer.repository.NullLogService in project bnd by bndtools.

the class TestObrCapReqParsing method parseIndex.

private static List<Resource> parseIndex(InputStream stream, URI baseUri) throws Exception {
    ObrContentProvider parser = new ObrContentProvider(new BundleIndexerImpl());
    final List<Resource> resources = new LinkedList<Resource>();
    IRepositoryIndexProcessor processor = new IRepositoryIndexProcessor() {

        public void processResource(Resource resource) {
            resources.add(resource);
        }

        public void processReferral(URI parentUri, Referral referral, int maxDepth, int currentDepth) {
        }
    };
    parser.parseIndex(stream, baseUri, processor, new NullLogService());
    return resources;
}
Also used : Referral(aQute.bnd.deployer.repository.api.Referral) IRepositoryIndexProcessor(aQute.bnd.deployer.repository.api.IRepositoryIndexProcessor) Resource(org.osgi.resource.Resource) NullLogService(aQute.bnd.deployer.repository.NullLogService) URI(java.net.URI) BundleIndexerImpl(org.osgi.impl.bundle.bindex.BundleIndexerImpl) LinkedList(java.util.LinkedList)

Aggregations

NullLogService (aQute.bnd.deployer.repository.NullLogService)1 IRepositoryIndexProcessor (aQute.bnd.deployer.repository.api.IRepositoryIndexProcessor)1 Referral (aQute.bnd.deployer.repository.api.Referral)1 URI (java.net.URI)1 LinkedList (java.util.LinkedList)1 BundleIndexerImpl (org.osgi.impl.bundle.bindex.BundleIndexerImpl)1 Resource (org.osgi.resource.Resource)1