Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Paste
P1300
(An Untitled Masterwork)
Active
Public
Actions
Authored by
seirl
on Feb 23 2022, 4:32 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Subscribers
None
class
SwhGraphTinkerpopProvider
extends
WebGraphTinkerpopProvider
{
@Override
public
ImmutableGraph
load
()
{
var
graph
=
SwhBidirectionalImmutableGraph
.
loadLabelled
(...);
graph
.
loadCommitAuthors
(
LoadMethod
.
MAPPED
);
graph
.
loadMessages
(
LoadMethod
.
MAPPED
);
return
graph
;
}
public
Object
getProperty
(
PropertyType
p
,
long
nodeId
)
{
var
graph
=
(
SwhBidirectionalImmutableGraph
)
this
.
getGraph
();
switch
(
p
)
{
case
COMMIT_AUTHOR:
return
graph
.
getCommitAuthor
(
nodeId
);
case
COMMIT_MESSAGE:
return
graph
.
getMessage
(
nodeId
);
}
}
}
Event Timeline
seirl
created this paste.
Feb 23 2022, 4:32 PM
2022-02-23 16:32:53 (UTC+1)
Log In to Comment