All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.tinkerpop.frames.annotations.OutVertexAnnotationHandler Maven / Gradle / Ivy

Go to download

Windup Frames is an extension of the upstream Frames project, with tools to ease debugging and integration within windup.

There is a newer version: 4.0.1.Final
Show newest version
package com.tinkerpop.frames.annotations;

import java.lang.reflect.Method;

import com.tinkerpop.blueprints.Direction;
import com.tinkerpop.blueprints.Edge;
import com.tinkerpop.blueprints.Element;
import com.tinkerpop.frames.FramedGraph;
import com.tinkerpop.frames.OutVertex;

public class OutVertexAnnotationHandler implements AnnotationHandler {
    @Override
    public Class getAnnotationType() {
        return OutVertex.class;
    }

    @Override
    public Object processElement(final OutVertex annotation, final Method method, final Object[] arguments, final FramedGraph framedGraph, final Element element, final Direction direction) {
        if (element instanceof Edge) {
        	return framedGraph.frame(((Edge)element).getVertex(Direction.OUT), method.getReturnType());
        } else {
            throw new UnsupportedOperationException();
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy