Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to add keyValues on Edge and Vertex Creation #55

Open
kevmegforest opened this issue Dec 18, 2018 · 1 comment
Open

Ability to add keyValues on Edge and Vertex Creation #55

kevmegforest opened this issue Dec 18, 2018 · 1 comment

Comments

@kevmegforest
Copy link

kevmegforest commented Dec 18, 2018

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
Copy link

syncleus-bot commented Dec 18, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants