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


Java Relationship.isType方法代码示例

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


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

示例1: accept

import org.neo4j.graphdb.Relationship; //导入方法依赖的package包/类
@Override
public <R, E extends Throwable> R accept(Visitor<R, E> visitor) throws E {
    for (Node node : dbServices.getAllNodes()) {
        if (node.hasLabel(Label.label("CompilationUnit"))) {
            continue;
        }
        if (node.hasLabel(Label.label("SourceSpan"))) {
            continue;
        }
        if (node.hasLabel(Label.label("SourceLocation"))) {
            continue;
        }

        visitor.visitNode(node);
        for (Relationship edge : node.getRelationships(Direction.OUTGOING)) {
            if (edge.isType(RelationshipType.withName("location"))) {
                continue;
            }
            visitor.visitRelationship(edge);
        }
    }
    return visitor.done();
}
 
开发者ID:FTSRG,项目名称:codemodel-rifle,代码行数:24,代码来源:SimpleWalker.java

示例2: isJavaCodeRelationship

import org.neo4j.graphdb.Relationship; //导入方法依赖的package包/类
public static boolean isJavaCodeRelationship(Relationship rel){
    return rel.isType(RelationshipType.withName(EXTEND))
            ||rel.isType(RelationshipType.withName(IMPLEMENT))
            ||rel.isType(RelationshipType.withName(THROW))
            ||rel.isType(RelationshipType.withName(PARAM))
            ||rel.isType(RelationshipType.withName(RT))
            ||rel.isType(RelationshipType.withName(HAVE_METHOD))
            ||rel.isType(RelationshipType.withName(HAVE_FIELD))
            ||rel.isType(RelationshipType.withName(CALL_METHOD))
            ||rel.isType(RelationshipType.withName(CALL_FIELD))
            ||rel.isType(RelationshipType.withName(TYPE))
            ||rel.isType(RelationshipType.withName(VARIABLE));

}
 
开发者ID:linzeqipku,项目名称:SnowGraph,代码行数:15,代码来源:JavaCodeExtractor.java

示例3: accept

import org.neo4j.graphdb.Relationship; //导入方法依赖的package包/类
@Override
    public <R, E extends Throwable> R accept(Visitor<R, E> visitor) throws E {
        //filternodes:
        for (Node node : nodes) {
            if (simple) {
                if (node.hasLabel(Label.label("CompilationUnit"))) {
                    continue; // filternodes;
                }
                if (node.hasLabel(Label.label("SourceSpan"))) {
                    continue; // filternodes;
                }
                if (node.hasLabel(Label.label("SourceLocation"))) {
                    continue; // filternodes;
                }
            }

            if (!cfg) {
                if (node.hasLabel(Label.label("End"))) {
                    continue; // filternodes;
                }
            }

            visitor.visitNode(node);

            for (Relationship relationship : node.getRelationships(Direction.OUTGOING)) {
                if (nodes.contains(relationship.getOtherNode(node))) {
                    if (relationship.isType(RelationshipType.withName("location"))) {
                        continue;
                    }

                    if (!cfg) {
                        if (relationship.isType(RelationshipType.withName("_end"))) {
                            continue;
                        }
                        if (relationship.isType(RelationshipType.withName("_next"))) {
//                            continue;
                        }
                        if (relationship.isType(RelationshipType.withName("_true"))) {
                            continue;
                        }
                        if (relationship.isType(RelationshipType.withName("_false"))) {
                            continue;
                        }
                        if (relationship.isType(RelationshipType.withName("_normal"))) {
                            continue;
                        }
                    }

                    visitor.visitRelationship(relationship);
                }
            }
        }

        return visitor.done();
    }
 
开发者ID:FTSRG,项目名称:codemodel-rifle,代码行数:56,代码来源:GraphWalker.java


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