當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。