Examples of ImportService


Examples of com.cxy.redisclient.service.ImportService

import junit.framework.TestCase;

public class ImportTest extends TestCase {

  public void testImportFile() throws IOException {
    ImportService service = new ImportService("C:\\Users\\xinyu\\Desktop\\export", 6, 12);
    service.importFile();
  }
View Full Code Here

Examples of com.cxy.redisclient.service.ImportService

    dialog.setText(i18nFile.getText(I18nFile.IMPORTREDIS));
    String[] filterExt = { "*.*" };
    dialog.setFilterExtensions(filterExt);
    String file = dialog.open();
    if (file != null) {
      ImportService service = new ImportService(file, cinfo.getId(),
          cinfo.getDb());
      try {
        service.importFile();
      } catch (IOException e) {
        throw new RuntimeException(e.getMessage());
      }

      dbContainerTreeItemSelected(treeItem, true);
View Full Code Here

Examples of org.apache.marmotta.platform.core.api.importer.ImportService

    @BeforeClass
    public static void init() throws MarmottaImportException {
        marmotta = new JettyMarmotta("/marmotta");
        config = new ClientConfiguration("http://localhost:" + marmotta.getPort() + marmotta.getContext());

        ImportService importService = marmotta.getService(ImportService.class);
        InputStream data = getTestData("demo-data.foaf"); // load initial data
        importService.importData(data, "application/rdf+xml", null, null);
    }
View Full Code Here

Examples of org.apache.marmotta.platform.core.api.importer.ImportService

    @BeforeClass
    public static void setUp() throws MarmottaImportException, URISyntaxException {
        marmotta = new JettyMarmotta("/marmotta", SparqlWebService.class);
       
        ImportService importService = marmotta.getService(ImportService.class);
        UserService userService = marmotta.getService(UserService.class);
        ContextService contextService = marmotta.getService(ContextService.class);
        InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream("foaf.rdf");
        int n = importService.importData(is, "application/rdf+xml", userService.getAnonymousUser(), contextService.getDefaultContext());
        log.info("Imported RDF test suite with {} triples", n);
       
        RestAssured.baseURI = "http://localhost";
        RestAssured.port = marmotta.getPort();
        RestAssured.basePath = marmotta.getContext();
View Full Code Here

Examples of org.apache.marmotta.platform.core.api.importer.ImportService

    @BeforeClass
    public static void setUp() throws MarmottaImportException {
        marmotta = new JettyMarmotta("/marmotta", SparqlWebService.class);
       
        ImportService importService = marmotta.getService(ImportService.class);
        UserService userService = marmotta.getService(UserService.class);
        ContextService contextService = marmotta.getService(ContextService.class);
        InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream("foaf.rdf");
        int n = importService.importData(is, "application/rdf+xml", userService.getAnonymousUser(), contextService.getDefaultContext());
        log.info("Imported RDF test suite with {} triples", n);
       
        RestAssured.baseURI = "http://localhost";
        RestAssured.port = marmotta.getPort();
        RestAssured.basePath = marmotta.getContext();
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.