Search in sources :

Example 11 with MimeTypeToTransformerMapper

use of ddf.mime.MimeTypeToTransformerMapper in project ddf by codice.

the class TransformerProducer method process.

/*
     * (non-Javadoc)
     * 
     * @see org.apache.camel.Processor#process(org.apache.camel.Exchange)
     */
public void process(Exchange exchange) throws CatalogTransformerException, MimeTypeParseException, IOException {
    LOGGER.debug("ENTERING: process");
    LOGGER.debug("exchange pattern = {}", exchange.getPattern());
    Message in = exchange.getIn();
    Object metacard = null;
    // Get the MIME Type and ID of the transformer to use to transform the
    // request's payload from the endpoint that manages this producer
    String transformerId = in.getHeader(CatalogComponent.ID_PARAMETER, String.class);
    String mimeType = in.getHeader(CatalogComponent.MIME_TYPE_PARAMETER, String.class);
    if (transformerId != null) {
        LOGGER.debug("transformerId retrieved from message header");
        in.removeHeader(CatalogComponent.ID_PARAMETER);
    } else {
        LOGGER.debug("transformerId retrieved from CamelCatalogEndpoint");
        transformerId = endpoint.getTransformerId();
    }
    LOGGER.debug("transformerId = {}", transformerId);
    if (mimeType != null) {
        in.removeHeader(CatalogComponent.MIME_TYPE_PARAMETER);
    } else {
        LOGGER.debug("MIME Type retrieved from CamelCatalogEndpoint");
        mimeType = endpoint.getMimeType();
    }
    LOGGER.debug("MIME Type = {}", mimeType);
    MimeTypeToTransformerMapper mapper = endpoint.getComponent().getMimeTypeToTransformerMapper();
    if (mapper != null) {
        LOGGER.debug("Got a MimeTypeToTransformerMapper service");
        metacard = transform(in, metacard, mimeType, transformerId, mapper);
    } else {
        LOGGER.debug("Did not find a MimeTypeToTransformerMapper service");
        throw new CatalogTransformerException("Did not find a MimeTypeToTransformerMapper service");
    }
    // Set the response output to the Metacard from the transformation
    exchange.getOut().setBody(metacard);
    LOGGER.debug("EXITING: process");
}
Also used : MimeTypeToTransformerMapper(ddf.mime.MimeTypeToTransformerMapper) Message(org.apache.camel.Message) CatalogTransformerException(ddf.catalog.transform.CatalogTransformerException)

Example 12 with MimeTypeToTransformerMapper

use of ddf.mime.MimeTypeToTransformerMapper in project ddf by codice.

the class CatalogComponentTest method testTransformMetacard.

@Test
public void testTransformMetacard() throws Exception {
    LOGGER.debug("Running testTransformMetacard()");
    MockEndpoint mock = getMockEndpoint("mock:result");
    mock.expectedMinimumMessageCount(1);
    // Mock a XML InputTransformer and register it in the OSGi Registry
    // (PojoSR)
    InputTransformer mockTransformer = getMockInputTransformer();
    Hashtable<String, String> props = new Hashtable<String, String>();
    props.put(MimeTypeToTransformerMapper.ID_KEY, "xml");
    props.put(MimeTypeToTransformerMapper.MIME_TYPE_KEY, "text/xml");
    bundleContext.registerService(InputTransformer.class.getName(), mockTransformer, props);
    // Mock the MimeTypeToTransformerMapper and register it in the OSGi
    // Registry (PojoSR)
    MimeTypeToTransformerMapper matchingService = mock(MimeTypeToTransformerMapper.class);
    // HUGH bundleContext.registerService(
    // MimeTypeToTransformerMapper.class.getName(), matchingService, null );
    catalogComponent.setMimeTypeToTransformerMapper(matchingService);
    // Mock the MimeTypeToTransformerMapper returning the mock XML
    // InputTransformer
    when(matchingService.findMatches(eq(InputTransformer.class), isA(MimeType.class))).thenReturn((List) Arrays.asList(mockTransformer));
    // Send in sample XML as InputStream to InputTransformer
    InputStream input = IOUtils.toInputStream(xmlInput);
    // Get the InputTransformer registered with the ID associated with the
    // <from> node in the Camel route
    InputTransformer transformer = getTransformer("text/xml", "identity");
    assertNotNull("InputTransformer for mimeType=text/xml&id=identity not found", transformer);
    // Transform the XML input into a Metacard
    Metacard metacard = transformer.transform(input);
    assertNotNull(metacard);
    assertMockEndpointsSatisfied();
}
Also used : MimeTypeToTransformerMapper(ddf.mime.MimeTypeToTransformerMapper) Metacard(ddf.catalog.data.Metacard) MockEndpoint(org.apache.camel.component.mock.MockEndpoint) Hashtable(java.util.Hashtable) InputStream(java.io.InputStream) InputTransformer(ddf.catalog.transform.InputTransformer) MimeType(javax.activation.MimeType) Test(org.junit.Test)

Example 13 with MimeTypeToTransformerMapper

use of ddf.mime.MimeTypeToTransformerMapper in project ddf by codice.

the class CatalogFrameworkImplTest method setup.

@Before
public void setup() throws StopProcessingException, PluginExecutionException, URISyntaxException, FederationException, IOException, CatalogTransformerException, InterruptedException {
    System.setProperty("bad.files", "crossdomain.xml,clientaccesspolicy.xml,.htaccess,.htpasswd,hosts,passwd,group,resolv.conf,nfs.conf,ftpd.conf,ntp.conf,web.config,robots.txt");
    System.setProperty("bad.file.extensions", ".exe,.jsp,.html,.js,.php,.phtml,.php3,.php4,.php5,.phps,.shtml,.jhtml,.pl,.py,.cgi,.msi,.com,.scr,.gadget,.application,.pif,.hta,.cpl,.msc,.jar,.kar,.bat,.cmd,.vb,.vbs,.vbe,.jse,.ws,.wsf,.wsc,.wsh,.ps1,.ps1xml,.ps2,.ps2xml,.psc1,.psc2,.msh,.msh1,.msh2,.mshxml,.msh1xml,.msh2xml,.scf,.lnk,.inf,.reg,.dll,.vxd,.cpl,.cfg,.config,.crt,.cert,.pem,.jks,.p12,.p7b,.key,.der,.csr,.jsb,.mhtml,.mht,.xhtml,.xht");
    System.setProperty("bad.mime.types", "text/html,text/javascript,text/x-javascript,application/x-shellscript,text/scriptlet,application/x-msdownload,application/x-msmetafile");
    // Setup
    /*
         * Prepare to capture the ResourceResponse argument passed into
         * PostResourcePlugin.process(). We will verify that it contains a non-null ResourceRequest
         * in the verification section of this test.
         */
    argument = ArgumentCaptor.forClass(ResourceResponse.class);
    Resource mockResource = mock(Resource.class);
    mockResourceRequest = mock(ResourceRequest.class);
    when(mockResourceRequest.getAttributeValue()).thenReturn(new URI("myURI"));
    when(mockResourceRequest.getAttributeName()).thenReturn(new String("myName"));
    mockResourceResponse = mock(ResourceResponse.class);
    when(mockResourceResponse.getRequest()).thenReturn(mockResourceRequest);
    when(mockResourceResponse.getResource()).thenReturn(mockResource);
    mockPostResourcePlugin = mock(PostResourcePlugin.class);
    /*
         * We verify (see verification section of test) that PostResourcePlugin.process() receives a
         * ResourceResponse with a non-null ResourceRequest. We assume that it works correctly and
         * returns a ResourceResponse with a non-null ResourceRequest, so we return our
         * mockResouceResponse that contains a non-null ResourceRequest.
         */
    when(mockPostResourcePlugin.process(isA(ResourceResponse.class))).thenReturn(mockResourceResponse);
    List<PostResourcePlugin> mockPostResourcePlugins = new ArrayList<PostResourcePlugin>();
    mockPostResourcePlugins.add(mockPostResourcePlugin);
    eventAdmin = new MockEventProcessor();
    provider = new MockMemoryProvider("Provider", "Provider", "v1.0", "DDF", new HashSet<>(), true, new Date());
    storageProvider = new MockMemoryStorageProvider();
    // Mock register the provider in the container
    // Mock the source poller
    SourcePoller mockPoller = mock(SourcePoller.class);
    when(mockPoller.getCachedSource(isA(Source.class))).thenReturn(null);
    ArrayList<PostIngestPlugin> postIngestPlugins = new ArrayList<PostIngestPlugin>();
    postIngestPlugins.add(eventAdmin);
    mockFederationStrategy = mock(FederationStrategy.class);
    Result mockFederationResult = mock(Result.class);
    when(mockFederationResult.getMetacard()).thenReturn(new MetacardImpl());
    QueryRequest mockQueryRequest = mock(QueryRequest.class);
    Query mockQuery = mock(Query.class);
    when(mockQuery.getTimeoutMillis()).thenReturn(1L);
    when(mockQueryRequest.getQuery()).thenReturn(mockQuery);
    QueryResponseImpl queryResponse = new QueryResponseImpl(mockQueryRequest, Collections.singletonList(mockFederationResult), 1);
    when(mockFederationStrategy.federate(anyList(), anyObject())).thenReturn(queryResponse);
    federatedSources = createDefaultFederatedSourceList(true);
    MimeTypeResolver mimeTypeResolver = mock(MimeTypeResolver.class);
    MimeTypeToTransformerMapper mimeTypeToTransformerMapper = mock(MimeTypeToTransformerMapper.class);
    InputTransformer inputTransformer = mock(InputTransformer.class);
    when(inputTransformer.transform(any(InputStream.class))).thenReturn(new MetacardImpl());
    when(mimeTypeToTransformerMapper.findMatches(any(Class.class), any(MimeType.class))).thenReturn(Collections.singletonList(inputTransformer));
    mockRemoteDeleteOperations = mock(RemoteDeleteOperations.class);
    FrameworkProperties frameworkProperties = new FrameworkProperties();
    frameworkProperties.setAccessPlugins(new ArrayList<>());
    frameworkProperties.setPolicyPlugins(new ArrayList<>());
    frameworkProperties.setSourcePoller(mockPoller);
    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);
    frameworkProperties.setValidationQueryFactory(new ValidationQueryFactory(new GeotoolsFilterAdapterImpl(), new GeotoolsFilterBuilder()));
    Map<String, FederatedSource> federatedSourceMap = new HashMap<>();
    if (federatedSources != null) {
        for (FederatedSource source : federatedSources) {
            federatedSourceMap.put(source.getId(), source);
        }
    }
    SourcePollerRunner runner = new SourcePollerRunner();
    SourcePoller poller = new SourcePoller(runner);
    for (FederatedSource source : federatedSources) {
        runner.bind(source);
    }
    runner.bind(provider);
    int wait = 0;
    while (wait < 5) {
        for (FederatedSource source : federatedSources) {
            CachedSource cachedSource = poller.getCachedSource(source);
            if (cachedSource == null || !cachedSource.isAvailable()) {
                Thread.sleep(100);
                wait++;
                break;
            }
        }
        CachedSource cachedProvider = poller.getCachedSource(provider);
        if (cachedProvider == null || !cachedProvider.isAvailable()) {
            Thread.sleep(100);
        }
        wait++;
    }
    frameworkProperties.setSourcePoller(poller);
    frameworkProperties.setFederatedSources(federatedSourceMap);
    defaultAttributeValueRegistry = new DefaultAttributeValueRegistryImpl();
    frameworkProperties.setDefaultAttributeValueRegistry(defaultAttributeValueRegistry);
    attributeInjector = spy(new AttributeInjectorImpl(new AttributeRegistryImpl()));
    frameworkProperties.setAttributeInjectors(Collections.singletonList(attributeInjector));
    uuidGenerator = mock(UuidGenerator.class);
    when(uuidGenerator.generateUuid()).thenReturn(UUID.randomUUID().toString());
    OperationsSecuritySupport opsSecurity = new OperationsSecuritySupport();
    MetacardFactory metacardFactory = new MetacardFactory(mimeTypeToTransformerMapper, uuidGenerator);
    OperationsMetacardSupport opsMetacard = new OperationsMetacardSupport(frameworkProperties, metacardFactory);
    SourceOperations sourceOperations = new SourceOperations(frameworkProperties);
    TransformOperations transformOperations = new TransformOperations(frameworkProperties);
    Historian historian = new Historian();
    historian.setHistoryEnabled(false);
    QueryOperations queryOperations = new QueryOperations(frameworkProperties, sourceOperations, opsSecurity, opsMetacard);
    OperationsStorageSupport opsStorage = new OperationsStorageSupport(sourceOperations, queryOperations);
    opsStorage.setHistorian(historian);
    OperationsCatalogStoreSupport opsCatStore = new OperationsCatalogStoreSupport(frameworkProperties, sourceOperations);
    CreateOperations createOperations = new CreateOperations(frameworkProperties, queryOperations, sourceOperations, opsSecurity, opsMetacard, opsCatStore, opsStorage);
    UpdateOperations updateOperations = new UpdateOperations(frameworkProperties, queryOperations, sourceOperations, opsSecurity, opsMetacard, opsCatStore, opsStorage);
    deleteOperations = new DeleteOperations(frameworkProperties, queryOperations, sourceOperations, opsSecurity, opsMetacard);
    deleteOperations.setOpsCatStoreSupport(opsCatStore);
    ResourceOperations resOps = new ResourceOperations(frameworkProperties, queryOperations, opsSecurity) {

        @Override
        protected ResourceInfo getResourceInfo(ResourceRequest resourceRequest, String site, boolean isEnterprise, StringBuilder federatedSite, Map<String, Serializable> requestProperties, boolean fanoutEnabled) throws ResourceNotSupportedException, ResourceNotFoundException {
            URI uri = null;
            Metacard metacard = new MetacardImpl();
            try {
                uri = new URI("myURI");
            } catch (URISyntaxException e) {
            }
            return new ResourceInfo(metacard, uri);
        }
    };
    updateOperations.setHistorian(historian);
    deleteOperations.setHistorian(historian);
    framework = new CatalogFrameworkImpl(createOperations, updateOperations, deleteOperations, queryOperations, resOps, sourceOperations, transformOperations);
    // Conditionally bind objects if framework properties are setup
    if (!CollectionUtils.isEmpty(frameworkProperties.getCatalogProviders())) {
        sourceOperations.bind(provider);
    }
    sourceOperations.bind(storageProvider);
    resourceFramework = new CatalogFrameworkImpl(createOperations, updateOperations, deleteOperations, queryOperations, resOps, sourceOperations, transformOperations);
    // Conditionally bind objects if framework properties are setup
    if (!CollectionUtils.isEmpty(frameworkProperties.getCatalogProviders())) {
        sourceOperations.bind(provider);
    }
    sourceOperations.bind(storageProvider);
    ThreadContext.bind(mock(Subject.class));
}
Also used : OperationsCatalogStoreSupport(ddf.catalog.impl.operations.OperationsCatalogStoreSupport) UuidGenerator(org.codice.ddf.platform.util.uuidgenerator.UuidGenerator) Query(ddf.catalog.operation.Query) HashMap(java.util.HashMap) MockMemoryStorageProvider(ddf.catalog.content.impl.MockMemoryStorageProvider) ArrayList(java.util.ArrayList) Matchers.anyString(org.mockito.Matchers.anyString) InputTransformer(ddf.catalog.transform.InputTransformer) RemoteDeleteOperations(ddf.catalog.impl.operations.RemoteDeleteOperations) Result(ddf.catalog.data.Result) MetacardFactory(ddf.catalog.impl.operations.MetacardFactory) SourcePollerRunner(ddf.catalog.util.impl.SourcePollerRunner) HashSet(java.util.HashSet) DefaultAttributeValueRegistryImpl(ddf.catalog.data.defaultvalues.DefaultAttributeValueRegistryImpl) SourceOperations(ddf.catalog.impl.operations.SourceOperations) FederationStrategy(ddf.catalog.federation.FederationStrategy) ResourceOperations(ddf.catalog.impl.operations.ResourceOperations) Resource(ddf.catalog.resource.Resource) MimeTypeMapperImpl(ddf.mime.mapper.MimeTypeMapperImpl) MetacardImpl(ddf.catalog.data.impl.MetacardImpl) FederatedSource(ddf.catalog.source.FederatedSource) Metacard(ddf.catalog.data.Metacard) ResourceResponse(ddf.catalog.operation.ResourceResponse) UpdateOperations(ddf.catalog.impl.operations.UpdateOperations) ResourceRequest(ddf.catalog.operation.ResourceRequest) GeotoolsFilterAdapterImpl(ddf.catalog.filter.proxy.adapter.GeotoolsFilterAdapterImpl) Map(java.util.Map) Matchers.anyMap(org.mockito.Matchers.anyMap) HashMap(java.util.HashMap) MimeTypeToTransformerMapper(ddf.mime.MimeTypeToTransformerMapper) PostResourcePlugin(ddf.catalog.plugin.PostResourcePlugin) AttributeRegistryImpl(ddf.catalog.data.impl.AttributeRegistryImpl) RemoteDeleteOperations(ddf.catalog.impl.operations.RemoteDeleteOperations) DeleteOperations(ddf.catalog.impl.operations.DeleteOperations) URISyntaxException(java.net.URISyntaxException) URI(java.net.URI) Source(ddf.catalog.source.Source) ByteSource(com.google.common.io.ByteSource) CachedSource(ddf.catalog.util.impl.CachedSource) FederatedSource(ddf.catalog.source.FederatedSource) MimeType(javax.activation.MimeType) SourcePoller(ddf.catalog.util.impl.SourcePoller) PostIngestPlugin(ddf.catalog.plugin.PostIngestPlugin) MimeTypeResolver(ddf.mime.MimeTypeResolver) OperationsStorageSupport(ddf.catalog.impl.operations.OperationsStorageSupport) GeotoolsFilterBuilder(ddf.catalog.filter.proxy.builder.GeotoolsFilterBuilder) Historian(ddf.catalog.history.Historian) QueryRequest(ddf.catalog.operation.QueryRequest) ByteArrayInputStream(java.io.ByteArrayInputStream) InputStream(java.io.InputStream) CachedSource(ddf.catalog.util.impl.CachedSource) ValidationQueryFactory(ddf.catalog.cache.solr.impl.ValidationQueryFactory) TransformOperations(ddf.catalog.impl.operations.TransformOperations) Date(java.util.Date) Subject(ddf.security.Subject) AttributeInjectorImpl(ddf.catalog.data.inject.AttributeInjectorImpl) QueryResponseImpl(ddf.catalog.operation.impl.QueryResponseImpl) CatalogProvider(ddf.catalog.source.CatalogProvider) QueryOperations(ddf.catalog.impl.operations.QueryOperations) OperationsSecuritySupport(ddf.catalog.impl.operations.OperationsSecuritySupport) CreateOperations(ddf.catalog.impl.operations.CreateOperations) OperationsMetacardSupport(ddf.catalog.impl.operations.OperationsMetacardSupport) Before(org.junit.Before)

Example 14 with MimeTypeToTransformerMapper

use of ddf.mime.MimeTypeToTransformerMapper in project ddf by codice.

the class TestRestEndpoint method addMatchingService.

private MimeTypeToTransformerMapper addMatchingService(RESTEndpoint rest, List<InputTransformer> sortedListOfTransformers) {
    MimeTypeToTransformerMapper matchingService = mock(MimeTypeToTransformerMapper.class);
    when(matchingService.findMatches(eq(InputTransformer.class), isA(MimeType.class))).thenReturn((List) sortedListOfTransformers);
    rest.setMimeTypeToTransformerMapper(matchingService);
    return matchingService;
}
Also used : MimeTypeToTransformerMapper(ddf.mime.MimeTypeToTransformerMapper) InputTransformer(ddf.catalog.transform.InputTransformer) MimeType(javax.activation.MimeType)

Example 15 with MimeTypeToTransformerMapper

use of ddf.mime.MimeTypeToTransformerMapper in project ddf by codice.

the class FanoutCatalogFrameworkTest method testBlacklistedTagCreateStorageRequestFails.

@Test(expected = IngestException.class)
public void testBlacklistedTagCreateStorageRequestFails() throws Exception {
    Metacard metacard = new MetacardImpl();
    metacard.setAttribute(new AttributeImpl(Metacard.TAGS, "blacklisted"));
    CatalogProvider catalogProvider = mock(CatalogProvider.class);
    doReturn(true).when(catalogProvider).isAvailable();
    StorageProvider storageProvider = new MockMemoryStorageProvider();
    MimeTypeMapper mimeTypeMapper = mock(MimeTypeMapper.class);
    doReturn("extension").when(mimeTypeMapper).getFileExtensionForMimeType(anyString());
    InputTransformer transformer = mock(InputTransformer.class);
    doReturn(metacard).when(transformer).transform(any(InputStream.class));
    MimeTypeToTransformerMapper mimeTypeToTransformerMapper = mock(MimeTypeToTransformerMapper.class);
    doReturn(Collections.singletonList(transformer)).when(mimeTypeToTransformerMapper).findMatches(any(Class.class), any(MimeType.class));
    frameworkProperties.setCatalogProviders(Collections.singletonList(catalogProvider));
    frameworkProperties.setStorageProviders(Collections.singletonList(storageProvider));
    frameworkProperties.setMimeTypeMapper(mimeTypeMapper);
    frameworkProperties.setMimeTypeToTransformerMapper(mimeTypeToTransformerMapper);
    OperationsSecuritySupport opsSecurity = new OperationsSecuritySupport();
    MetacardFactory metacardFactory = new MetacardFactory(frameworkProperties.getMimeTypeToTransformerMapper(), uuidGenerator);
    OperationsMetacardSupport opsMetacard = new OperationsMetacardSupport(frameworkProperties, metacardFactory);
    SourceOperations sourceOperations = new SourceOperations(frameworkProperties);
    sourceOperations.bind(catalogProvider);
    sourceOperations.bind(storageProvider);
    TransformOperations transformOperations = new TransformOperations(frameworkProperties);
    QueryOperations queryOperations = new QueryOperations(frameworkProperties, sourceOperations, opsSecurity, opsMetacard);
    OperationsCatalogStoreSupport opsCatStore = new OperationsCatalogStoreSupport(frameworkProperties, sourceOperations);
    OperationsStorageSupport opsStorage = new OperationsStorageSupport(sourceOperations, queryOperations);
    ResourceOperations resourceOperations = new ResourceOperations(frameworkProperties, queryOperations, opsSecurity);
    OperationsMetacardSupport opsMetacardSupport = new OperationsMetacardSupport(frameworkProperties, metacardFactory);
    // Need to set these for InputValidation to work
    System.setProperty("bad.files", "none");
    System.setProperty("bad.file.extensions", "none");
    System.setProperty("bad.mime.types", "none");
    CreateOperations createOperations = new CreateOperations(frameworkProperties, queryOperations, sourceOperations, opsSecurity, opsMetacardSupport, opsCatStore, opsStorage);
    framework = new CatalogFrameworkImpl(createOperations, null, null, queryOperations, resourceOperations, sourceOperations, transformOperations);
    framework.setId(NEW_SOURCE_ID);
    framework.setFanoutEnabled(true);
    framework.setFanoutTagBlacklist(Collections.singletonList("blacklisted"));
    ContentItem item = new ContentItemImpl(uuidGenerator.generateUuid(), ByteSource.empty(), "text/xml", "filename.xml", 0L, metacard);
    CreateStorageRequest request = new CreateStorageRequestImpl(Collections.singletonList(item), new HashMap<>());
    framework.create(request);
}
Also used : MimeTypeToTransformerMapper(ddf.mime.MimeTypeToTransformerMapper) OperationsCatalogStoreSupport(ddf.catalog.impl.operations.OperationsCatalogStoreSupport) MimeTypeMapper(ddf.mime.MimeTypeMapper) AttributeImpl(ddf.catalog.data.impl.AttributeImpl) MockMemoryStorageProvider(ddf.catalog.content.impl.MockMemoryStorageProvider) InputTransformer(ddf.catalog.transform.InputTransformer) MimeType(javax.activation.MimeType) MetacardFactory(ddf.catalog.impl.operations.MetacardFactory) OperationsStorageSupport(ddf.catalog.impl.operations.OperationsStorageSupport) CreateStorageRequestImpl(ddf.catalog.content.operation.impl.CreateStorageRequestImpl) SourceOperations(ddf.catalog.impl.operations.SourceOperations) InputStream(java.io.InputStream) ResourceOperations(ddf.catalog.impl.operations.ResourceOperations) StorageProvider(ddf.catalog.content.StorageProvider) MockMemoryStorageProvider(ddf.catalog.content.impl.MockMemoryStorageProvider) TransformOperations(ddf.catalog.impl.operations.TransformOperations) MetacardImpl(ddf.catalog.data.impl.MetacardImpl) Metacard(ddf.catalog.data.Metacard) CatalogProvider(ddf.catalog.source.CatalogProvider) QueryOperations(ddf.catalog.impl.operations.QueryOperations) OperationsSecuritySupport(ddf.catalog.impl.operations.OperationsSecuritySupport) CreateOperations(ddf.catalog.impl.operations.CreateOperations) OperationsMetacardSupport(ddf.catalog.impl.operations.OperationsMetacardSupport) ContentItem(ddf.catalog.content.data.ContentItem) ContentItemImpl(ddf.catalog.content.data.impl.ContentItemImpl) CreateStorageRequest(ddf.catalog.content.operation.CreateStorageRequest) Test(org.junit.Test)

Aggregations

MimeTypeToTransformerMapper (ddf.mime.MimeTypeToTransformerMapper)22 MimeType (javax.activation.MimeType)18 Test (org.junit.Test)18 BundleContext (org.osgi.framework.BundleContext)15 ServiceReference (org.osgi.framework.ServiceReference)14 InputTransformer (ddf.catalog.transform.InputTransformer)6 InputStream (java.io.InputStream)5 MockMemoryStorageProvider (ddf.catalog.content.impl.MockMemoryStorageProvider)3 Metacard (ddf.catalog.data.Metacard)3 MetacardImpl (ddf.catalog.data.impl.MetacardImpl)3 CatalogProvider (ddf.catalog.source.CatalogProvider)3 FederationStrategy (ddf.catalog.federation.FederationStrategy)2 CreateOperations (ddf.catalog.impl.operations.CreateOperations)2 MetacardFactory (ddf.catalog.impl.operations.MetacardFactory)2 OperationsCatalogStoreSupport (ddf.catalog.impl.operations.OperationsCatalogStoreSupport)2 OperationsMetacardSupport (ddf.catalog.impl.operations.OperationsMetacardSupport)2 OperationsSecuritySupport (ddf.catalog.impl.operations.OperationsSecuritySupport)2 OperationsStorageSupport (ddf.catalog.impl.operations.OperationsStorageSupport)2 QueryOperations (ddf.catalog.impl.operations.QueryOperations)2 ResourceOperations (ddf.catalog.impl.operations.ResourceOperations)2