Examples of Exporter


Examples of org.arquillian.recorder.reporter.Exporter

        reporter.getLastTestMethodReport().getPropertyEntries().add(sce);
        reporter.getLastTestMethodReport().getPropertyEntries().add(sce2);

        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();

        Exporter exporter = new AsciiDocExporter(byteArrayOutputStream);
        exporter.setConfiguration(configuration);

        exporter.export(reporter.getReport());

        // Not the best way to test it but for now it is enough
        String content = new String(byteArrayOutputStream.toByteArray()).trim();

        assertThat(content, containsString("Arquillian"));
View Full Code Here

Examples of org.arquillian.recorder.reporter.Exporter

        reporter.getLastTestMethodReport().getPropertyEntries().add(sce);
        reporter.getLastTestMethodReport().getPropertyEntries().add(sce2);

        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();

        Exporter exporter = new AsciiDocExporter(byteArrayOutputStream);
        exporter.setConfiguration(configuration);

        exporter.export(reporter.getReport());

        // Not the best way to test it but for now it is enough
        String content = new String(byteArrayOutputStream.toByteArray()).trim();

        assertThat(content, containsString("Arquillian"));
View Full Code Here

Examples of org.beangle.model.transfer.exporter.Exporter

import com.opensymphony.xwork2.util.ClassLoaderUtil;

public class ExportHelper {

  public static Exporter buildExporter(Context context) {
    Exporter exporter;
    String template = context.get("template", String.class);
    if (StringUtils.isNotBlank(template)) {
      exporter = new TemplateExporter();
    } else {
      exporter = new SimpleEntityExporter();
    }
    exporter.setWriter(getWriter(context));
    return exporter;
  }
View Full Code Here

Examples of org.beangle.model.transfer.exporter.Exporter

      context.put(Context.TITLES, get("titles"));
    }
    context.put(Context.EXTRACTOR, getPropertyExtractor());

    HttpServletResponse response = ServletActionContext.getResponse();
    Exporter exporter = buildExporter(context);
    exporter.getWriter().setOutputStream(response.getOutputStream());
    configExporter(exporter, context);
    if (format.equals(TransferFormats.XLS)) {
      response.setContentType("application/vnd.ms-excel;charset=GBK");
    } else {
      response.setContentType("application/x-msdownload");
    }
    response.setHeader(
        "Content-Disposition",
        "attachment;filename="
            + encodeAttachName(ServletActionContext.getRequest(), fileName + "." + format));
    // 进行输出
    exporter.setContext(context);
    exporter.transfer(new TransferResult());
    return null;
  }
View Full Code Here

Examples of org.beangle.model.transfer.exporter.Exporter

    context.put(Context.KEYS, get("keys"));
    context.put(Context.TITLES, get("titles"));
    context.put(Context.EXTRACTOR, getPropertyExtractor());

    HttpServletResponse response = ServletActionContext.getResponse();
    Exporter exporter = buildExporter(context);
    exporter.getWriter().setOutputStream(response.getOutputStream());
    configExporter(exporter, context);
    if (format.equals(TransferFormats.XLS)) {
      response.setContentType("application/vnd.ms-excel;charset=GBK");
    } else {
      response.setContentType("application/x-msdownload");
    }
    response.setHeader(
        "Content-Disposition",
        "attachment;filename="
            + encodeAttachName(ServletActionContext.getRequest(), fileName + "."
                + format));
    // 进行输出
    exporter.setContext(context);
    exporter.transfer(new TransferResult());
    return null;
  }
View Full Code Here

Examples of org.beangle.model.transfer.exporter.Exporter

      context.put(Context.TITLES, get("titles"));
    }
    context.put(Context.EXTRACTOR, getPropertyExtractor());

    HttpServletResponse response = ServletActionContext.getResponse();
    Exporter exporter = buildExporter(context);
    exporter.getWriter().setOutputStream(response.getOutputStream());
    configExporter(exporter, context);
    if (format.equals(TransferFormats.XLS)) {
      response.setContentType("application/vnd.ms-excel;charset=GBK");
    } else {
      response.setContentType("application/x-msdownload");
    }
    response.setHeader(
        "Content-Disposition",
        "attachment;filename="
            + encodeAttachName(ServletActionContext.getRequest(), fileName + "." + format));
    // 进行输出
    exporter.setContext(context);
    exporter.transfer(new TransferResult());
    return null;
  }
View Full Code Here

Examples of org.evolizer.ontology.exporter.main.Exporter

    clearModel();
  }
 
  @Test
  public void testExporter() {
    Exporter exporter = new Exporter("http://wuersch.org/ontologies/testproject");
   
    for (Object object : testEntities) {
      exporter.export(object);
    }
   
    exporter.writeModel();
   
    fail("Hey dude, you should really implement a real test!");
 
View Full Code Here

Examples of org.evolizer.ontology.exporter.main.Exporter

    clearModel();
  }
 
  @Test
  public void testExporter() {
    Exporter exporter = new Exporter("http://wuersch.org/ontologies/testproject");
   
    for (Object object : testEntities) {
      exporter.export(object);
    }
   
    exporter.writeModel();
   
    fail("Hey dude, you should really implement a real test!");
 
View Full Code Here

Examples of org.exolab.castor.dsml.Exporter

      LDAPConnection      conn = null;
      Hashtable           env;
      InitialDirContext   ctx = null;
      Importer            importer;
      Exporter            exporter;
      PrintImportListener printer;

      if ( jndi ) {
    env = new Hashtable();
    env.put( Context.INITIAL_CONTEXT_FACTORY, "com.netscape.jndi.ldap.LdapContextFactory" );
    env.put( Context.PROVIDER_URL, "ldap://" + args[ 1 ] );
    env.put( Context.SECURITY_PRINCIPAL, args[ 2 ] );
    env.put( Context.SECURITY_CREDENTIALS, args[ 3 ] );
    ctx = new InitialDirContext( env );
      } else {
    conn = new LDAPConnection();
    conn.connect( args[ 1 ], LDAPv2.DEFAULT_PORT );
    conn.authenticate( args[ 2 ], args[ 3 ] );
      }

      if ( jndi ) {
    importer = new JNDIImporter( ctx );
      } else {
    importer = new MozillaImporter( conn );
      }
      printer = new PrintImportListener( new PrintWriter( System.out, true ) );
      importer.setImportEventListener( printer );
      importer.readImportDescriptor( Test.class.getResourceAsStream( "import.xml" ) );
      importer.importDocument( Test.class.getResourceAsStream( "test.xml" ) );

      if ( jndi ) {
    exporter = new JNDIExporter( ctx );
      } else {
    exporter = new MozillaExporter( conn );
      }
      exporter.readSearchDescriptor( Test.class.getResourceAsStream( "search.xml" ) );
      exporter.setImportDescriptor( importer.getImportDescriptor() );
      exporter.export( System.out, false, true );

      if ( jndi ) {
    ctx.close();
      } else {
    conn.disconnect();
View Full Code Here

Examples of org.gephi.io.exporter.spi.Exporter

        fileExporterBuilders = Lookup.getDefault().lookupAll(FileExporterBuilder.class).toArray(new FileExporterBuilder[0]);
        uis = Lookup.getDefault().lookupAll(ExporterUI.class).toArray(new ExporterUI[0]);
    }

    public void exportFile(File file) throws IOException {
        Exporter fileExporter = getFileExporter(file);
        if (fileExporter == null) {
            throw new RuntimeException(NbBundle.getMessage(ExportControllerImpl.class, "ExportControllerImpl.error.nomatchingexporter"));
        }
        exportFile(file, fileExporter);
    }
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.