use of ddf.mime.mapper.MimeTypeMapperImpl in project ddf by codice.
the class URLResourceReaderTest method setUp.
@Before
public void setUp() {
MimeTypeResolver tikaResolver = new TikaMimeTypeResolver();
this.customResolver = new CustomMimeTypeResolver();
List<MimeTypeResolver> resolvers = new ArrayList<MimeTypeResolver>();
resolvers.add(tikaResolver);
resolvers.add(this.customResolver);
this.mimeTypeMapper = new MimeTypeMapperImpl(resolvers);
this.clientBuilderFactory = new ClientBuilderFactoryImpl();
}
use of ddf.mime.mapper.MimeTypeMapperImpl in project ddf by codice.
the class ResourceOperationsOptionsTest method setUpFrameworkProperties.
private void setUpFrameworkProperties() {
frameworkProperties = new FrameworkProperties();
frameworkProperties.setAccessPlugins(new ArrayList<>());
frameworkProperties.setPolicyPlugins(new ArrayList<>());
frameworkProperties.setPostResource(mockPostResourcePlugins);
frameworkProperties.setFederationStrategy(mockFederationStrategy);
frameworkProperties.setFilterBuilder(new GeotoolsFilterBuilder());
frameworkProperties.setPreIngest(new ArrayList<>());
frameworkProperties.setPostIngest(postIngestPlugins);
frameworkProperties.setPreQuery(new ArrayList<>());
frameworkProperties.setPostQuery(new ArrayList<>());
frameworkProperties.setPreResource(new ArrayList<>());
frameworkProperties.setPostResource(new ArrayList<>());
frameworkProperties.setQueryResponsePostProcessor(mock(QueryResponsePostProcessor.class));
frameworkProperties.setStorageProviders(Collections.singletonList(storageProvider));
frameworkProperties.setMimeTypeMapper(new MimeTypeMapperImpl(Collections.singletonList(mimeTypeResolver)));
frameworkProperties.setMimeTypeToTransformerMapper(mimeTypeToTransformerMapper);
}
use of ddf.mime.mapper.MimeTypeMapperImpl in project ddf by codice.
the class RemoteDeleteOperationsTest method setUpFrameworkProperties.
private void setUpFrameworkProperties() {
frameworkProperties = new FrameworkProperties();
frameworkProperties.setAccessPlugins(new ArrayList<>());
frameworkProperties.setPolicyPlugins(new ArrayList<>());
frameworkProperties.setCatalogProviders(Collections.singletonList((CatalogProvider) provider));
frameworkProperties.setPostResource(mockPostResourcePlugins);
frameworkProperties.setFederationStrategy(mockFederationStrategy);
frameworkProperties.setFilterBuilder(new GeotoolsFilterBuilder());
frameworkProperties.setPreIngest(new ArrayList<>());
frameworkProperties.setPostIngest(postIngestPlugins);
frameworkProperties.setPreQuery(new ArrayList<>());
frameworkProperties.setPostQuery(new ArrayList<>());
frameworkProperties.setPreResource(new ArrayList<>());
frameworkProperties.setPostResource(new ArrayList<>());
frameworkProperties.setQueryResponsePostProcessor(mock(QueryResponsePostProcessor.class));
frameworkProperties.setStorageProviders(Collections.singletonList(storageProvider));
frameworkProperties.setMimeTypeMapper(new MimeTypeMapperImpl(Collections.singletonList(mimeTypeResolver)));
frameworkProperties.setMimeTypeToTransformerMapper(mimeTypeToTransformerMapper);
}
use of ddf.mime.mapper.MimeTypeMapperImpl in project ddf by codice.
the class FileSystemStorageProviderTest method setUp.
@Before
public void setUp() throws IOException {
baseDir = temporaryFolder.getRoot().getAbsolutePath();
baseTmpDir = temporaryFolder.newFolder(FileSystemStorageProvider.DEFAULT_TMP).getAbsolutePath();
String keysetHome = temporaryFolder.newFolder("keysets").getAbsolutePath();
String associatedDataHome = temporaryFolder.newFolder("etc").getAbsolutePath();
System.setProperty(SecurityConstants.KEYSET_DIR, keysetHome);
System.setProperty(SecurityConstants.ASSOCIATED_DATA_PATH, associatedDataHome.concat("/associatedData.properties"));
MimeTypeResolver resolver = new MockMimeTypeResolver();
MimeTypeMapper mapper = new MimeTypeMapperImpl(Collections.singletonList(resolver));
this.provider = new FileSystemStorageProvider();
try {
provider.setBaseContentDirectory(baseDir);
} catch (IOException e) {
fail(e.getMessage());
}
provider.setMimeTypeMapper(mapper);
}
use of ddf.mime.mapper.MimeTypeMapperImpl in project ddf by codice.
the class ResourceReaderTest method setUp.
@Before
public void setUp() {
MimeTypeResolver tikaResolver = new TikaMimeTypeResolver();
this.customResolver = new CustomMimeTypeResolver();
List<MimeTypeResolver> resolvers = new ArrayList<MimeTypeResolver>();
resolvers.add(tikaResolver);
resolvers.add(this.customResolver);
this.mimeTypeMapper = new MimeTypeMapperImpl(resolvers);
}
Aggregations