-
Notifications
You must be signed in to change notification settings - Fork 5
/
ContextDomain.java
83 lines (57 loc) · 1.55 KB
/
ContextDomain.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
package com.mysema.rdfbean.domains;
import com.mysema.rdfbean.annotations.ClassMapping;
import com.mysema.rdfbean.annotations.Context;
import com.mysema.rdfbean.annotations.Id;
import com.mysema.rdfbean.annotations.Predicate;
import com.mysema.rdfbean.model.IDType;
public interface ContextDomain {
String NS1 = "http://www.example.com/ns1#";
String NS2 = "http://www.example.com/ns2#";
String NS3 = "http://www.example.com/ns3#";
@ClassMapping
@Context(NS1)
public static class Entity1 {
@Id(IDType.LOCAL)
String id;
@Predicate
public String property;
@Predicate
public Entity2 entity;
public String getProperty() {
return property;
}
public Entity2 getEntity() {
return entity;
}
}
@ClassMapping
public static class Entity2 {
@Id(IDType.LOCAL)
String id;
@Predicate(context = NS2)
public String property;
@Predicate
public Entity3 entity;
public String getProperty() {
return property;
}
public Entity3 getEntity() {
return entity;
}
}
@ClassMapping
public static class Entity3 {
@Id(IDType.LOCAL)
String id;
@Predicate(context = NS3)
public String property;
@Predicate
public Entity1 entity;
public String getProperty() {
return property;
}
public Entity1 getEntity() {
return entity;
}
}
}