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


Java RelationshipType.name方法代码示例

本文整理汇总了Java中org.neo4j.graphdb.RelationshipType.name方法的典型用法代码示例。如果您正苦于以下问题:Java RelationshipType.name方法的具体用法?Java RelationshipType.name怎么用?Java RelationshipType.name使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.neo4j.graphdb.RelationshipType的用法示例。


在下文中一共展示了RelationshipType.name方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getEdges

import org.neo4j.graphdb.RelationshipType; //导入方法依赖的package包/类
public Graph getEdges(RelationshipType type, boolean entail, long skip, long limit) {
  String query = "MATCH path = (start)-[r:" + type.name() + (entail ? "!" : "") + "]->(end) "
      + " RETURN path "
      // TODO: This slows down the query dramatically.
      // + " ORDER BY ID(r) "
      + " SKIP " + skip + " LIMIT " + limit;
  Graph graph = new TinkerGraph();
  TinkerGraphUtil tgu = new TinkerGraphUtil(graph, curieUtil);
  Result result;
  try {
    result = cypherUtil.execute(query);
    while (result.hasNext()) {
      Map<String, Object> map = result.next();
      Path path = (Path) map.get("path");
      tgu.addPath(path);
    }
  } catch (ArrayIndexOutOfBoundsException e) {
    // Return and empty graph if the limit is too high...
  }
  return graph;
}
 
开发者ID:SciGraph,项目名称:SciGraph,代码行数:22,代码来源:GraphApi.java

示例2: getAllRelationshipsOfType

import org.neo4j.graphdb.RelationshipType; //导入方法依赖的package包/类
List<RelIdIterator> getAllRelationshipsOfType( NodeManager nodeManager,
    DirectionWrapper direction, RelationshipType... types)
{
    ensureRelationshipMapNotNull( nodeManager );
    List<RelIdIterator> relTypeList = new LinkedList<RelIdIterator>();
    boolean hasModifications = nodeManager.getLockReleaser().hasRelationshipModifications( this );
    for ( RelationshipType type : types )
    {
        String typeName = type.name();
        RelIdArray src = getRelIdArray( typeName );
        Collection<Long> remove = null;
        RelIdArray add = null;
        RelIdIterator iterator = null;
        if ( hasModifications )
        {
            remove = nodeManager.getCowRelationshipRemoveMap( this, typeName );
            add = nodeManager.getCowRelationshipAddMap( this, typeName );
            iterator = new CombinedRelIdIterator( typeName, direction, src, add, remove );
        }
        else
        {
            iterator = src != null ? src.iterator( direction ) : empty( typeName ).iterator( direction );
        }
        relTypeList.add( iterator );
    }
    return relTypeList;
}
 
开发者ID:neo4j-contrib,项目名称:neo4j-mobile-android,代码行数:28,代码来源:NodeImpl.java

示例3: EmbeddedRelationshipType

import org.neo4j.graphdb.RelationshipType; //导入方法依赖的package包/类
public EmbeddedRelationshipType(RelationshipType delegate) {
    this.delegate = delegate;
    this.name = delegate.name();
}
 
开发者ID:buschmais,项目名称:extended-objects,代码行数:5,代码来源:EmbeddedRelationshipType.java

示例4: checkTypeNameIsNotNull

import org.neo4j.graphdb.RelationshipType; //导入方法依赖的package包/类
private static void checkTypeNameIsNotNull(RelationshipType actualType) {
  checkTypeIsNotNull(actualType);
  if (actualType.name() == null) {
    throw new IllegalStateException("The actual relationship type name should not be null");
  }
}
 
开发者ID:joel-costigliola,项目名称:assertj-neo4j,代码行数:7,代码来源:RelationshipAssert.java


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