@TypeAlias(ReferenceRelation.TYPE) @RelationshipEntity(type = ReferenceRelation.TYPE) public class ReferenceRelation extends AbstractRelation<ContentNode, CitationNode> { public static final String TYPE = "referenceRelation"; public ReferenceRelation() { return; } public ReferenceRelation(ContentNode startNode, CitationNode endNode) { super(startNode, endNode); } }
/** * Definition of a Relationship which does not actually exist, or rather the * name of the RelationshipType does not exist in an existing Neo4j graph. */ @RelationshipEntity(type = "DODGY_REL_DEF") public class DodgyRelDef { @GraphId Long nodeId; }
@TypeAlias(RootRelation.TYPE) @RelationshipEntity(type = RootRelation.TYPE) public class RootRelation extends AbstractRelation<PersonNode, RootNode> { public static final String TYPE = "rootRelation"; public RootRelation() { super(); } public RootRelation(PersonNode startNode, RootNode endNode) { super(startNode, endNode); } }
@TypeAlias(ContentContributionRelation.TYPE) @RelationshipEntity(type = ContentContributionRelation.TYPE) public class ContentContributionRelation extends AbstractRelation<ContentNode, IdentityNode> { public static final String TYPE = "contentContributionRelation"; public ContentContributionRelation() { super(); } public ContentContributionRelation(ContentNode startNode, IdentityNode endNode) { super(startNode, endNode); } }
@TypeAlias(CitationRelation.TYPE) @RelationshipEntity(type = CitationRelation.TYPE) public class CitationRelation extends AbstractRelation<CitationNode, ContentNode> { public static final String TYPE = "citationRelation"; private final Set<CitationType> types = new HashSet<>(); public CitationRelation() { } public CitationRelation(CitationNode startNode, ContentNode endNode, CitationType citationType) { super(startNode, endNode); types.add(citationType); } public Set<CitationType> getTypes() { return types; } }
@TypeAlias(IdentityRelation.TYPE) @RelationshipEntity(type = IdentityRelation.TYPE) public class IdentityRelation extends AbstractRelation<IdentityNode, PersonNode> { public static final String TYPE = "identityRelation";
/** * Created by david on 2014-09-17. */ @RelationshipEntity(type = "Tag") public class Tag { @GraphId Long id; @StartNode Tweet tweet; @EndNode Keyword keyword; }
@TypeAlias(SimilarityRelation.TYPE) @RelationshipEntity(type = SimilarityRelation.TYPE) public class SimilarityRelation extends AbstractRelation<ContentNode, ContentNode> {
/** * Created by david on 2014-09-17. */ @RelationshipEntity(type = "Mention") public class Mention { @GraphId Long id; @StartNode public Tweet tweet; @EndNode public Profile profile; }
/** * Created by david on 2014-12-22. */ @RelationshipEntity(type = "Author") public class Author { @GraphId Long id; @StartNode public Tweet tweet; @EndNode public Profile profile; }
/** * Created by david on 2014-09-17. */ @RelationshipEntity(type = "Connected") public class Connected { @GraphId Long id; @StartNode Keyword start; @EndNode Keyword end; int count; public int getCount() { return count; } public void setCount(int count) { this.count = count; } }
@RelationshipEntity(type = "LIKES") public class Likes {
@RelationshipEntity(type = "HAS_SEEN") // #5 This class is backed by a Neo4j Relationship public class Viewing {
@RelationshipEntity @TypeAlias(AbstractRelation.TYPE) public class AbstractRelation<S extends AbstractNode, E extends AbstractNode> {