jQassistant 中干净的 graphml 名称必须存在哪些节点属性
What node properties must exist for a clean graphml name in jQassistant
节点必须具有哪些属性才能在 graphml 中显示它的名称。图形?
我根据我的包创建了一些节点
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
图形创建良好,需要节点名称。我只得到 as Label CompositeObject, id = 123456
这使得图表无用。
谁能给我提示,怎么了?
对于由 jQAssistant 扫描器定义的类型,有特定于类型的规则,什么将呈现为标签,例如"fqn" 用于“:Artifact”标记的节点。
您正在创建无法确定类型的虚拟关系,因此无法显示 属性。 jQAssistant 1.3.0 将支持 属性 "label" 来控制它,例如
....
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
节点必须具有哪些属性才能在 graphml 中显示它的名称。图形?
我根据我的包创建了一些节点
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
图形创建良好,需要节点名称。我只得到 as Label CompositeObject, id = 123456
这使得图表无用。
谁能给我提示,怎么了?
对于由 jQAssistant 扫描器定义的类型,有特定于类型的规则,什么将呈现为标签,例如"fqn" 用于“:Artifact”标记的节点。
您正在创建无法确定类型的虚拟关系,因此无法显示 属性。 jQAssistant 1.3.0 将支持 属性 "label" 来控制它,例如
....
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