Search in sources :

Example 1 with SupportedTypeRepository

use of org.n52.iceland.coding.SupportedTypeRepository in project SOS by 52North.

the class InMemoryCacheImplTest method initInstance.

@Before
public void initInstance() {
    // overwrite these methods as these are doing getInstance()-calls
    instance = new InMemoryCacheImpl() {

        private static final long serialVersionUID = -2571450058666530166L;

        @Override
        public Set<String> getFeatureOfInterestTypes() {
            return Collections.emptySet();
        }

        @Override
        public Set<String> getObservationTypes() {
            return Collections.emptySet();
        }
    };
    SupportedTypeRepository supportedTypeRepository = new SupportedTypeRepository();
    supportedTypeRepository.init(new DecoderRepository(), new EncoderRepository());
    instance.setSupportedTypeRepository(supportedTypeRepository);
}
Also used : Set(java.util.Set) EncoderRepository(org.n52.svalbard.encode.EncoderRepository) DecoderRepository(org.n52.svalbard.decode.DecoderRepository) SupportedTypeRepository(org.n52.iceland.coding.SupportedTypeRepository) Before(org.junit.Before)

Example 2 with SupportedTypeRepository

use of org.n52.iceland.coding.SupportedTypeRepository in project SOS by 52North.

the class SosCacheFeederDAOTest method updateCacheFillsCapabilitiesCache.

@Test
public void updateCacheFillsCapabilitiesCache() throws OwsExceptionReport {
    SosWritableContentCache cache = (InMemoryCacheImpl) new InMemoryCacheImpl().setSupportedTypeRepository(new SupportedTypeRepository());
    instance.updateCache(cache);
    testCacheResult(cache);
}
Also used : InMemoryCacheImpl(org.n52.sos.cache.InMemoryCacheImpl) SosWritableContentCache(org.n52.sos.cache.SosWritableContentCache) SupportedTypeRepository(org.n52.iceland.coding.SupportedTypeRepository) Test(org.junit.Test)

Example 3 with SupportedTypeRepository

use of org.n52.iceland.coding.SupportedTypeRepository in project SOS by 52North.

the class CompleteCacheUpdate method execute.

@Override
public void execute() {
    try {
        SosWritableContentCache cache = (SosWritableContentCache) new InMemoryCacheImpl().setSupportedTypeRepository(supportedTypeRepository);
        getCacheFeederDAO().updateCache(cache);
        setCache(cache);
    } catch (OwsExceptionReport ex) {
        fail(ex);
    }
}
Also used : InMemoryCacheImpl(org.n52.sos.cache.InMemoryCacheImpl) SosWritableContentCache(org.n52.sos.cache.SosWritableContentCache) OwsExceptionReport(org.n52.shetland.ogc.ows.exception.OwsExceptionReport)

Aggregations

SupportedTypeRepository (org.n52.iceland.coding.SupportedTypeRepository)2 InMemoryCacheImpl (org.n52.sos.cache.InMemoryCacheImpl)2 SosWritableContentCache (org.n52.sos.cache.SosWritableContentCache)2 Set (java.util.Set)1 Before (org.junit.Before)1 Test (org.junit.Test)1 OwsExceptionReport (org.n52.shetland.ogc.ows.exception.OwsExceptionReport)1 DecoderRepository (org.n52.svalbard.decode.DecoderRepository)1 EncoderRepository (org.n52.svalbard.encode.EncoderRepository)1