本文整理汇总了Java中org.neo4j.graphdb.Relationship.getPropertyKeys方法的典型用法代码示例。如果您正苦于以下问题:Java Relationship.getPropertyKeys方法的具体用法?Java Relationship.getPropertyKeys怎么用?Java Relationship.getPropertyKeys使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.neo4j.graphdb.Relationship
的用法示例。
在下文中一共展示了Relationship.getPropertyKeys方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: warmUp
import org.neo4j.graphdb.Relationship; //导入方法依赖的package包/类
@GET
@Path("/warmup")
public Response warmUp(@Context GraphDatabaseService db) throws IOException {
try ( Transaction tx = db.beginTx() )
{
for (Node node : GlobalGraphOperations.at(db).getAllNodes()) {
node.getPropertyKeys();
}
for ( Relationship relationship : GlobalGraphOperations.at(db).getAllRelationships()){
relationship.getPropertyKeys();
relationship.getNodes();
}
}
Map<String, String> results = new HashMap<String,String>(){{
put("response","Warmed up and ready to go!");
}};
return Response.ok().entity(objectMapper.writeValueAsString(results)).build();
}
示例2: convertRelationshipToEdge
import org.neo4j.graphdb.Relationship; //导入方法依赖的package包/类
public static AbstractEdge convertRelationshipToEdge(Relationship relationship)
{
AbstractEdge resultEdge = new Edge(convertNodeToVertex(relationship.getStartNode()),
convertNodeToVertex(relationship.getEndNode()));
for (String key : relationship.getPropertyKeys())
{
String value = (String) relationship.getProperty(key);
if(StringUtils.isNullOrEmpty(value))
{
resultEdge.addAnnotation(key, value);
}
}
return resultEdge;
}