Ability to add keyValues on Edge and Vertex Creation
kevmegforest opened this issue · 1 comments
kevmegforest commented
I've got a bug with fields which are mandatory for classes.
I'm trying to create an Edge on an existing vertex using
edgeHasCalculs= COP_Vertex.addEdgeToExistingVStoreLocation(storeVertex, calculs.INITIALIZER_EHasCalculs);
edgeHasCalculs.setTypeCalcul(classOf[VCOP].getSimpleName);
edgeHasCalculs.setTimespan(timespan);
edgeHasCalculs.setEnd_Date(endDate.toDate());
It fails at the first line, because of :
"The field 'EHasCalculs.Timespan' is mandatory, but not found on record: EHasCalculs{out:#-1:-2,in:#21:2}"
I would need to be able to specify the keyValues on creation of the baseEdge so that when it goes in the delegatingFrameGraph, the classInitializer or an other way be able to specify keyValues in this function.
public <T> T addFramedEdge(final VertexFrame source, final VertexFrame destination, final String label, final ClassInitializer<T> initializer, final Object... keyValues) {
final Edge baseEdge = source.getElement().addEdge(label, destination.getElement(), keyValues);
final T framedEdge = frameNewElement(baseEdge, initializer);
return framedEdge;
}
I'm using the annotation methods:
@Incidence(label = "EHasCalculs", direction = Direction.OUT)
public abstract <E extends AbstractEdgeFrame> E addEdgeToExistingVStoreLocation(VStoreLocation son, ClassInitializer<? extends E> edgeInitializer);
Thanks
syncleus-bot commented
I'll look into this shortly, not near a computer right now. Give me 24
hours for a proper response thanks.
…On Tue, Dec 18, 2018, 3:16 PM kevmegforest ***@***.*** wrote:
I've got a bug with fields which are mandatory for classes.
I'm trying to create an Edge on an existing vertex using
edgeHasCalculs= COP_Vertex.addEdgeToExistingVStoreLocation(storeVertex,
calculs.INITIALIZER_EHasCalculs);
edgeHasCalculs.setTypeCalcul(classOf[VCOP].getSimpleName);
edgeHasCalculs.setTimespan(timespan);
edgeHasCalculs.setEnd_Date(endDate.toDate());
It fails at the first line, because of :
"The field 'EHasCalculs.Timespan' is mandatory, but not found on record:
EHasCalculs{out:#-1:-2,in:#21
<#21>:2}"
I would need to be able to specify the keyValues on creation of the
baseEdge so that when it goes in the delegatingFrameGraph, the
classInitializer or an other way be able to specify keyValues in this
function.
public <T> T addFramedEdge(final VertexFrame source, final VertexFrame
destination, final String label, final ClassInitializer<T> initializer,
final Object... keyValues) { final Edge baseEdge =
source.getElement().addEdge(label, destination.getElement(), keyValues);
final T framedEdge = frameNewElement(baseEdge, initializer); return
framedEdge; }
I'm using the annotation methods:
@Incidence(label = "EHasCalculs", direction = Direction.OUT) public
abstract <E extends AbstractEdgeFrame> E
addEdgeToExistingVStoreLocation(VStoreLocation son, ClassInitializer<?
extends E> edgeInitializer);
Thanks
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#55>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AWNYby8hCqyYYkwev5WaNyxoYBibYyMuks5u6U00gaJpZM4ZZAb4>
.