有没有办法将GML文件解析为Java Obeject,就像Jaxb do xml文件一样?
<dependency>
<groupId>com.tinkerpop.blueprints</groupId>
<artifactId>blueprints-core</artifactId>
<version>??</version>
</dependency>
我的GML文件有以下形式:
graph [
directed 0
node [
id 1
label "{C28} {V46, V82}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 2
label "{C8} {V28, V46}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 3
label "{C20} {V46, V50}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 4
label "{C10} {V46, V31}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 5
label "{C22} {V46, V56}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 6
label "{C24} {V46, V69}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 7
label "{C26} {V46, V70}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 8
label "{C83} {V46, V0, V24, V13, V71}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 9
label "{C46} {V46, V0, V83}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 10
label "{C45} {V46, V0, V53}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 11
label "{C8, C146} {V46, V0, V24, V95, V57, V13, V68, V99, V89, V92, V35}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 12
label "{C52} {V24, V95, V45}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 13
label "{C68} {V0, V24, V95, V40}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 14
label "{C70} {V0, V24, V95, V94}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 15
label "{C57} {V32, V33, V94}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 16
label "{C82} {V0, V24, V95, V13, V21}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 17
label "{C84} {V0, V24, V95, V13, V74}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 18
label "{C113} {V0, V13, V99, V89, V92, V65}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 19
label "{C96} {V0, V13, V99, V89, V92, V22}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 20
label "{C95} {V0, V13, V99, V89, V92, V20}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 21
label "{C107} {V0, V13, V99, V89, V92, V48}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 22
label "{C104} {V0, V13, V99, V89, V92, V42}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 23
label "{C117} {V0, V13, V99, V89, V92, V73}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 24
label "{C88} {V0, V13, V99, V5, V89, V92}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 25
label "{C106} {V0, V13, V99, V89, V92, V47}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 26
label "{C125} {V0, V13, V99, V89, V92, V93}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 27
label "{C119} {V0, V13, V99, V89, V92, V77}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 28
label "{C90} {V0, V13, V99, V89, V92, V10}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 29
label "{C112} {V0, V13, V99, V89, V92, V63}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 30
label "{C111} {V0, V13, V99, V89, V92, V62}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 31
label "{C40, C121} {V80, V85, V0, V13, V99, V89, V92}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 32
label "{C109} {V0, V13, V99, V89, V92, V59}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 33
label "{C114} {V0, V13, V99, V89, V92, V66}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 34
label "{C124} {V0, V13, V99, V89, V92, V86}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 35
label "{C115} {V0, V13, V99, V89, V92, V67}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 36
label "{C103} {V0, V13, V99, V89, V92, V37}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 37
label "{C102} {V0, V13, V99, V89, V92, V30}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 38
label "{C122} {V0, V13, V99, V89, V92, V84}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 39
label "{C116} {V0, V13, V99, V89, V92, V72}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 40
label "{C138} {V0, V57, V13, V99, V89, V92, V49}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 41
label "{C128} {V46, V0, V13, V99, V89, V92, V16}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 42
label "{C126} {V0, V24, V13, V99, V89, V92, V7}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 43
label "{C63, C129} {V46, V0, V13, V17, V58, V99, V89, V92}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 44
label "{C65, C135} {V46, V0, V13, V58, V98, V99, V89, V92}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 45
label "{C139} {V0, V57, V13, V99, V89, V92, V61}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 46
label "{C132} {V0, V24, V13, V99, V89, V92, V55}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 47
label "{C30, C134} {V46, V51, V75, V0, V13, V99, V89, V92}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 48
label "{C48, C146} {V0, V24, V95, V60, V91, V13, V99, V89, V92}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 49
label "{C47, C48} {V1, V24, V95, V60, V91}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 50
label "{C131} {V0, V24, V13, V99, V89, V92, V54}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 51
label "{C142} {V0, V24, V57, V13, V99, V89, V92, V27}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 52
label "{C130, C146} {V46, V81, V0, V24, V95, V13, V68, V99, V89, V92}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 53
label "{C16, C98} {V46, V81, V88, V0, V24, V95, V13}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 54
label "{C69, C98} {V81, V64, V88, V0, V24, V95, V13}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 55
label "{C32, C85} {V64, V87, V0, V24, V95, V13}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 56
label "{C36, C71, C101, C130} {V46, V81, V76, V0, V24, V95, V29, V13, V2, V11, V18, V99, V89, V92}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 57
label "{C145} {V81, V0, V24, V95, V2, V3, V96, V97, V100}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 58
label "{C36, C118} {V76, V78, V0, V13, V99, V89, V92}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 59
label "{C56, C71, C74, C130} {V46, V81, V76, V79, V0, V24, V95, V29, V2, V11, V18}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 60
label "{C44, C56, C71, C74} {V46, V76, V79, V0, V29, V102, V2, V11, V18}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 61
label "{C44, C56, C58, C74} {V46, V34, V76, V79, V0, V38, V29, V102, V107}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 62
label "{C56, C75} {V38, V29, V109, V102, V107}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 63
label "{C56, C77} {V109, V102, V105, V104, V107}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 64
label "{C78} {V109, V105, V106, V108}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 65
label "{C58, C60} {V109, V101, V102, V105, V107}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 66
label "{C58, C75} {V101, V102, V105, V107, V103}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 67
label "{C76} {V102, V105, V103, V110}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 68
label "{C72, C146} {V81, V0, V24, V95, V6, V13, V68, V99, V89, V92}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 69
label "{C62, C127} {V8, V9, V0, V24, V6, V13, V99, V89, V92}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 70
label "{C16, C143} {V46, V36, V81, V0, V24, V95, V13, V68, V99}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 71
label "{C14, C130} {V46, V36, V41, V81, V0, V24, V95, V13}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 72
label "{C14, C86} {V46, V41, V24, V95, V4, V13}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 73
label "{C47, C49} {V24, V95, V4, V90}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 74
label "{C47, C66, C140} {V12, V46, V0, V24, V57, V13, V43, V99, V89, V92}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 75
label "{C2, C92} {V12, V14, V0, V13, V99, V89, V92}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 76
label "{C66, C141} {V0, V24, V57, V13, V15, V43, V99, V89, V92}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 77
label "{C66, C105} {V0, V44, V13, V15, V43, V99, V89, V92}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 78
label "{C66, C97} {V23, V0, V44, V13, V43, V99, V89, V92}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 79
label "{C4, C97} {V23, V52, V0, V13, V99, V89, V92}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 80
label "{C4, C100} {V52, V0, V26, V13, V99, V89, V92}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 81
label "{C4, C99} {V52, V25, V0, V13, V99, V89, V92}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 82
label "{C67, C94} {V23, V0, V13, V43, V19, V99, V89, V92}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
node [
id 83
label "{C18} {V46, V39}"
vgj [
labelPosition "in"
shape "Rectangle"
]
]
edge [
source 1
target 2
]
edge [
source 1
target 3
]
edge [
source 1
target 4
]
edge [
source 1
target 5
]
edge [
source 1
target 6
]
edge [
source 1
target 7
]
edge [
source 1
target 8
]
edge [
source 8
target 9
]
edge [
source 8
target 10
]
edge [
source 8
target 11
]
edge [
source 11
target 12
]
edge [
source 11
target 13
]
edge [
source 11
target 14
]
edge [
source 14
target 15
]
edge [
source 11
target 16
]
edge [
source 11
target 17
]
edge [
source 11
target 18
]
edge [
source 11
target 19
]
edge [
source 11
target 20
]
edge [
source 11
target 21
]
edge [
source 11
target 22
]
edge [
source 11
target 23
]
edge [
source 11
target 24
]
edge [
source 11
target 25
]
edge [
source 11
target 26
]
edge [
source 11
target 27
]
edge [
source 11
target 28
]
edge [
source 11
target 29
]
edge [
source 11
target 30
]
edge [
source 11
target 31
]
edge [
source 11
target 32
]
edge [
source 11
target 33
]
edge [
source 11
target 34
]
edge [
source 11
target 35
]
edge [
source 11
target 36
]
edge [
source 11
target 37
]
edge [
source 11
target 38
]
edge [
source 11
target 39
]
edge [
source 11
target 40
]
edge [
source 11
target 41
]
edge [
source 11
target 42
]
edge [
source 11
target 43
]
edge [
source 43
target 44
]
edge [
source 11
target 45
]
edge [
source 11
target 46
]
edge [
source 11
target 47
]
edge [
source 11
target 48
]
edge [
source 48
target 49
]
edge [
source 11
target 50
]
edge [
source 11
target 51
]
edge [
source 11
target 52
]
edge [
source 52
target 53
]
edge [
source 53
target 54
]
edge [
source 54
target 55
]
edge [
source 52
target 56
]
edge [
source 56
target 57
]
edge [
source 56
target 58
]
edge [
source 56
target 59
]
edge [
source 59
target 60
]
edge [
source 60
target 61
]
edge [
source 61
target 62
]
edge [
source 62
target 63
]
edge [
source 63
target 64
]
edge [
source 63
target 65
]
edge [
source 65
target 66
]
edge [
source 66
target 67
]
edge [
source 52
target 68
]
edge [
source 68
target 69
]
edge [
source 52
target 70
]
edge [
source 70
target 71
]
edge [
source 71
target 72
]
edge [
source 72
target 73
]
edge [
source 11
target 74
]
edge [
source 74
target 75
]
edge [
source 74
target 76
]
edge [
source 76
target 77
]
edge [
source 77
target 78
]
edge [
source 78
target 79
]
edge [
source 79
target 80
]
edge [
source 79
target 81
]
edge [
source 78
target 82
]
edge [
source 1
target 83
]
]
如何将它们解析为XSD文件或JavaObject?
我希望将所有gml文件内容都存储在内存中,以便使用它们。
谢谢。