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


Java DatabaseClient.newDocumentManager方法代码示例

本文整理汇总了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"));
}
 
开发者ID:marklogic-community,项目名称:ml-app-deployer,代码行数:17,代码来源:LoadSchemasTest.java

示例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());
	}
}
 
开发者ID:marklogic-community,项目名称:ml-app-deployer,代码行数:25,代码来源:LoadSchemasTest.java

示例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());
}
 
开发者ID:marklogic-community,项目名称:marklogic-spring-batch,代码行数:10,代码来源:DocumentItemReader.java

示例4: buildDocumentManager

import com.marklogic.client.DatabaseClient; //导入方法依赖的package包/类
protected DocumentManager<?, ?> buildDocumentManager(DatabaseClient client) {
	return client.newDocumentManager();
}
 
开发者ID:marklogic-community,项目名称:ml-javaclient-util,代码行数:4,代码来源:DefaultBatchHandler.java


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