本文整理匯總了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;
}
示例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;
}
示例3: EmbeddedRelationshipType
import org.neo4j.graphdb.RelationshipType; //導入方法依賴的package包/類
public EmbeddedRelationshipType(RelationshipType delegate) {
this.delegate = delegate;
this.name = delegate.name();
}
示例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");
}
}