當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。