节点必须具有哪些属性,以便在graphml中显示其名称。 GRAFIC?
我根据包
创建了一些节点MATCH (artifact:Artifact)
WHERE
artifact.type <> "test-jar"
MATCH
(artifact:Artifact)-[:CONTAINS]->(root:Package{fqn:"net.sf.sze.dao.api"})-[:CONTAINS]->(slice:Package)
WITH COLLECT(slice) AS rows1
MATCH
(artifact:Artifact)-[:CONTAINS]->(root:Package{fqn:"net.sf.sze.frontend"})-[:CONTAINS]->(slice:Package)
WITH rows1 + COLLECT(slice) AS rows2
MATCH
(artifact:Artifact)-[:CONTAINS]->(root:Package{fqn:"net.sf.sze.service"})-[:CONTAINS *2..2]->(slice:Package)
WITH rows2 + COLLECT(slice) AS rows3
UNWIND rows3 AS slice
MERGE (sn:Slice{name:slice.name})
MERGE (sn)-[:SLICE_CONTAINS]-> (slice)
RETURN
sn
并尝试使用
创建graphml图表MATCH
(slice1:Slice)-[:SLICE_CONTAINS]->()-[:CONTAINS*]->(t1:Type),
(slice2:Slice)-[:SLICE_CONTAINS]->()-[:CONTAINS*]->(t2:Type),
(t1)-[d:DEPENDS_ON]->(t2)
WHERE
slice1 <> slice2
WITH
slice1, slice2, count(d) as weight
RETURN
slice1 as Slice1, slice2 as Slice2, {
role : "relationship",
type : "DEPENDS_ON",
startNode: slice1,
endNode: slice2,
properties: {
weight: weight
}
} as Dependency
创建的图表很好地期望节点名称。我只得到标签CompositeObject, id = 123456
,这使图表无用。
任何人都可以给我一个提示,有什么不对吗?
答案 0 :(得分:2)
对于由jQAssistant扫描程序定义的类型,存在将作为标签呈现的类型特定规则,例如, “fqn”代表“:Artifact”标记为节点。
您正在创建无法确定类型的虚拟关系,因此无法显示任何属性。 jQAssistant 1.3.0将支持属性“标签”来控制它,例如
....
RETURN
slice1 as Slice1, slice2 as Slice2, {
role : "relationship",
type : "DEPENDS_ON",
startNode: slice1,
endNode: slice2,
label: weight, // set an explicit label
properties: {
weight: weight
}
} as Dependency