org.apache.felix.utils.repository

## Class JsonRepository

- java.lang.Object
- - org.apache.felix.utils.repository.BaseRepository
  - - org.apache.felix.utils.repository.JsonRepository

All Implemented Interfaces:
  org.osgi.service.repository.Repository

    public class JsonRepository
    extends BaseRepository

Repository using a JSON representation of resource metadata. The json should be a map: the key is the resource uri and the value is a map of resource headers. The content of the URL can be gzipped.

### Field Summary

### Fields inherited from class org.apache.felix.utils.repository.BaseRepository

`capSets, resources`

### Fields inherited from interface org.osgi.service.repository.Repository

`URL`

### Constructor Summary

Constructors
Constructor and Description
`JsonRepository(String url, long expiration)`

### Method Summary

All Methods Instance Methods Concrete Methods
`protected void` `buildResource(String uri, Map<String,String> headerMap)`
`protected void` `checkAndLoadCache()`
`protected boolean` `doRead(InputStream is)`
`Map<org.osgi.resource.Requirement,Collection<org.osgi.resource.Capability>>` `findProviders(Collection<? extends org.osgi.resource.Requirement> requirements)`
`List<org.osgi.resource.Resource>` `getResources()`

### Methods inherited from class org.apache.felix.utils.repository.BaseRepository

`addResource`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### JsonRepository

    public JsonRepository(String url,
                          long expiration)

### Method Detail

#### getResources

    public List<org.osgi.resource.Resource> getResources()

Overrides:
  `getResources` in class `BaseRepository`

#### findProviders

    public Map<org.osgi.resource.Requirement,Collection<org.osgi.resource.Capability>> findProviders(Collection<? extends org.osgi.resource.Requirement> requirements)

Specified by:
  `findProviders` in interface `org.osgi.service.repository.Repository`
Overrides:
  `findProviders` in class `BaseRepository`

#### checkAndLoadCache

    protected void checkAndLoadCache()

#### doRead

    protected boolean doRead(InputStream is)
                      throws IOException

Throws:
  `IOException`

#### buildResource

    protected void buildResource(String uri,
                                 Map<String,String> headerMap)
                          throws IOException

Throws:
  `IOException`