本文整理汇总了Java中org.neo4j.server.helpers.CommunityServerBuilder类的典型用法代码示例。如果您正苦于以下问题:Java CommunityServerBuilder类的具体用法?Java CommunityServerBuilder怎么用?Java CommunityServerBuilder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CommunityServerBuilder类属于org.neo4j.server.helpers包,在下文中一共展示了CommunityServerBuilder类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: setUp
import org.neo4j.server.helpers.CommunityServerBuilder; //导入依赖的package包/类
@BeforeClass
public static void setUp() throws IOException, RepositoryException, RDFParseException {
int port;
try (final ServerSocket serverSocket = new ServerSocket(0)) {
port = serverSocket.getLocalPort();
}
server = CommunityServerBuilder.server()
.onPort(port)
.withThirdPartyJaxRsPackage("de.unikiel.inf.comsys.neo4j", "/rdf")
.build();
server.start();
GraphDatabaseService db = server.getDatabase().getGraph();
Repository rep = RepositoryRegistry.getInstance(db).getRepository();
conn = rep.getConnection();
InputStream testdata = RDFServerExtensionTest.class.getResourceAsStream("/sp2b.n3");
conn.add(testdata, "http://example.com/", RDFFormat.N3);
}
开发者ID:lszeremeta,项目名称:neo4j-sparql-extension-yars,代码行数:18,代码来源:RDFServerExtensionTest.java
示例2: shouldGetValidInfo
import org.neo4j.server.helpers.CommunityServerBuilder; //导入依赖的package包/类
@Test
public void shouldGetValidInfo() throws IOException {
NeoServer server = CommunityServerBuilder.server().onPort(7577)
.withThirdPartyJaxRsPackage("org.amanzi.neo4j.csvtreeloader", MOUNT_POINT).build();
server.start();
RestRequest restRequest = new RestRequest(server.baseUri().resolve(MOUNT_POINT), CLIENT);
String query = "service/csvtree";
JaxRsResponse response = restRequest.get(query);
assertEquals(200, response.getStatus());
System.out.println("Got Import response: " + response.getEntity());
JsonNode tree = objectMapper.readTree(response.getEntity().toString());
String version = tree.get("version").asText();
assertTrue("Version should be valid string", version.length() >= 5);
server.stop();
}
开发者ID:craigtaverner,项目名称:csvtreeloader,代码行数:18,代码来源:CSVTreeLoaderServiceFunctionalTest.java
示例3: shouldImportFromConfigCSV
import org.neo4j.server.helpers.CommunityServerBuilder; //导入依赖的package包/类
@Test
public void shouldImportFromConfigCSV() throws IOException {
NeoServer server = CommunityServerBuilder.server().onPort(7577)
.withThirdPartyJaxRsPackage("org.amanzi.neo4j.csvtreeloader", MOUNT_POINT).build();
server.start();
String[] columnHeaders = new String[] { "Device.deviceid",
"Version.version_name.GeoptimaVersion.Version%20Props", "Day..EventDay",
"Date.time.ConfigCheck" };
String[] leafProperties = new String[] { "Date.time", "UTC" };
String leafPropertiesColumn = "Params";
String treeSpec = "Device-versions->GeoptimaVersion-days->EventDay-checks->ConfigCheck";
RestRequest restRequest = new RestRequest(server.baseUri().resolve(MOUNT_POINT), CLIENT);
importFromCSV(restRequest, "samples/short_config.csv", columnHeaders, leafProperties, leafPropertiesColumn, treeSpec, 200, 5, true);
server.stop();
}
开发者ID:craigtaverner,项目名称:csvtreeloader,代码行数:17,代码来源:CSVTreeLoaderServiceFunctionalTest.java
示例4: setUp
import org.neo4j.server.helpers.CommunityServerBuilder; //导入依赖的package包/类
@Before
public void setUp() throws IOException {
server = CommunityServerBuilder.server()
.withThirdPartyJaxRsPackage("pe.archety", "/v1")
.build();
server.start();
request = new RestRequest(server.baseUri().resolve("/v1"), CLIENT);
populate(server.getDatabase().getGraph());
}
开发者ID:maxdemarzi,项目名称:archetype_extension,代码行数:10,代码来源:GetIdentityKnowsFunctionalTest.java
示例5: setUp
import org.neo4j.server.helpers.CommunityServerBuilder; //导入依赖的package包/类
@Before
public void setUp() throws IOException {
server = CommunityServerBuilder.server()
.withThirdPartyJaxRsPackage("pe.archety", "/v1")
.build();
server.start();
request = new RestRequest(server.baseUri().resolve("/v1"), CLIENT);
}
开发者ID:maxdemarzi,项目名称:archetype_extension,代码行数:9,代码来源:ArchetypeServiceFunctionalTest.java
示例6: setUp
import org.neo4j.server.helpers.CommunityServerBuilder; //导入依赖的package包/类
@Before
public void setUp() throws IOException {
server = CommunityServerBuilder.server()
.withThirdPartyJaxRsPackage("pe.archety", "/v1")
.build();
server.start();
request = new RestRequest(server.baseUri().resolve("/v1"), CLIENT);
request.get("service/migrate");
populate(server.getDatabase().getGraph());
}
开发者ID:maxdemarzi,项目名称:archetype_extension,代码行数:11,代码来源:CreateIdentityFunctionalTest.java
示例7: setUp
import org.neo4j.server.helpers.CommunityServerBuilder; //导入依赖的package包/类
@Before
public void setUp() throws IOException {
server = CommunityServerBuilder.server()
.withThirdPartyJaxRsPackage("com.hpce", "/v1")
.onPort(8484)
.build();
server.start();
request = new RestRequest(server.baseUri().resolve("/v1"), CLIENT);
populate(server.getDatabase().getGraph());
}
开发者ID:maxdemarzi,项目名称:neo_hpce,代码行数:11,代码来源:GetUserFunctionalTest.java
示例8: setUp
import org.neo4j.server.helpers.CommunityServerBuilder; //导入依赖的package包/类
@Before
public void setUp() throws IOException {
server = CommunityServerBuilder.server()
.withThirdPartyJaxRsPackage("com.hpce", "/v1")
.onPort(8484)
.build();
server.start();
request = new RestRequest(server.baseUri().resolve("/v1"), CLIENT);
}
开发者ID:maxdemarzi,项目名称:neo_hpce,代码行数:10,代码来源:NeoServiceFunctionalTest.java
示例9: shouldImportFromCSV
import org.neo4j.server.helpers.CommunityServerBuilder; //导入依赖的package包/类
@Test
public void shouldImportFromCSV() throws IOException {
NeoServer server = CommunityServerBuilder.server().onPort(7577)
.withThirdPartyJaxRsPackage("org.amanzi.neo4j.csvtreeloader", MOUNT_POINT).build();
server.start();
String[] columnHeaders = new String[] { "DeviceID", "Day..EventDay", "Date.time.Event" };
String[] leafProperties = new String[] { "Date", "Path", "UTC" };
String leafPropertiesColumn = "Params";
RestRequest restRequest = new RestRequest(server.baseUri().resolve(MOUNT_POINT), CLIENT);
importFromCSV(restRequest, "non-existant.csv", columnHeaders, leafProperties, leafPropertiesColumn, null, 404, 0, true);
importFromCSV(restRequest, "samples/353333333333333.csv", columnHeaders, leafProperties, leafPropertiesColumn, null, 200, 122, false);
//importFromCSV(restRequest, "samples/load_config_access.csv", columnHeaders, leafProperties, leafPropertiesColumn, 200, 1000, false);
server.stop();
}
开发者ID:craigtaverner,项目名称:csvtreeloader,代码行数:16,代码来源:CSVTreeLoaderServiceFunctionalTest.java
示例10: shouldManageInvalidRequests
import org.neo4j.server.helpers.CommunityServerBuilder; //导入依赖的package包/类
@Test
public void shouldManageInvalidRequests() throws IOException {
NeoServer server = CommunityServerBuilder.server().onPort(7577)
.withThirdPartyJaxRsPackage("org.amanzi.neo4j.csvtreeloader", MOUNT_POINT).build();
server.start();
RestRequest restRequest = new RestRequest(server.baseUri().resolve(MOUNT_POINT), CLIENT);
importFromCSV(restRequest, null, null, null, null, null, 404, 0, false);
importFromCSV(restRequest, "samples/353333333333333.csv", null, null, null, null, 200, 122, false);
server.stop();
}
开发者ID:craigtaverner,项目名称:csvtreeloader,代码行数:12,代码来源:CSVTreeLoaderServiceFunctionalTest.java
示例11: shouldBeAbleToEnableGremlinConsole
import org.neo4j.server.helpers.CommunityServerBuilder; //导入依赖的package包/类
@Test
public void shouldBeAbleToEnableGremlinConsole() throws Exception {
server.stop();
server = CommunityServerBuilder.server()
.withProperty(Configurator.MANAGEMENT_CONSOLE_ENGINES, "shell,gremlin").build();
server.start();
assertThat(exec("g","gremlin").getStatus(), is(200));
assertThat(exec("ls","shell").getStatus(), is(200));
}
开发者ID:neo4j-contrib,项目名称:gremlin-plugin,代码行数:12,代码来源:ConfigureEnabledManagementConsolesGremlinTest.java
示例12: shouldBeAbleToExplicitlySetConsolesToEnabled
import org.neo4j.server.helpers.CommunityServerBuilder; //导入依赖的package包/类
@Test
public void shouldBeAbleToExplicitlySetConsolesToEnabled() throws Exception
{
server.stop();
server = CommunityServerBuilder.server().withProperty(Configurator.MANAGEMENT_CONSOLE_ENGINES, "").build();
server.start();
assertThat(exec("g","gremlin").getStatus(), is(400));
assertThat(exec("ls","shell").getStatus(), is(400));
}
开发者ID:neo4j-contrib,项目名称:gremlin-plugin,代码行数:11,代码来源:ConfigureEnabledManagementConsolesGremlinTest.java
示例13: gremlinAndShellConsolesShouldNotBeEnabledByDefault
import org.neo4j.server.helpers.CommunityServerBuilder; //导入依赖的package包/类
@Test
public void gremlinAndShellConsolesShouldNotBeEnabledByDefault() throws Exception {
server.stop();
server = CommunityServerBuilder.server().withProperty(Configurator.MANAGEMENT_CONSOLE_ENGINES, "shell").build();
server.start();
assertThat(exec("g","gremlin").getStatus(), is(400));
assertThat(exec("ls","shell").getStatus(), is(200));
}
开发者ID:neo4j-contrib,项目名称:gremlin-plugin,代码行数:11,代码来源:ConfigureEnabledManagementConsolesGremlinTest.java
示例14: startServer
import org.neo4j.server.helpers.CommunityServerBuilder; //导入依赖的package包/类
public void startServer() throws IOException {
server = CommunityServerBuilder.server().onPort(serverPort).withThirdPartyJaxRsPackage("org.dswarm.graph.resources", MOUNT_POINT).build();
server.start();
}
开发者ID:dswarm,项目名称:dswarm-graph-neo4j,代码行数:7,代码来源:Neo4jEmbeddedDBWrapper.java
注:本文中的org.neo4j.server.helpers.CommunityServerBuilder类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论