本文整理汇总了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);
}
}