本文整理匯總了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);
}
}
示例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));
}
示例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));
}
示例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));
}
示例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);
}
}