Created
November 11, 2016 12:12
-
-
Save PatrickKwinten/a001bf35e38181f338886cd5d76a1359 to your computer and use it in GitHub Desktop.
Profile object class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.wordpress.quintessens.graph.teamroom; | |
/* | |
* Author Patrick Kwinten http://quintessens.wordpress.com | |
*/ | |
import org.openntf.domino.graph2.annotations.AdjacencyUnique; | |
import org.openntf.domino.graph2.builtin.DVertexFrame; | |
import com.tinkerpop.blueprints.Direction; | |
import com.tinkerpop.frames.Property; | |
import com.tinkerpop.frames.modules.typedgraph.TypeValue; | |
@TypeValue("profile") | |
public interface Profile extends DVertexFrame { | |
@Property("$$Key") | |
public String getKey(); | |
/* | |
* Optional fields | |
*/ | |
@Property("Name") | |
public String getName(); | |
@Property("Name") | |
public void setName(String n); | |
@Property("Department") | |
public String getDepartment(); | |
@Property("Department") | |
public void setDepartment(String n); | |
@Property("Location") | |
public String getLocation(); | |
@Property("Location") | |
public void setLocation(String n); | |
@Property("Job") | |
public String getJob(); | |
@Property("Job") | |
public void setJob(String n); | |
@Property("Email") | |
public String getMail(); | |
@Property("Email") | |
public void setMail(String n); | |
/* | |
* Edges e.g. relations | |
* Note the direction might seem to go the incorrect direction | |
* (Profile) - [:hasWritten] -> (Post) | |
*/ | |
@AdjacencyUnique(label = "hasWritten", direction = Direction.IN) | |
public void addTopic(Post post); | |
@AdjacencyUnique(label = "hasWritten", direction = Direction.IN) | |
public void removeTopic(Post post); | |
@AdjacencyUnique(label = "hasWritten", direction = Direction.IN) | |
public Iterable<Post> getPosts(); | |
@AdjacencyUnique(label = "hasResponded", direction = Direction.IN) | |
public Iterable<Response> getResponses(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment