当前位置: 首页>>代码示例>>Java>>正文


Java RDFMimeTypes类代码示例

本文整理汇总了Java中com.marklogic.client.semantics.RDFMimeTypes的典型用法代码示例。如果您正苦于以下问题:Java RDFMimeTypes类的具体用法?Java RDFMimeTypes怎么用?Java RDFMimeTypes使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


RDFMimeTypes类属于com.marklogic.client.semantics包,在下文中一共展示了RDFMimeTypes类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testCloseWait

import com.marklogic.client.semantics.RDFMimeTypes; //导入依赖的package包/类
@Test
public void testCloseWait()
        throws Exception {
    try {
        File testData = new File(TESTFILE_OWL);
        FileHandle testHandle = new FileHandle(testData);
        GraphManager gmgr = writerClient.newGraphManager();
        gmgr.setDefaultMimetype(RDFMimeTypes.RDFXML);
        gmgr.merge("/directory1/test.rdf", testHandle);
        gmgr.delete("/directory1/test.rdf");
    } catch (Exception ex) {
        throw ex;
    } finally {
        writerClient.release();
        // increase Thread.sleep or set breakpoints on gmgr.merge and gmgr.delete to observe CLOSE_WAIT
        Thread.sleep(100);
    }
}
 
开发者ID:marklogic,项目名称:marklogic-rdf4j,代码行数:19,代码来源:MarkLogicQueryTest.java

示例2: setUp

import com.marklogic.client.semantics.RDFMimeTypes; //导入依赖的package包/类
@Before
public void setUp() throws RepositoryException, FileNotFoundException {
    logger.debug("setting up test");
    rep.initialize();
    f = rep.getValueFactory();
    conn = rep.getConnection();
    logger.info("test setup complete.");
    File testData = new File(TESTFILE_OWL);

    GraphManager gmgr = writerClient.newGraphManager();
    gmgr.setDefaultMimetype(RDFMimeTypes.RDFXML);
    gmgr.write("/directory1/test.rdf", new FileHandle(testData));
}
 
开发者ID:marklogic,项目名称:marklogic-rdf4j,代码行数:14,代码来源:MarkLogicTupleQueryTest.java

示例3: setUp

import com.marklogic.client.semantics.RDFMimeTypes; //导入依赖的package包/类
@Before
public void setUp() throws RepositoryException, FileNotFoundException {
    logger.debug("setting up test");
    rep.initialize();
    f = rep.getValueFactory();
    conn = rep.getConnection();
    logger.info("test setup complete.");
    File testData = new File(TESTFILE_OWL);

    GraphManager gmgr = writerClient.newGraphManager();
    gmgr.setDefaultMimetype(RDFMimeTypes.RDFXML);
    gmgr.write("http://example.org/test/g27", new FileHandle(testData));
}
 
开发者ID:marklogic,项目名称:marklogic-rdf4j,代码行数:14,代码来源:MarkLogicGraphQueryTest.java

示例4: setUp

import com.marklogic.client.semantics.RDFMimeTypes; //导入依赖的package包/类
@Before
public void setUp() throws RepositoryException, FileNotFoundException {
    logger.debug("setting up test");
    rep.initialize();
    f = rep.getValueFactory();
    conn = rep.getConnection();
    logger.info("test setup complete.");
    File testData = new File("src/test/resources/testdata/test.owl");

    GraphManager gmgr = writerClient.newGraphManager();
    gmgr.setDefaultMimetype(RDFMimeTypes.RDFXML);

    gmgr.write("http://example.org/test/g27", new FileHandle(testData));
}
 
开发者ID:marklogic,项目名称:marklogic-rdf4j,代码行数:15,代码来源:MarkLogicBooleanQueryTest.java

示例5: JenaDatabaseClient

import com.marklogic.client.semantics.RDFMimeTypes; //导入依赖的package包/类
public JenaDatabaseClient(DatabaseClient client, boolean periodicFlush) {
    this.client = client;
    this.graphManager = client.newGraphManager();
    this.graphManager.setDefaultMimetype(RDFMimeTypes.NTRIPLES);
    this.sparqlQueryManager = client.newSPARQLQueryManager();
    if (periodicFlush) {
        this.writeBuffer = new TriplesWriteBuffer(this);
        this.deleteBuffer = new TriplesDeleteBuffer(this);
        this.timer = new Timer();
        timer.schedule(writeBuffer, DEFAULT_INITIAL_DELAY, DEFAULT_CACHE_MILLIS);
        timer.schedule(deleteBuffer, DEFAULT_INITIAL_DELAY + 250, DEFAULT_CACHE_MILLIS);
    }
}
 
开发者ID:marklogic,项目名称:marklogic-jena,代码行数:14,代码来源:JenaDatabaseClient.java


注:本文中的com.marklogic.client.semantics.RDFMimeTypes类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。