本文整理汇总了Java中com.marklogic.client.DatabaseClient.newDocumentManager方法的典型用法代码示例。如果您正苦于以下问题:Java DatabaseClient.newDocumentManager方法的具体用法?Java DatabaseClient.newDocumentManager怎么用?Java DatabaseClient.newDocumentManager使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.marklogic.client.DatabaseClient
的用法示例。
在下文中一共展示了DatabaseClient.newDocumentManager方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testSchemaLoading
import com.marklogic.client.DatabaseClient; //导入方法依赖的package包/类
@Test
public void testSchemaLoading() {
initializeAppDeployer(new DeploySchemasDatabaseCommand(), new DeployTriggersDatabaseCommand(),
new DeployContentDatabasesCommand(1), newCommand());
appDeployer.deploy(appConfig);
DatabaseClient client = appConfig.newSchemasDatabaseClient();
GenericDocumentManager docMgr = client.newDocumentManager();
assertNull("Rules document loaded", docMgr.exists("notExists"));
assertNotNull("Rules document loaded", docMgr.exists("/my.rules").getUri());
assertNotNull("XSD document loaded", docMgr.exists("/x.xsd").getUri());
assertNull(docMgr.exists("/.do-not-load"));
assertNull(docMgr.exists(".do-not-load"));
}
示例2: testCustomSchemasPathWithCustomFileFilter
import com.marklogic.client.DatabaseClient; //导入方法依赖的package包/类
@Test
public void testCustomSchemasPathWithCustomFileFilter() {
initializeAppDeployer(new DeploySchemasDatabaseCommand(), new DeployTriggersDatabaseCommand(),
new DeployContentDatabasesCommand(1), newCommand());
appConfig.setSchemasPath("src/test/resources/schemas-marklogic9");
appConfig.setSchemasFileFilter(new CustomFileFilter());
appDeployer.deploy(appConfig);
DatabaseClient client = appConfig.newSchemasDatabaseClient();
GenericDocumentManager docMgr = client.newDocumentManager();
assertNotNull("TDEXML document loaded", docMgr.exists("/x.tdex").getUri());
assertNotNull("TDEJSON document loaded", docMgr.exists("/x.tdej").getUri());
assertNull(docMgr.exists("/to-be-ignored/test.xml"));
assertNull(docMgr.exists("to-be-ignored/test.xml"));
for (String uri : new String[]{"/x.tdex", "/x.tdej"}) {
DocumentMetadataHandle h = docMgr.readMetadata(uri, new DocumentMetadataHandle());
assertEquals("Files ending in tdex and tdej go into a special collection", "http://marklogic.com/xdmp/tde",
h.getCollections().iterator().next());
}
}
示例3: open
import com.marklogic.client.DatabaseClient; //导入方法依赖的package包/类
@Override
public void open(ExecutionContext executionContext) throws ItemStreamException {
DatabaseClient databaseClient = databaseClientProvider.getDatabaseClient();
docMgr = databaseClient.newDocumentManager();
docMgr.setMetadataCategories(DocumentManager.Metadata.ALL);
page = docMgr.search(queryDef, start);
start += page.getPageSize();
executionContext.put("PAGE_INDEX", page.getPageNumber());
}
示例4: buildDocumentManager
import com.marklogic.client.DatabaseClient; //导入方法依赖的package包/类
protected DocumentManager<?, ?> buildDocumentManager(DatabaseClient client) {
return client.newDocumentManager();
}