Examples of Importer


Examples of org.apache.jackrabbit.vault.fs.io.Importer

        WorkspaceFilter filter = archive.getMetaInf().getFilter();
        for (PathFilterSet pathFilterSet : filter.getFilterSets()) {
            pathFilterSet.setRoot(TEST_ROOT + pathFilterSet.getRoot());
        }
        opts.setFilter(filter);
        Importer importer = new Importer(opts);
        importer.run(archive, rootNode);

        assertNodeExists(TEST_ROOT + "/tmp/foo/bar/tobi");
    }
View Full Code Here

Examples of org.apache.jackrabbit.vault.fs.io.Importer

        admin.save();

        archive.open(true);
        Node rootNode = admin.getNode(TEST_ROOT);
        ImportOptions opts = getDefaultOptions();
        Importer importer = new Importer(opts);
        importer.run(archive, rootNode);

        assertNodeExists(TEST_ROOT);
    }
View Full Code Here

Examples of org.apache.sqoop.job.etl.Importer

    SubmissionRequest request = executionEngine.createSubmissionRequest();
    ImportJobConfiguration jobConf = new ImportJobConfiguration();
    jobConf.output.outputFormat = OutputFormat.TEXT_FILE;
    jobConf.output.compression = comprssionFormat;
    request.setConfigFrameworkJob(jobConf);
    request.setConnectorCallbacks(new Importer(Initializer.class,
      Partitioner.class, Extractor.class, Destroyer.class) {
    });
    executionEngine.prepareImportSubmission(request);

    MutableMapContext context = request.getFrameworkContext();
View Full Code Here

Examples of org.apache.sqoop.job.etl.Importer

    request.setOutputFormatClass(SqoopFileOutputFormat.class);
    request.setOutputKeyClass(Data.class);
    request.setOutputValueClass(NullWritable.class);

    Importer importer = (Importer)request.getConnectorCallbacks();

    // Set up framework context
    MutableMapContext context = request.getFrameworkContext();
    context.setString(JobConstants.JOB_ETL_PARTITIONER, importer.getPartitioner().getName());
    context.setString(JobConstants.JOB_ETL_EXTRACTOR, importer.getExtractor().getName());
    context.setString(JobConstants.JOB_ETL_DESTROYER, importer.getDestroyer().getName());

    if(request.getExtractors() != null) {
      context.setInteger(JobConstants.JOB_ETL_EXTRACTOR_NUM, request.getExtractors());
    }
View Full Code Here

Examples of org.apache.sqoop.job.etl.Importer

    request.setOutputFormatClass(SqoopFileOutputFormat.class);
    request.setOutputKeyClass(Data.class);
    request.setOutputValueClass(NullWritable.class);

    Importer importer = (Importer)request.getConnectorCallbacks();

    // Set up framework context
    MutableMapContext context = request.getFrameworkContext();
    context.setString(JobConstants.JOB_ETL_PARTITIONER, importer.getPartitioner().getName());
    context.setString(JobConstants.JOB_ETL_EXTRACTOR, importer.getExtractor().getName());
    context.setString(JobConstants.JOB_ETL_DESTROYER, importer.getDestroyer().getName());

    if(request.getExtractors() != null) {
      context.setInteger(JobConstants.JOB_ETL_EXTRACTOR_NUM, request.getExtractors());
    }
View Full Code Here

Examples of org.candlepin.sync.Importer

    }

    @Test
    public void testImportRecordSuccessWithFilename()
        throws IOException, ImporterException {
        Importer importer = mock(Importer.class);
        EventSink es = mock(EventSink.class);
        OwnerResource thisOwnerResource = new OwnerResource(ownerCurator, null,
            null, null, null, i18n, es, null, null, null, importer, null, null,
            null, importRecordCurator, null, null, null, null, null,
            null, null, null, contentOverrideValidator,
            serviceLevelValidator, null);

        MultipartInput input = mock(MultipartInput.class);
        InputPart part = mock(InputPart.class);
        File archive = mock(File.class);
        List<InputPart> parts = new ArrayList<InputPart>();
        parts.add(part);
        MultivaluedMap<String, String> mm = new MultivaluedMapImpl<String, String>();
        List<String> contDis = new ArrayList<String>();
        contDis.add("form-data; name=\"upload\"; filename=\"test_file.zip\"");
        mm.put("Content-Disposition", contDis);

        when(input.getParts()).thenReturn(parts);
        when(part.getHeaders()).thenReturn(mm);
        when(part.getBody(any(GenericType.class))).thenReturn(archive);
        when(importer.loadExport(eq(owner), any(File.class), any(ConflictOverrides.class)))
            .thenReturn(new HashMap<String, Object>());

        thisOwnerResource.importManifest(owner.getKey(), new String [] {}, input);
        List<ImportRecord> records = importRecordCurator.findRecords(owner);
        ImportRecord ir = records.get(0);
View Full Code Here

Examples of org.drools.spi.Importer

                cl = getClass( ).getClassLoader( );
                context.put( "smf-classLoader",
                             cl );
            }

            Importer importer = rule.getImporter( );
            clazz = importer.importClass( cl,
                                          className );

            // make sure field getter exists
            clazz.getMethod( "get" + fieldName.toUpperCase( ).charAt( 0 ) + fieldName.substring( 1 ),
                             (Class[]) null );
View Full Code Here

Examples of org.drools.spi.Importer

                cl = getClass( ).getClassLoader( );
                context.put( "smf-classLoader",
                             cl );
            }

            Importer importer = rule.getImporter( );
            clazz = importer.importClass( cl,
                                          className );
        }
        catch ( ClassNotFoundException e )
        {
            throw new FactoryException( e.getMessage( ) );
View Full Code Here

Examples of org.drools.spi.Importer

        super( name );
    }

    public void setUp() throws Exception
    {
        Importer importer = new DefaultImporter( );
        importer.addImport( new BaseImportEntry( "from java.math import *" ) );
        importer.addImport( new BaseImportEntry( "from org.drools.smf import SMFTestFrameWork" ) );
        importer.addImport( new BaseImportEntry( "from org.drools.smf.SMFTestFrameWork import Cheese" ) );
        super.setUp( "python",
                     importer );
    }
View Full Code Here

Examples of org.drools.spi.Importer

                cl = getClass( ).getClassLoader( );
                context.put( "smf-classLoader",
                             cl );
            }

            Importer importer = ruleSet.getImporter( );
            clazz = importer.importClass( cl,
                                          className );
        }
        catch ( ClassNotFoundException e )
        {
            throw new FactoryException( e.getMessage( ) );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.