Skip to content

Dev Frames Extensions

sgilda edited this page May 4, 2015 · 8 revisions

Frames Extensions

Windup has several Frames extensions to satisfy its needs.

Multiple Types in a Vertex

The upstream frames project only stores one type in the type property by default. Windup extends this default type resolver behavior to support multiple types. The values themselves are stored in a multi-valued Titan property on each Vertex.

Map Handler

To store a map in a single vertexes properties:

@TypeValue("MapModelMain")
public interface MapMainModel extends WindupVertexFrame
{
    @MapInProperties void setMap(Map<String, MapValueModel> map);
    @MapInProperties Map<String, MapValueModel> getMap();
}

Map

To store a map in as adjacent vertices.

@TypeValue("MapModelMain")
public interface MapMainModel extends WindupVertexFrame
{
    @MapInAdjacentProperties(label = "map") void setMap(Map<String, MapValueModel> map);
    @MapInAdjacentProperties(label = "map") Map<String, MapValueModel> getMap();
}

List

WindupVertexListModel offers a generic model for lists of other models, which are stored as adjacent vertices.

Clone this wiki locally